diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llmultislider.cpp | 18 | ||||
-rw-r--r-- | indra/llui/llslider.cpp | 2 | ||||
-rw-r--r-- | indra/llui/llslider.h | 4 | ||||
-rw-r--r-- | indra/llui/llxyvector.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llfloatereditextdaycycle.cpp | 38 | ||||
-rw-r--r-- | indra/newview/llfloatereditextdaycycle.h | 11 | ||||
-rw-r--r-- | indra/newview/llfloaterfixedenvironment.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llfloaterfixedenvironment.h | 2 | ||||
-rw-r--r-- | indra/newview/llpanelenvironment.cpp | 44 | ||||
-rw-r--r-- | indra/newview/llpanelenvironment.h | 4 | ||||
-rw-r--r-- | indra/newview/llsettingspicker.cpp | 80 | ||||
-rw-r--r-- | indra/newview/llsettingspicker.h | 22 | ||||
-rw-r--r-- | indra/newview/llviewerparcelmgr.cpp | 9 | ||||
-rw-r--r-- | indra/newview/skins/default/textures/widgets/track_control_moon_back.png | bin | 859 -> 913 bytes | |||
-rw-r--r-- | indra/newview/skins/default/textures/widgets/track_control_moon_front.png | bin | 1100 -> 1156 bytes | |||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_my_environments.xml | 6 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_settings_picker.xml | 33 |
17 files changed, 165 insertions, 142 deletions
diff --git a/indra/llui/llmultislider.cpp b/indra/llui/llmultislider.cpp index c35b7c5496..ece6edd285 100644 --- a/indra/llui/llmultislider.cpp +++ b/indra/llui/llmultislider.cpp @@ -731,7 +731,14 @@ void LLMultiSlider::draw() // the draw command if (mThumbImagep) { - mThumbImagep->draw(mIt->second); + if (getEnabled()) + { + mThumbImagep->draw(mIt->second); + } + else + { + mThumbImagep->draw(mIt->second, LLColor4::grey % 0.8f); + } } else if (capture == this) { @@ -748,7 +755,14 @@ void LLMultiSlider::draw() { if (mThumbImagep) { - mThumbImagep->draw(curSldrIt->second); + if (getEnabled()) + { + mThumbImagep->draw(curSldrIt->second); + } + else + { + mThumbImagep->draw(curSldrIt->second, LLColor4::grey % 0.8f); + } } else if (capture == this) { diff --git a/indra/llui/llslider.cpp b/indra/llui/llslider.cpp index 6925c0a130..62df5a2c38 100644 --- a/indra/llui/llslider.cpp +++ b/indra/llui/llslider.cpp @@ -42,7 +42,6 @@ static LLDefaultChildRegistry::Register<LLSlider> r1("slider_bar"); LLSlider::Params::Params() : orientation ("orientation", std::string ("horizontal")), - track_color("track_color"), thumb_outline_color("thumb_outline_color"), thumb_center_color("thumb_center_color"), thumb_image("thumb_image"), @@ -60,7 +59,6 @@ LLSlider::LLSlider(const LLSlider::Params& p) : LLF32UICtrl(p), mMouseOffset( 0 ), mOrientation ((p.orientation() == "horizontal") ? HORIZONTAL : VERTICAL), - mTrackColor(p.track_color()), mThumbOutlineColor(p.thumb_outline_color()), mThumbCenterColor(p.thumb_center_color()), mThumbImage(p.thumb_image), diff --git a/indra/llui/llslider.h b/indra/llui/llslider.h index 3b492d8182..484a5373b3 100644 --- a/indra/llui/llslider.h +++ b/indra/llui/llslider.h @@ -38,8 +38,7 @@ public: { Optional<std::string> orientation; - Optional<LLUIColor> track_color, - thumb_outline_color, + Optional<LLUIColor> thumb_outline_color, thumb_center_color; Optional<LLUIImage*> thumb_image, @@ -99,7 +98,6 @@ private: const EOrientation mOrientation; LLRect mThumbRect; - LLUIColor mTrackColor; LLUIColor mThumbOutlineColor; LLUIColor mThumbCenterColor; diff --git a/indra/llui/llxyvector.cpp b/indra/llui/llxyvector.cpp index 48f38b8a92..9d5823e368 100644 --- a/indra/llui/llxyvector.cpp +++ b/indra/llui/llxyvector.cpp @@ -289,7 +289,14 @@ BOOL LLXYVector::handleMouseUp(S32 x, S32 y, MASK mask) make_ui_sound("UISndClickRelease"); } - return TRUE; + if (mTouchArea->getRect().pointInRect(x, y)) + { + return TRUE; + } + else + { + return LLUICtrl::handleMouseUp(x, y, mask); + } } BOOL LLXYVector::handleMouseDown(S32 x, S32 y, MASK mask) @@ -299,8 +306,12 @@ BOOL LLXYVector::handleMouseDown(S32 x, S32 y, MASK mask) { gFocusMgr.setMouseCapture(this); make_ui_sound("UISndClick"); - } - return TRUE; + return TRUE; + } + else + { + return LLUICtrl::handleMouseDown(x, y, mask); + } } diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index 1d209fe230..840b392f5d 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -565,14 +565,14 @@ void LLFloaterEditExtDayCycle::onButtonImport() void LLFloaterEditExtDayCycle::onButtonLoadFrame() { - LLUUID curassetId; + LLUUID curitemId = mInventoryId; - if (mCurrentEdit) + if (mCurrentEdit && curitemId.notNull()) { - curassetId = mCurrentEdit->getAssetId(); + curitemId = LLFloaterSettingsPicker::findItemID(mCurrentEdit->getAssetId(), false, false); } - doOpenInventoryFloater((mCurrentTrack == LLSettingsDay::TRACK_WATER) ? LLSettingsType::ST_WATER : LLSettingsType::ST_SKY, curassetId); + doOpenInventoryFloater((mCurrentTrack == LLSettingsDay::TRACK_WATER) ? LLSettingsType::ST_WATER : LLSettingsType::ST_SKY, curitemId); } void LLFloaterEditExtDayCycle::onAddTrack() @@ -999,7 +999,7 @@ void LLFloaterEditExtDayCycle::updateTimeAndLabel() // Update blender here: } -void LLFloaterEditExtDayCycle::addSliderFrame(const F32 frame, LLSettingsBase::ptr_t &setting, bool update_ui) +void LLFloaterEditExtDayCycle::addSliderFrame(const F32 frame, const LLSettingsBase::ptr_t &setting, bool update_ui) { // multi slider distinguishes elements by key/name in string format // store names to map to be able to recall dependencies @@ -1485,7 +1485,7 @@ void LLFloaterEditExtDayCycle::clearDirtyFlag() } -void LLFloaterEditExtDayCycle::doOpenInventoryFloater(LLSettingsType::type_e type, LLUUID currasset) +void LLFloaterEditExtDayCycle::doOpenInventoryFloater(LLSettingsType::type_e type, LLUUID curritem) { // LLUI::sWindow->setCursor(UI_CURSOR_WAIT); LLFloaterSettingsPicker *picker = static_cast<LLFloaterSettingsPicker *>(mInventoryFloater.get()); @@ -1502,7 +1502,7 @@ void LLFloaterEditExtDayCycle::doOpenInventoryFloater(LLSettingsType::type_e typ } picker->setSettingsFilter(type); - picker->setSettingsAssetId(currasset); + picker->setSettingsItemId(curritem); picker->openFloater(); picker->setFocus(TRUE); } @@ -1517,16 +1517,21 @@ void LLFloaterEditExtDayCycle::doCloseInventoryFloater(bool quitting) } } -void LLFloaterEditExtDayCycle::onPickerCommitSetting(LLUUID asset_id) +void LLFloaterEditExtDayCycle::onPickerCommitSetting(LLUUID item_id) { LLSettingsBase::TrackPosition frame(mTimeSlider->getCurSliderValue()); S32 track = mCurrentTrack; - - LLSettingsVOBase::getSettingsAsset(asset_id, - [this, track, frame](LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, LLExtStat) { onAssetLoadedForFrame(asset_id, settings, status, track, frame); }); + LLViewerInventoryItem *itemp = gInventory.getItem(item_id); + if (itemp) + { + mInventoryId = item_id; + mInventoryItem = itemp; + LLSettingsVOBase::getSettingsAsset(itemp->getAssetUUID(), + [this, track, frame, item_id](LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, LLExtStat) { onAssetLoadedForFrame(item_id, asset_id, settings, status, track, frame); }); + } } -void LLFloaterEditExtDayCycle::onAssetLoadedForFrame(LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, S32 track, LLSettingsBase::TrackPosition frame) +void LLFloaterEditExtDayCycle::onAssetLoadedForFrame(LLUUID item_id, LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, S32 track, LLSettingsBase::TrackPosition frame) { std::function<void()> cb = [this, settings, frame, track]() { @@ -1541,6 +1546,7 @@ void LLFloaterEditExtDayCycle::onAssetLoadedForFrame(LLUUID asset_id, LLSettings return; } mEditDay->setSettingsAtKeyframe(settings, frame, track); + addSliderFrame(frame, settings, false); reblendSettings(); synchronizeTabs(); }; @@ -1551,13 +1557,7 @@ void LLFloaterEditExtDayCycle::onAssetLoadedForFrame(LLUUID asset_id, LLSettings return; } - LLFloaterSettingsPicker *picker = static_cast<LLFloaterSettingsPicker *>(mInventoryFloater.get()); - LLInventoryItem *inv_item(nullptr); - - if (picker) - { - inv_item = picker->findItem(asset_id, false, false); - } + LLInventoryItem *inv_item = gInventory.getItem(item_id); if (inv_item && mInventoryItem diff --git a/indra/newview/llfloatereditextdaycycle.h b/indra/newview/llfloatereditextdaycycle.h index 0d306961df..fd5fb67837 100644 --- a/indra/newview/llfloatereditextdaycycle.h +++ b/indra/newview/llfloatereditextdaycycle.h @@ -89,6 +89,9 @@ public: void setEditDayCycle(const LLSettingsDay::ptr_t &pday); void setEditDefaultDayCycle(); + LLUUID getEditingAssetId() { return mEditDay ? mEditDay->getAssetId() : LLUUID::null; } + LLUUID getEditingInventoryId() { return mInventoryId; } + BOOL handleKeyUp(KEY key, MASK mask, BOOL called_from_parent) override; @@ -130,7 +133,7 @@ private: void updateButtons(); void updateSlider(); //generate sliders from current track void updateTimeAndLabel(); - void addSliderFrame(const F32 frame, LLSettingsBase::ptr_t &setting, bool update_ui = true); + void addSliderFrame(const F32 frame, const LLSettingsBase::ptr_t &setting, bool update_ui = true); void removeCurrentSliderFrame(); void loadInventoryItem(const LLUUID &inventoryId); @@ -145,10 +148,10 @@ private: void onInventoryCreated(LLUUID asset_id, LLUUID inventory_id, LLSD results); void onInventoryUpdated(LLUUID asset_id, LLUUID inventory_id, LLSD results); - void doOpenInventoryFloater(LLSettingsType::type_e type, LLUUID currasset); + void doOpenInventoryFloater(LLSettingsType::type_e type, LLUUID curritem); void doCloseInventoryFloater(bool quitting = false); - void onPickerCommitSetting(LLUUID asset_id); - void onAssetLoadedForFrame(LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, S32 track, LLSettingsBase::TrackPosition frame); + void onPickerCommitSetting(LLUUID item_id); + void onAssetLoadedForFrame(LLUUID item_id, LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, S32 track, LLSettingsBase::TrackPosition frame); bool canUseInventory() const; bool canApplyRegion() const; diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp index 216556cf89..5cd99e6ad2 100644 --- a/indra/newview/llfloaterfixedenvironment.cpp +++ b/indra/newview/llfloaterfixedenvironment.cpp @@ -290,21 +290,12 @@ void LLFloaterFixedEnvironment::checkAndConfirmSettingsLoss(LLFloaterFixedEnviro } } -void LLFloaterFixedEnvironment::onPickerCommitSetting(LLUUID asset_id) +void LLFloaterFixedEnvironment::onPickerCommitSetting(LLUUID item_id) { - mInventoryItem = NULL; - mInventoryId.setNull(); - if (!mInventoryFloater.isDead()) - { - LLFloaterSettingsPicker *picker = static_cast<LLFloaterSettingsPicker *>(mInventoryFloater.get()); - if (picker) - { - mInventoryId = picker->findItemID(asset_id, false); - mInventoryItem = gInventory.getItem(mInventoryId); - } - } + mInventoryId = item_id; + mInventoryItem = gInventory.getItem(mInventoryId); - LLSettingsVOBase::getSettingsAsset(asset_id, + LLSettingsVOBase::getSettingsAsset(mInventoryItem->getAssetUUID(), [this](LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, LLExtStat) { onAssetLoaded(asset_id, settings, status); }); } diff --git a/indra/newview/llfloaterfixedenvironment.h b/indra/newview/llfloaterfixedenvironment.h index d235491fd9..afab75b4ba 100644 --- a/indra/newview/llfloaterfixedenvironment.h +++ b/indra/newview/llfloaterfixedenvironment.h @@ -120,7 +120,7 @@ private: void onButtonApply(LLUICtrl *ctrl, const LLSD &data); void onButtonLoad(); - void onPickerCommitSetting(LLUUID asset_id); + void onPickerCommitSetting(LLUUID item_id); void onAssetLoaded(LLUUID asset_id, LLSettingsBase::ptr_t settins, S32 status); bool mIsDirty; diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp index 4ab09e7118..5abef949e1 100644 --- a/indra/newview/llpanelenvironment.cpp +++ b/indra/newview/llpanelenvironment.cpp @@ -48,6 +48,8 @@ #include "llcallbacklist.h" #include "llviewerparcelmgr.h" +#include "llinventorymodel.h" + //========================================================================= namespace { @@ -114,6 +116,7 @@ const std::string alt_labels[] = { LLPanelEnvironmentInfo::LLPanelEnvironmentInfo(): mCurrentEnvironment(), mDirtyFlag(0), + mEditorLastParcelId(INVALID_PARCEL_ID), mCrossRegion(false), mNoSelection(false), mNoEnvironment(false), @@ -256,15 +259,7 @@ void LLPanelEnvironmentInfo::refresh() std::string LLPanelEnvironmentInfo::getInventoryNameForAssetId(LLUUID asset_id) { - LLFloaterSettingsPicker *picker = getSettingsPicker(); - - if (!picker) - { - LL_WARNS("ENVPANEL") << "Couldn't instantiate picker." << LL_ENDL; - return std::string(); - } - - std::string name(picker->findItemName(asset_id, false, false)); + std::string name(LLFloaterSettingsPicker::findItemName(asset_id, false, false)); if (name.empty()) return getString(STR_LABEL_UNKNOWNINV); @@ -331,11 +326,15 @@ void LLPanelEnvironmentInfo::updateEditFloater(const LLEnvironment::EnvironmentI else dayeditor->closeFloater(); } - else + else if (dayeditor->getEditingAssetId() != nextenv->mDayCycle->getAssetId() + || mEditorLastParcelId != nextenv->mParcelId + || mEditorLastRegionId != nextenv->mRegionId) { // Ignore dirty // If parcel selection changed whatever we do except saving to inventory with // old settings will be invalid. + mEditorLastParcelId = nextenv->mParcelId; + mEditorLastRegionId = nextenv->mRegionId; dayeditor->setEditDayCycle(nextenv->mDayCycle); } } @@ -389,6 +388,8 @@ bool LLPanelEnvironmentInfo::setControlsEnabled(bool enabled) getChild<LLUICtrl>(BTN_EDIT)->setEnabled(enabled); getChild<LLUICtrl>(SLD_DAYLENGTH)->setEnabled(enabled && (rdo_selection != 0) && !is_legacy); getChild<LLUICtrl>(SLD_DAYOFFSET)->setEnabled(enabled && (rdo_selection != 0) && !is_legacy); + getChild<LLUICtrl>(SLD_ALTITUDES)->setEnabled(enabled && isRegion() && !is_legacy); + getChild<LLUICtrl>(ICN_GROUND)->setColor((enabled && isRegion() && !is_legacy) ? LLColor4::white : LLColor4::grey % 0.8f); getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setEnabled(enabled && isRegion() && !is_legacy); getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setEnabled(enabled && isRegion() && !is_legacy); getChild<LLUICtrl>(BTN_APPLY)->setEnabled(enabled && (mDirtyFlag != 0)); @@ -614,8 +615,13 @@ void LLPanelEnvironmentInfo::onBtnSelect() LLFloaterSettingsPicker *picker = getSettingsPicker(); if (picker) { + LLUUID item_id; + if (mCurrentEnvironment && mCurrentEnvironment->mDayCycle) + { + item_id = LLFloaterSettingsPicker::findItemID(mCurrentEnvironment->mDayCycle->getAssetId(), false, false); + } picker->setSettingsFilter(LLSettingsType::ST_NONE); - picker->setSettingsAssetId((mCurrentEnvironment && mCurrentEnvironment->mDayCycle) ? mCurrentEnvironment->mDayCycle->getAssetId() : LLUUID::null); + picker->setSettingsItemId(item_id); picker->openFloater(); picker->setFocus(TRUE); } @@ -710,13 +716,17 @@ void LLPanelEnvironmentInfo::onIdlePlay(void *data) ((LLPanelEnvironmentInfo *)data)->udpateApparentTimeOfDay(); } -void LLPanelEnvironmentInfo::onPickerCommitted(LLUUID asset_id) +void LLPanelEnvironmentInfo::onPickerCommitted(LLUUID item_id) { - LLSettingsVOBase::getSettingsAsset(asset_id, [this](LLUUID, LLSettingsBase::ptr_t settings, S32 status, LLExtStat) { - if (status) - return; - onPickerAssetDownloaded(settings); - }); + LLInventoryItem *itemp = gInventory.getItem(item_id); + if (itemp) + { + LLSettingsVOBase::getSettingsAsset(itemp->getAssetUUID(), [this](LLUUID, LLSettingsBase::ptr_t settings, S32 status, LLExtStat) { + if (status) + return; + onPickerAssetDownloaded(settings); + }); + } } void LLPanelEnvironmentInfo::onEditCommitted(LLSettingsDay::ptr_t newday) diff --git a/indra/newview/llpanelenvironment.h b/indra/newview/llpanelenvironment.h index 9bc0b9df9c..3ed631db41 100644 --- a/indra/newview/llpanelenvironment.h +++ b/indra/newview/llpanelenvironment.h @@ -120,7 +120,7 @@ protected: void udpateApparentTimeOfDay(); - void onPickerCommitted(LLUUID asset_id); + void onPickerCommitted(LLUUID item_id); void onEditCommitted(LLSettingsDay::ptr_t newday); void onPickerAssetDownloaded(LLSettingsBase::ptr_t settings); void onEnvironmentReceived(S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo); @@ -171,6 +171,8 @@ private: LLHandle<LLFloater> mSettingsFloater; LLHandle<LLFloater> mEditFloater; S32 mDirtyFlag; + S32 mEditorLastParcelId; + LLUUID mEditorLastRegionId; bool mCrossRegion; bool mNoSelection; bool mNoEnvironment; diff --git a/indra/newview/llsettingspicker.cpp b/indra/newview/llsettingspicker.cpp index f72c7c5dcf..b82be3a23e 100644 --- a/indra/newview/llsettingspicker.cpp +++ b/indra/newview/llsettingspicker.cpp @@ -31,6 +31,7 @@ #include "llfiltereditor.h" #include "llfolderviewmodel.h" #include "llinventory.h" +#include "llinventorybridge.h" #include "llinventoryfunctions.h" #include "llinventorymodelbackgroundfetch.h" #include "llinventoryobserver.h" @@ -47,7 +48,6 @@ namespace const std::string FLT_INVENTORY_SEARCH("flt_inventory_search"); const std::string PNL_INVENTORY("pnl_inventory"); - const std::string CHK_SHOWFOLDERS("chk_showfolders"); const std::string BTN_SELECT("btn_select"); const std::string BTN_CANCEL("btn_cancel"); @@ -57,13 +57,13 @@ namespace } //========================================================================= -LLFloaterSettingsPicker::LLFloaterSettingsPicker(LLView * owner, LLUUID initial_asset_id, const std::string &label, const LLSD ¶ms): +LLFloaterSettingsPicker::LLFloaterSettingsPicker(LLView * owner, LLUUID initial_item_id, const std::string &label, const LLSD ¶ms): LLFloater(params), mOwnerHandle(), mLabel(label), mActive(true), mContextConeOpacity(0.0f), - mSettingAssetID(initial_asset_id), + mSettingItemID(initial_item_id), mImmediateFilterPermMask(PERM_NONE) { mOwnerHandle = owner->getHandle(); @@ -91,9 +91,6 @@ BOOL LLFloaterSettingsPicker::postBuild() setTitle(pick + mLabel); } -// childSetCommitCallback(CHK_SHOWFOLDERS, onShowFolders, this); - getChildView(CHK_SHOWFOLDERS)->setVisible(FALSE); - mFilterEdit = getChild<LLFilterEditor>(FLT_INVENTORY_SEARCH); mFilterEdit->setCommitCallback([this](LLUICtrl*, const LLSD& param){ onFilterEdit(param.asString()); }); @@ -115,9 +112,10 @@ BOOL LLFloaterSettingsPicker::postBuild() // don't put keyboard focus on selected item, because the selection callback // will assume that this was user input - if (!mSettingAssetID.isNull()) + if (!mSettingItemID.isNull()) { - mInventoryPanel->setSelection(findItemID(mSettingAssetID, false), TAKE_FOCUS_NO); + //todo: this is bad idea + mInventoryPanel->setSelection(mSettingItemID, TAKE_FOCUS_NO); } } @@ -147,12 +145,12 @@ void LLFloaterSettingsPicker::onClose(bool app_quitting) void LLFloaterSettingsPicker::setValue(const LLSD& value) { - mSettingAssetID = value.asUUID(); + mSettingItemID = value.asUUID(); } LLSD LLFloaterSettingsPicker::getValue() const { - return LLSD(mSettingAssetID); + return LLSD(mSettingItemID); } void LLFloaterSettingsPicker::setSettingsFilter(LLSettingsType::type_e type) @@ -267,24 +265,24 @@ void LLFloaterSettingsPicker::onSelectionChange(const LLFloaterSettingsPicker::i if (items.size()) { LLFolderViewItem* first_item = items.front(); - LLInventoryItem* itemp = gInventory.getItem(static_cast<LLFolderViewModelItemInventory*>(first_item->getViewModelItem())->getUUID()); + mNoCopySettingsSelected = false; - if (itemp) + if (first_item) { -// if (!mChangeIDSignal.empty()) -// { -// mChangeIDSignal(itemp); -// } - if (!itemp->getPermissions().allowCopyBy(gAgent.getID())) + LLItemBridge *bridge_model = dynamic_cast<LLItemBridge *>(first_item->getViewModelItem()); + if (bridge_model && bridge_model->getItem()) { - mNoCopySettingsSelected = true; - } - setSettingsAssetId(itemp->getAssetUUID(), false); - mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here? + if (!bridge_model->isItemCopyable()) + { + mNoCopySettingsSelected = true; + } + setSettingsItemId(bridge_model->getItem()->getUUID(), false); + mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here? - if (user_action) - { - mChangeIDSignal(mSettingAssetID); + if (user_action) + { + mChangeIDSignal(mSettingItemID); + } } } } @@ -298,24 +296,23 @@ void LLFloaterSettingsPicker::onButtonCancel() void LLFloaterSettingsPicker::onButtonSelect() { if (mCommitSignal) - (*mCommitSignal)(this, LLSD(mSettingAssetID)); + (*mCommitSignal)(this, LLSD(mSettingItemID)); closeFloater(); } BOOL LLFloaterSettingsPicker::handleDoubleClick(S32 x, S32 y, MASK mask) { - if (mSettingAssetID.notNull() + BOOL result = FALSE; + if (mSettingItemID.notNull() && mInventoryPanel) { - LLUUID item_id = findItemID(mSettingAssetID, FALSE); S32 inventory_x = x - mInventoryPanel->getRect().mLeft; S32 inventory_y = y - mInventoryPanel->getRect().mBottom; - if (item_id.notNull() - && mInventoryPanel->parentPointInView(inventory_x, inventory_y)) + if (mInventoryPanel->parentPointInView(inventory_x, inventory_y)) { // make sure item (not folder) is selected - LLFolderViewItem* item_viewp = mInventoryPanel->getItemByID(item_id); - if (item_viewp && item_viewp->isSelected()) + LLFolderViewItem* item_viewp = mInventoryPanel->getItemByID(mSettingItemID); + if (item_viewp && item_viewp->getIsCurSelection()) { LLRect target_rect; item_viewp->localRectToOtherView(item_viewp->getLocalRect(), &target_rect, this); @@ -323,14 +320,20 @@ BOOL LLFloaterSettingsPicker::handleDoubleClick(S32 x, S32 y, MASK mask) { // Quick-apply if (mCommitSignal) - (*mCommitSignal)(this, LLSD(mSettingAssetID)); + (*mCommitSignal)(this, LLSD(mSettingItemID)); closeFloater(); - return TRUE; } } + // hit inside panel on free place or (de)unselected item, double click should do nothing + result = TRUE; } } - return LLFloater::handleDoubleClick(x, y, mask); + + if (!result) + { + result = LLFloater::handleDoubleClick(x, y, mask); + } + return result; } //========================================================================= @@ -339,15 +342,14 @@ void LLFloaterSettingsPicker::setActive(bool active) mActive = active; } -void LLFloaterSettingsPicker::setSettingsAssetId(const LLUUID &settings_id, bool set_selection) +void LLFloaterSettingsPicker::setSettingsItemId(const LLUUID &settings_id, bool set_selection) { - if (mSettingAssetID != settings_id && mActive) + if (mSettingItemID != settings_id && mActive) { mNoCopySettingsSelected = false; mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here? - mSettingAssetID = settings_id; - LLUUID item_id = findItemID(mSettingAssetID, FALSE); - if (item_id.isNull()) + mSettingItemID = settings_id; + if (mSettingItemID.isNull()) { mInventoryPanel->getRootFolder()->clearSelection(); } diff --git a/indra/newview/llsettingspicker.h b/indra/newview/llsettingspicker.h index 7fcc7fd4a7..434eb04c61 100644 --- a/indra/newview/llsettingspicker.h +++ b/indra/newview/llsettingspicker.h @@ -46,9 +46,9 @@ class LLFloaterSettingsPicker : public LLFloater public: typedef std::function<void (LLUUID id)> commit_callback_t; typedef std::function<void()> close_callback_t; - typedef std::function<void(const LLUUID& asset_id)> id_changed_callback_t; + typedef std::function<void(const LLUUID& item_id)> id_changed_callback_t; - LLFloaterSettingsPicker(LLView * owner, LLUUID setting_asset_id, const std::string &label, const LLSD ¶ms = LLSD()); + LLFloaterSettingsPicker(LLView * owner, LLUUID setting_item_id, const std::string &label, const LLSD ¶ms = LLSD()); virtual ~LLFloaterSettingsPicker() override; @@ -58,11 +58,8 @@ public: virtual void onClose(bool app_quitting) override; virtual void draw() override; - void setSettingsAssetId(const LLUUID &settings_id, bool set_selection = true); - LLUUID getSettingsAssetId() const { return mSettingAssetID; } - - void setDefaultSettingsAssetID(LLUUID id) { mDefaultSettingsAssetID = id; } - LLUUID getDefaultSettingsAssetID() const { return mDefaultSettingsAssetID; } + void setSettingsItemId(const LLUUID &settings_id, bool set_selection = true); + LLUUID getSettingsItemId() const { return mSettingItemID; } void setSettingsFilter(LLSettingsType::type_e type); LLSettingsType::type_e getSettingsFilter() const { return mSettingsType; } @@ -71,7 +68,7 @@ public: virtual void setValue(const LLSD& value) override; virtual LLSD getValue() const override; - LLUUID findItemID(const LLUUID& asset_id, bool copyable_only, bool ignore_library = false) + static LLUUID findItemID(const LLUUID& asset_id, bool copyable_only, bool ignore_library = false) { LLInventoryItem *pitem = findItem(asset_id, copyable_only, ignore_library); if (pitem) @@ -79,7 +76,7 @@ public: return LLUUID::null; } - std::string findItemName(const LLUUID& asset_id, bool copyable_only, bool ignore_library = false) + static std::string findItemName(const LLUUID& asset_id, bool copyable_only, bool ignore_library = false) { LLInventoryItem *pitem = findItem(asset_id, copyable_only, ignore_library); if (pitem) @@ -87,7 +84,7 @@ public: return std::string(); } - LLInventoryItem * findItem(const LLUUID& asset_id, bool copyable_only, bool ignore_library); + static LLInventoryItem * findItem(const LLUUID& asset_id, bool copyable_only, bool ignore_library); private: typedef std::deque<LLFolderViewItem *> itemlist_t; @@ -101,8 +98,7 @@ private: LLHandle<LLView> mOwnerHandle; std::string mLabel; - LLUUID mSettingAssetID; - LLUUID mDefaultSettingsAssetID; + LLUUID mSettingItemID; LLFilterEditor * mFilterEdit; LLInventoryPanel * mInventoryPanel; @@ -120,7 +116,7 @@ private: // boost::signals2::signal<void(LLUUID id)> mCommitSignal; boost::signals2::signal<void()> mCloseSignal; - boost::signals2::signal<void(const LLUUID& asset_id)> mChangeIDSignal; + boost::signals2::signal<void(const LLUUID& item_id)> mChangeIDSignal; }; #endif // LL_LLTEXTURECTRL_H diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index c83e27ceed..0d077161a6 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -1609,7 +1609,8 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use } } - bool environment_changed = (parcel->getParcelEnvironmentVersion() != parcel_environment_version); + S32 cur_parcel_environment_version = parcel->getParcelEnvironmentVersion(); + bool environment_changed = (cur_parcel_environment_version != parcel_environment_version); parcel->init(owner_id, FALSE, FALSE, FALSE, @@ -1636,8 +1637,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use parcel->setRegionDenyAnonymousOverride(region_deny_anonymous_override); parcel->setRegionDenyAgeUnverifiedOverride(region_deny_age_unverified_override); parcel->setRegionAllowAccessOverride(region_allow_access_override); - - parcel->setParcelEnvironmentVersion(parcel_environment_version); + parcel->setParcelEnvironmentVersion(cur_parcel_environment_version); parcel->setRegionAllowEnvironmentOverride(region_allow_environment_override); parcel->unpackMessage(msg); @@ -1670,13 +1670,14 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use instance->mTeleportFinishedSignal(instance->mTeleportInProgressPosition, false); } } - + parcel->setParcelEnvironmentVersion(parcel_environment_version); LL_WARNS("LAPRAS") << "Parcel environment version is " << parcel->getParcelEnvironmentVersion() << LL_ENDL; // Notify anything that wants to know when the agent changes parcels gAgent.changeParcels(); } else if (agent_parcel_update) { + parcel->setParcelEnvironmentVersion(parcel_environment_version); // updated agent parcel parcel_mgr.mAgentParcel->unpackMessage(msg); if ((LLEnvironment::instance().isExtendedEnvironmentEnabled() && environment_changed)) diff --git a/indra/newview/skins/default/textures/widgets/track_control_moon_back.png b/indra/newview/skins/default/textures/widgets/track_control_moon_back.png Binary files differindex 73d24e53f6..30f538d35b 100644 --- a/indra/newview/skins/default/textures/widgets/track_control_moon_back.png +++ b/indra/newview/skins/default/textures/widgets/track_control_moon_back.png diff --git a/indra/newview/skins/default/textures/widgets/track_control_moon_front.png b/indra/newview/skins/default/textures/widgets/track_control_moon_front.png Binary files differindex 64def00772..d3882c5e4c 100644 --- a/indra/newview/skins/default/textures/widgets/track_control_moon_front.png +++ b/indra/newview/skins/default/textures/widgets/track_control_moon_front.png diff --git a/indra/newview/skins/default/xui/en/floater_my_environments.xml b/indra/newview/skins/default/xui/en/floater_my_environments.xml index dd05dd5a20..a11a2c1200 100644 --- a/indra/newview/skins/default/xui/en/floater_my_environments.xml +++ b/indra/newview/skins/default/xui/en/floater_my_environments.xml @@ -125,8 +125,8 @@ label="Show Empty Folders" layout="topleft" name="chk_showfolders" - top="0" - left_delta="-3" + top="2" + left_delta="-1" width="200" /> </layout_panel> <layout_panel @@ -139,7 +139,7 @@ <panel background_visible="true" bevel_style="none" - top_pad="0" + top_pad="1" follows="top|left|right" height="30" label="bottom_panel" diff --git a/indra/newview/skins/default/xui/en/floater_settings_picker.xml b/indra/newview/skins/default/xui/en/floater_settings_picker.xml index 2258a1dc24..2862d1ae37 100644 --- a/indra/newview/skins/default/xui/en/floater_settings_picker.xml +++ b/indra/newview/skins/default/xui/en/floater_settings_picker.xml @@ -29,8 +29,6 @@ left="6" right="-6" bottom="-10" - auto_resize="true" - user_resize="true" orientation="vertical"> <layout_panel name="temp" border="false" @@ -49,30 +47,29 @@ name="flt_inventory_search" top="4" right="-2" /> - <inventory_panel + <panel + name="pnl_inv_wrap" + follows="all" + layout="topleft" + left="2" + top="2" + right="-2" + bottom="-2" + background_visible="true" + bg_alpha_color="DkGray2"> + <inventory_panel allow_multi_select="false" suppress_folder_menu="true" bg_visible="true" bg_alpha_color="DkGray2" border="false" - follows="left|top|right|bottom" + follows="all" left_delta="0" name="pnl_inventory" - top="31" + top="1" right="-4" - bottom="-26" - /> - <check_box - follows="left|bottom" - height="14" - initial_value="false" - label="Show folders" - layout="topleft" - name="chk_showfolders" - top="-20" - top_pad="0" - left_delta="-3" - width="200" /> + bottom="-1" /> + </panel> </layout_panel> <layout_panel name="temp" border="false" |