Keep focus during Freeze Time so that pressing ESC always leaves Freeze Time.
This commit is contained in:
@@ -345,6 +345,7 @@ public:
|
||||
|
||||
LLToolset* mLastToolset;
|
||||
boost::signals2::connection mQualityMouseUpConnection;
|
||||
LLFocusableElement* mPrevDefaultKeyboardFocus;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -1713,9 +1714,17 @@ void LLFloaterSnapshot::Impl::freezeTime(bool on)
|
||||
sInstance->impl.mLastToolset = LLToolMgr::getInstance()->getCurrentToolset();
|
||||
LLToolMgr::getInstance()->setCurrentToolset(gCameraToolset);
|
||||
}
|
||||
|
||||
// Make sure the floater keeps focus so that pressing ESC stops Freeze Time mode.
|
||||
sInstance->impl.mPrevDefaultKeyboardFocus = gFocusMgr.getDefaultKeyboardFocus();
|
||||
gFocusMgr.setDefaultKeyboardFocus(sInstance);
|
||||
}
|
||||
else // turning off freeze frame mode
|
||||
else if (gSavedSettings.getBOOL("FreezeTime")) // turning off freeze frame mode
|
||||
{
|
||||
// Restore default keyboard focus.
|
||||
gFocusMgr.setDefaultKeyboardFocus(sInstance->impl.mPrevDefaultKeyboardFocus);
|
||||
sInstance->impl.mPrevDefaultKeyboardFocus = NULL;
|
||||
|
||||
gSnapshotFloaterView->setMouseOpaque(FALSE);
|
||||
|
||||
if (previewp)
|
||||
|
||||
Reference in New Issue
Block a user