Satisfy Issue 904: Add option to close appearance floater with Esc

Setting AppearanceCloseOnEscape to true will turn this on.
This commit is contained in:
Inusaito Sayori
2013-07-29 13:27:07 -04:00
parent 258c0da8d3
commit 8680e4599c
2 changed files with 13 additions and 0 deletions

View File

@@ -2127,6 +2127,17 @@ This should be as low as possible, but too low may break functionality</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AppearanceCloseOnEscape</key>
<map>
<key>Comment</key>
<string>When in appearance editing mode, hitting escape will work the same as the close button</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AppearanceSpecialLighting</key>
<map>
<key>Comment</key>

View File

@@ -132,6 +132,8 @@ void LLMorphView::setVisible(BOOL visible)
}
else
{
if (LLFloaterCustomize::instanceExists() && gSavedSettings.getBOOL("AppearanceCloseOnEscape"))
LLFloaterCustomize::instance().onClose(false);
shutdown();
}
}