diff options
| author | Rider Linden <rider@lindenlab.com> | 2018-08-24 14:25:31 -0700 |
|---|---|---|
| committer | Rider Linden <rider@lindenlab.com> | 2018-08-24 14:25:31 -0700 |
| commit | 185915aeede50dec00822c336537a335404252ed (patch) | |
| tree | bcce0304206a1c14516f93abcd4d81ea753e9466 /indra/newview/llfloaterfixedenvironment.cpp | |
| parent | d62079002df2d8391c7205029f2ff1242aaddf6a (diff) | |
Finish dirty and close warning for fixed environment editors.
Diffstat (limited to 'indra/newview/llfloaterfixedenvironment.cpp')
| -rw-r--r-- | indra/newview/llfloaterfixedenvironment.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp index 915bc687d8..cbc41f724e 100644 --- a/indra/newview/llfloaterfixedenvironment.cpp +++ b/indra/newview/llfloaterfixedenvironment.cpp @@ -105,7 +105,7 @@ BOOL LLFloaterFixedEnvironment::postBuild() mTxtName->setCommitCallback([this](LLUICtrl *, const LLSD &) { onNameChanged(mTxtName->getValue().asString()); }); getChild<LLButton>(BUTTON_NAME_IMPORT)->setClickedCallback([this](LLUICtrl *, const LLSD &) { onButtonImport(); }); - getChild<LLButton>(BUTTON_NAME_CANCEL)->setClickedCallback([this](LLUICtrl *, const LLSD &) { onButtonCancel(); }); + getChild<LLButton>(BUTTON_NAME_CANCEL)->setClickedCallback([this](LLUICtrl *, const LLSD &) { onClickCloseBtn(); }); getChild<LLButton>(BUTTON_NAME_LOAD)->setClickedCallback([this](LLUICtrl *, const LLSD &) { onButtonLoad(); }); mFlyoutControl = new LLFlyoutComboBtnCtrl(this, BUTTON_NAME_COMMIT, BUTTON_NAME_FLYOUT, XML_FLYOUTMENU_FILE); @@ -334,9 +334,12 @@ void LLFloaterFixedEnvironment::onButtonApply(LLUICtrl *ctrl, const LLSD &data) } } -void LLFloaterFixedEnvironment::onButtonCancel() +void LLFloaterFixedEnvironment::onClickCloseBtn(bool app_quitting) { - checkAndConfirmSettingsLoss([this](){ closeFloater(); }); + if (!app_quitting) + checkAndConfirmSettingsLoss([this](){ closeFloater(); }); + else + closeFloater(); } void LLFloaterFixedEnvironment::onButtonLoad() @@ -558,7 +561,7 @@ void LLFloaterFixedEnvironmentWater::doImportFromDisk() return; } - clearDirtyFlag(); + setDirtyFlag(); LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_EDIT, legacywater); setEditSettings(legacywater); LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_FAST, true); |
