Save some frames from updating export info when llselectmgr signals change but we have the same object selected

Cinders 2013-10-01 17:49:02 -06:00
parent 2b02fc2a57
commit 4e1f7ce4e8
4 changed files with 23 additions and 1 deletions

View File

@ -108,6 +108,7 @@ namespace DAEExportUtil
ColladaExportFloater::ColladaExportFloater(const LLSD& key)
: LLFloater(key),
mCurrentObjectID(NULL),
mDirty(true)
{
mCommitCallbackRegistrar.add("ColladaExport.TextureExport", boost::bind(&ColladaExportFloater::onTextureExportCheck, this));
@ -250,6 +251,7 @@ void ColladaExportFloater::addSelectedObjects()
LLSelectNode* node = mObjectSelection->getFirstRootNode();
if (node)
{
mCurrentObjectID = node->getObject()->getID();
mSaver.mOffset = -mObjectSelection->getFirstRootObject()->getRenderPosition();
mObjectName = node->mName;
@ -280,7 +282,15 @@ void ColladaExportFloater::addSelectedObjects()
void ColladaExportFloater::updateSelection()
{
mObjectSelection = LLSelectMgr::getInstance()->getSelection();
LLObjectSelectionHandle object_selection = LLSelectMgr::getInstance()->getSelection();
LLSelectNode* node = object_selection->getFirstRootNode();
if (node && !node->mValid && node->getObject()->getID() == mCurrentObjectID)
{
return;
}
mObjectSelection = object_selection;
dirty();
refresh();
}

View File

@ -148,6 +148,7 @@ private:
std::string mObjectName;
LLUIString mTitleProgress;
LLPanel* mTexturePanel;
LLUUID mCurrentObjectID;
bool mDirty;
class CacheReadResponder : public LLTextureCache::ReadResponder

View File

@ -196,6 +196,7 @@ void FSFloaterObjectExport::onIdle()
FSFloaterObjectExport::FSFloaterObjectExport(const LLSD& key)
: LLFloater(key),
mCurrentObjectID(NULL),
mDirty(true)
{
}
@ -257,8 +258,16 @@ void FSFloaterObjectExport::onOpen(const LLSD& key)
void FSFloaterObjectExport::updateSelection()
{
LLObjectSelectionHandle object_selection = LLSelectMgr::getInstance()->getSelection();
LLSelectNode* node = object_selection->getFirstRootNode();
if (node && !node->mValid && node->getObject()->getID() == mCurrentObjectID)
{
return;
}
mObjectSelection = object_selection;
dirty();
refresh();
}
bool FSFloaterObjectExport::exportSelection()
@ -1145,6 +1154,7 @@ void FSFloaterObjectExport::addSelectedObjects()
LLSelectNode* node = mObjectSelection->getFirstRootNode();
if (node)
{
mCurrentObjectID = node->getObject()->getID();
mObjectName = node->mName;
for (LLObjectSelection::iterator iter = mObjectSelection->begin(); iter != mObjectSelection->end(); ++iter)
{

View File

@ -98,6 +98,7 @@ private:
obj_info_t mObjects;
std::string mFilename;
LLSafeHandle<LLObjectSelection> mObjectSelection;
LLUUID mCurrentObjectID;
S32 mTotal;
S32 mIncluded;