diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-12-17 21:16:54 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-12-17 21:16:54 -0500 |
commit | cd276a208b51f840178b6ff49711ba6e78940185 (patch) | |
tree | 3bb27021724835519defa4f99f9cba451f2fad7d /indra | |
parent | 541f7f88c257838d79c09e73cfbec4a638c1679c (diff) |
EXT-1607 : Trash and Gear buttons are enabled when nothing is selected
UI wasn't being updated when nothing is selected.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpanellandmarks.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 35cd3edc81..e16bac2098 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -233,11 +233,6 @@ void LLLandmarksPanel::onSelectionChange(LLInventorySubTreePanel* inventory_list deselectOtherThan(inventory_list); mCurrentSelectedList = inventory_list; } - - LLFolderViewItem* current_item = inventory_list->getRootFolder()->getCurSelectedItem(); - if (!current_item) - return; - updateVerbs(); } @@ -246,6 +241,7 @@ void LLLandmarksPanel::onSelectorButtonClicked() // TODO: mantipov: update getting of selected item // TODO: bind to "i" button LLFolderViewItem* cur_item = mFavoritesInventoryPanel->getRootFolder()->getCurSelectedItem(); + if (!cur_item) return; LLFolderViewEventListener* listenerp = cur_item->getListener(); if (listenerp->getInventoryType() == LLInventoryType::IT_LANDMARK) @@ -334,6 +330,7 @@ void LLLandmarksPanel::processParcelInfo(const LLParcelData& parcel_data) if(isLandmarkSelected()) { LLFolderViewItem* cur_item = getCurSelectedItem(); + if (!cur_item) return; LLUUID id = cur_item->getListener()->getUUID(); LLInventoryItem* inv_item = mCurrentSelectedList->getModel()->getItem(id); doActionOnCurSelectedLandmark(boost::bind( @@ -761,7 +758,7 @@ void LLLandmarksPanel::onCustomAction(const LLSD& userdata) { LLFolderViewItem* cur_item = getCurSelectedItem(); if(!cur_item) - return ; + return; std::string command_name = userdata.asString(); if("more_info" == command_name) { @@ -865,18 +862,18 @@ bool LLLandmarksPanel::canSelectedBeModified(const std::string& command_name) co // then ask LLFolderView permissions if (can_be_modified) { - LLFolderViewItem* selected = getCurSelectedItem(); + LLFolderViewItem* selected = getCurSelectedItem(); if ("cut" == command_name) { can_be_modified = mCurrentSelectedList->getRootFolder()->canCut(); } else if ("rename" == command_name) { - can_be_modified = selected? selected->getListener()->isItemRenameable() : false; + can_be_modified = selected ? selected->getListener()->isItemRenameable() : false; } else if ("delete" == command_name) { - can_be_modified = selected? selected->getListener()->isItemRemovable(): false; + can_be_modified = selected ? selected->getListener()->isItemRemovable(): false; } else if("paste" == command_name) { |