summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermodelpreview.cpp
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2015-03-23 11:23:28 +0200
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2015-03-23 11:23:28 +0200
commitdfd19ed84322c7129509756e1c7fcc63a55f459e (patch)
treebd9ae308fa19f93654e1b0e7e857fddfd97feb38 /indra/newview/llfloatermodelpreview.cpp
parent84b178ccb140b44a48805ed08468c6dc4acbc395 (diff)
MAINT-4998 FIXED Ignore loadedCallback if Modelpreview floater is already closed.
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index b2f237e71f..e9f98a5c5f 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -93,6 +93,8 @@
S32 LLFloaterModelPreview::sUploadAmount = 10;
LLFloaterModelPreview* LLFloaterModelPreview::sInstance = NULL;
+bool LLModelPreview::sIgnoreLoadedCallback = false;
+
const S32 PREVIEW_BORDER_WIDTH = 2;
const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH;
const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE;
@@ -788,9 +790,16 @@ BOOL LLFloaterModelPreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
/*virtual*/
void LLFloaterModelPreview::onOpen(const LLSD& key)
{
+ LLModelPreview::sIgnoreLoadedCallback = false;
requestAgentUploadPermissions();
}
+/*virtual*/
+void LLFloaterModelPreview::onClose(bool app_quitting)
+{
+ LLModelPreview::sIgnoreLoadedCallback = true;
+}
+
//static
void LLFloaterModelPreview::onPhysicsParamCommit(LLUICtrl* ctrl, void* data)
{
@@ -3193,7 +3202,7 @@ void LLModelPreview::loadedCallback(
void* opaque)
{
LLModelPreview* pPreview = static_cast< LLModelPreview* >(opaque);
- if (pPreview)
+ if (pPreview && !LLModelPreview::sIgnoreLoadedCallback)
{
pPreview->loadModelCallback(lod);
}