Preference button to clear settings

This commit is contained in:
Siana Gearz
2012-03-05 19:05:30 +01:00
parent edd1b4d8e7
commit 5eb90ef9cd
7 changed files with 126 additions and 3 deletions

View File

@@ -387,6 +387,7 @@ void LLPreferenceCore::refreshEnabledGraphics()
LLFloaterPreference::LLFloaterPreference()
{
mExitWithoutSaving = false;
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preferences.xml");
}
@@ -532,7 +533,10 @@ void LLFloaterPreference::onBtnApply( void* userdata )
void LLFloaterPreference::onClose(bool app_quitting)
{
LLPanelLogin::setAlwaysRefresh(false);
cancel(); // will be a no-op if OK or apply was performed just prior.
if (!mExitWithoutSaving)
{
cancel(); // will be a no-op if OK or apply was performed just prior.
}
LLFloater::onClose(app_quitting);
}
@@ -572,3 +576,10 @@ void LLFloaterPreference::switchTab(S32 i)
{
sInstance->mPreferenceCore->getTabContainer()->selectTab(i);
}
// static
void LLFloaterPreference::closeWithoutSaving()
{
sInstance->mExitWithoutSaving = true;
sInstance->close();
}