diff options
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
| -rw-r--r-- | indra/newview/llpreviewscript.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 3c5e2544bb..2476b6d6ed 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -376,7 +376,8 @@ LLScriptEdCore::LLScriptEdCore( mLive(live), mContainer(container), mHasScriptData(FALSE), - mScriptRemoved(FALSE) + mScriptRemoved(FALSE), + mSaveDialogShown(FALSE) { setFollowsAll(); setBorderVisible(FALSE); @@ -855,8 +856,12 @@ BOOL LLScriptEdCore::canClose() } else { - // Bring up view-modal dialog: Save changes? Yes, No, Cancel - LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleSaveChangesDialog, this, _1, _2)); + if(!mSaveDialogShown) + { + mSaveDialogShown = TRUE; + // Bring up view-modal dialog: Save changes? Yes, No, Cancel + LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleSaveChangesDialog, this, _1, _2)); + } return FALSE; } } @@ -869,6 +874,7 @@ void LLScriptEdCore::setEnableEditing(bool enable) bool LLScriptEdCore::handleSaveChangesDialog(const LLSD& notification, const LLSD& response ) { + mSaveDialogShown = FALSE; S32 option = LLNotificationsUtil::getSelectedOption(notification, response); switch( option ) { |
