From e4fdc0ba558ec8960796c9663c4a7e2ec92d8916 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Fri, 6 Nov 2009 15:41:05 +0200 Subject: no ticket. major crash in Panel Landmark has been fixed. It was founded while investigating EXT-1607. --HG-- branch : product-engine --- indra/newview/llpanellandmarks.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpanellandmarks.cpp') diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index c516546282..62dc881738 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -829,17 +829,18 @@ bool LLLandmarksPanel::canSelectedBeModified(const std::string& command_name) co // then ask LLFolderView permissions if (can_be_modified) { + LLFolderViewItem* selected = getCurSelectedItem(); if ("cut" == command_name) { can_be_modified = mCurrentSelectedList->getRootFolder()->canCut(); } else if ("rename" == command_name) { - can_be_modified = getCurSelectedItem()->getListener()->isItemRenameable(); + can_be_modified = selected? selected->getListener()->isItemRenameable() : false; } else if ("delete" == command_name) { - can_be_modified = getCurSelectedItem()->getListener()->isItemRemovable(); + can_be_modified = selected? selected->getListener()->isItemRemovable(): false; } else if("paste" == command_name) { -- cgit v1.2.3 From 01c83aa21e616777adf9e1ab0319f95e656e4f7a Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Fri, 6 Nov 2009 18:39:00 +0200 Subject: partial fix for minor bug EXT-1607 Trash and Gear buttons are enabled when nothing is selected. Now gear button will disabled when nothing is selected. --HG-- branch : product-engine --- indra/newview/llpanellandmarks.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llpanellandmarks.cpp') diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 62dc881738..9840c91158 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -499,6 +499,7 @@ void LLLandmarksPanel::updateListCommands() // keep Options & Add Landmark buttons always enabled mListCommands->childSetEnabled(ADD_FOLDER_BUTTON_NAME, add_folder_enabled); mListCommands->childSetEnabled(TRASH_BUTTON_NAME, trash_enabled); + mListCommands->childSetEnabled(OPTIONS_BUTTON_NAME,getCurSelectedItem() != NULL); } void LLLandmarksPanel::onActionsButtonClick() -- cgit v1.2.3