diff options
| author | Rider Linden <rider@lindenlab.com> | 2018-09-11 17:10:32 -0700 |
|---|---|---|
| committer | Rider Linden <rider@lindenlab.com> | 2018-09-11 17:10:32 -0700 |
| commit | 4fe44b9033ee793134b7c080c71931c62c33ddf9 (patch) | |
| tree | 2ed96112e8d2f60e4cd7a57ee241156223e41de2 /indra/newview/llpanelenvironment.cpp | |
| parent | 3558377d540de31bdb615f9c0e0df8163b33ccf8 (diff) | |
SL-9626: When the panel loses visibility the picker is now automatically closed. Also picker checks handle to parent rather than pointer to parent.
Diffstat (limited to 'indra/newview/llpanelenvironment.cpp')
| -rw-r--r-- | indra/newview/llpanelenvironment.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp index 74cc7660f3..41d7d8b54f 100644 --- a/indra/newview/llpanelenvironment.cpp +++ b/indra/newview/llpanelenvironment.cpp @@ -147,6 +147,12 @@ void LLPanelEnvironmentInfo::onVisibilityChange(BOOL new_visibility) gIdleCallbacks.addFunction(onIdlePlay, this); else { + LLFloaterSettingsPicker *picker = getSettingsPicker(false); + if (picker) + { + picker->closeFloater(); + } + gIdleCallbacks.deleteFunction(onIdlePlay, this); LLFloaterEditExtDayCycle *dayeditor = getEditFloater(); if (mCommitConnection.connected()) @@ -252,12 +258,12 @@ std::string LLPanelEnvironmentInfo::getInventoryNameForAssetId(LLUUID asset_id) return name; } -LLFloaterSettingsPicker *LLPanelEnvironmentInfo::getSettingsPicker() +LLFloaterSettingsPicker * LLPanelEnvironmentInfo::getSettingsPicker(bool create) { LLFloaterSettingsPicker *picker = static_cast<LLFloaterSettingsPicker *>(mSettingsFloater.get()); // Show the dialog - if (!picker) + if (!picker && create) { picker = new LLFloaterSettingsPicker(this, LLUUID::null, "SELECT SETTINGS"); |
