summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorprep <prep@lindenlab.com>2013-06-03 16:10:46 -0400
committerprep <prep@lindenlab.com>2013-06-03 16:10:46 -0400
commitc81b685b4217b3c321815e1993d39fb0b479a767 (patch)
tree5faba0482e6b9b8c74f9ebda861b294779e33e9b /indra
parent7f2cf1fa9cf7c09af8eeab3aa077eb0a9922d631 (diff)
Fix for sh-4221 Sometimes ctrl+q needed to be hit twice
Diffstat (limited to 'indra')
-rwxr-xr-xindra/llui/llfloater.cpp8
-rwxr-xr-xindra/llui/llfloater.h2
-rwxr-xr-xindra/llui/llpanel.cpp4
-rwxr-xr-xindra/llui/llpanel.h2
-rwxr-xr-xindra/newview/llfloatersidepanelcontainer.cpp15
-rwxr-xr-xindra/newview/llfloatersidepanelcontainer.h2
6 files changed, 20 insertions, 13 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index ae4961559e..63491aa296 100755
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -704,9 +704,9 @@ void LLFloater::openFloater(const LLSD& key)
dirtyRect();
}
-void LLFloater::verifyClose()
+void LLFloater::verifyClose( bool app_quitting )
{
- LLPanel::handleCloseConfirmation();
+ LLPanel::handleCloseConfirmation( app_quitting );
}
void LLFloater::closeFloater(bool app_quitting)
@@ -726,7 +726,7 @@ void LLFloater::closeFloater(bool app_quitting)
}
if (app_quitting)
- {
+ {
LLFloater::sQuitting = true;
}
@@ -2659,7 +2659,7 @@ void LLFloaterView::closeAllChildren(bool app_quitting)
{
if ( floaterp->mVerifyUponClose )
{
- floaterp->verifyClose();
+ floaterp->verifyClose(app_quitting);
}
else
{
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index bf71b527b3..8eb40ddd0b 100755
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -225,7 +225,7 @@ public:
// If allowed, close the floater cleanly, releasing focus.
virtual void closeFloater(bool app_quitting = false);
- virtual void verifyClose();
+ virtual void verifyClose( bool app_quitting = false );
// Close the floater or its host. Use when hidding or toggling a floater instance.
virtual void closeHostedFloater();
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index 7b7920f866..b0bdbcb7d1 100755
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -354,11 +354,11 @@ void LLPanel::handleVisibilityChange ( BOOL new_visibility )
}
-void LLPanel::handleCloseConfirmation( )
+void LLPanel::handleCloseConfirmation( bool app_quitting)
{
if (mCloseConfirmationSignal)
{
- (*mCloseConfirmationSignal)(this, LLSD() );
+ (*mCloseConfirmationSignal)(this, LLSD( app_quitting ) );
}
}
void LLPanel::setFocus(BOOL b)
diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h
index d48fab6dd9..02f8c0aba7 100755
--- a/indra/llui/llpanel.h
+++ b/indra/llui/llpanel.h
@@ -116,7 +116,7 @@ public:
/*virtual*/ void draw();
/*virtual*/ BOOL handleKeyHere( KEY key, MASK mask );
/*virtual*/ void handleVisibilityChange ( BOOL new_visibility );
- void handleCloseConfirmation( );
+ void handleCloseConfirmation( bool app_quitting );
// From LLFocusableElement
diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp
index 13a9ba1695..02216420da 100755
--- a/indra/newview/llfloatersidepanelcontainer.cpp
+++ b/indra/newview/llfloatersidepanelcontainer.cpp
@@ -40,7 +40,8 @@
const std::string LLFloaterSidePanelContainer::sMainPanelName("main_panel");
LLFloaterSidePanelContainer::LLFloaterSidePanelContainer(const LLSD& key, const Params& params)
-: LLFloater(key, params)
+: LLFloater(key, params)
+, mAppQuiting( false )
{
// Prevent transient floaters (e.g. IM windows) from hiding
// when this floater is clicked.
@@ -56,7 +57,8 @@ BOOL LLFloaterSidePanelContainer::postBuild()
}
void LLFloaterSidePanelContainer::onConfirmationClose( const LLSD &confirm )
-{
+{
+ mAppQuiting = confirm.asBoolean();
onClickCloseBtn();
}
@@ -69,10 +71,12 @@ LLFloaterSidePanelContainer::~LLFloaterSidePanelContainer()
void LLFloaterSidePanelContainer::onOpen(const LLSD& key)
{
getChild<LLPanel>(sMainPanelName)->onOpen(key);
+ mAppQuiting = false;
}
-void LLFloaterSidePanelContainer::onClose(bool app_quitting)
-{
- mForceCloseAfterVerify = true;
+
+void LLFloaterSidePanelContainer::onClose( bool app_quitting )
+{
+ if (! mAppQuiting ) { mForceCloseAfterVerify = true; }
LLSidepanelAppearance* panel = getSidePanelAppearance();
if ( panel )
{
@@ -80,6 +84,7 @@ void LLFloaterSidePanelContainer::onClose(bool app_quitting)
panel->onCloseFromAppearance( this );
}
}
+
void LLFloaterSidePanelContainer::onClickCloseBtn()
{
LLSidepanelAppearance* panel = getSidePanelAppearance();
diff --git a/indra/newview/llfloatersidepanelcontainer.h b/indra/newview/llfloatersidepanelcontainer.h
index dc85570f7e..f543cfd5c4 100755
--- a/indra/newview/llfloatersidepanelcontainer.h
+++ b/indra/newview/llfloatersidepanelcontainer.h
@@ -89,6 +89,8 @@ public:
private:
LLSidepanelAppearance* getSidePanelAppearance();
+private:
+ bool mAppQuiting;
};
#endif // LL_LLFLOATERSIDEPANELCONTAINER_H