diff options
Diffstat (limited to 'indra/newview/llpanellandmarks.cpp')
-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) { |