diff options
-rw-r--r-- | indra/newview/llfloatereditextdaycycle.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llsettingspicker.cpp | 13 |
2 files changed, 14 insertions, 8 deletions
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index f05f0fb021..235a9b4d53 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -738,14 +738,7 @@ void LLFloaterEditExtDayCycle::onButtonImport() void LLFloaterEditExtDayCycle::onButtonLoadFrame() { - LLUUID curitemId = mInventoryId; - - if (mCurrentEdit && curitemId.notNull()) - { - curitemId = LLFloaterSettingsPicker::findItemID(mCurrentEdit->getAssetId(), false, false); - } - - doOpenInventoryFloater((mCurrentTrack == LLSettingsDay::TRACK_WATER) ? LLSettingsType::ST_WATER : LLSettingsType::ST_SKY, curitemId); + doOpenInventoryFloater((mCurrentTrack == LLSettingsDay::TRACK_WATER) ? LLSettingsType::ST_WATER : LLSettingsType::ST_SKY, LLUUID::null); } void LLFloaterEditExtDayCycle::onAddFrame() diff --git a/indra/newview/llsettingspicker.cpp b/indra/newview/llsettingspicker.cpp index fcc615db6e..b47821ddf2 100644 --- a/indra/newview/llsettingspicker.cpp +++ b/indra/newview/llsettingspicker.cpp @@ -151,6 +151,8 @@ void LLFloaterSettingsPicker::onClose(bool app_quitting) { owner->setFocus(TRUE); } + mSettingItemID.setNull(); + mInventoryPanel->getRootFolder()->clearSelection(); } void LLFloaterSettingsPicker::setValue(const LLSD& value) @@ -302,8 +304,19 @@ void LLFloaterSettingsPicker::onAssetLoaded(LLUUID asset_id, LLSettingsBase::ptr LLComboBox* track_selection = getChild<LLComboBox>(CMB_TRACK_SELECTION); track_selection->clear(); track_selection->removeall(); + if (!settings) + { + LL_WARNS() << "Failed to load asset " << asset_id << LL_ENDL; + return; + } LLSettingsDay::ptr_t pday = std::dynamic_pointer_cast<LLSettingsDay>(settings); + if (!pday) + { + LL_WARNS() << "Wrong asset type received by id " << asset_id << LL_ENDL; + return; + } + if (mTrackMode == TRACK_WATER) { track_selection->add(getString(STR_TRACK_WATER), LLSD::Integer(LLSettingsDay::TRACK_WATER), ADD_TOP, true); |