Skip to content
Snippets Groups Projects
Commit 3ddd44e5 authored by Igor Borovkov's avatar Igor Borovkov
Browse files

EXT-8329 FIXED added updating Plus button on COF changes

added updating Plus button (Wear Item button) on COF changes (only when Edit Outfit panel is trully visible)

Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/742/

--HG--
branch : product-engine
parent 885442eb
No related branches found
No related tags found
No related merge requests found
...@@ -348,8 +348,8 @@ BOOL LLPanelOutfitEdit::postBuild() ...@@ -348,8 +348,8 @@ BOOL LLPanelOutfitEdit::postBuild()
mInventoryItemsPanel = getChild<LLInventoryPanel>("folder_view"); mInventoryItemsPanel = getChild<LLInventoryPanel>("folder_view");
mInventoryItemsPanel->setFilterTypes(ALL_ITEMS_MASK); mInventoryItemsPanel->setFilterTypes(ALL_ITEMS_MASK);
mInventoryItemsPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); mInventoryItemsPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this)); mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::updatePlusButton, this));
mInventoryItemsPanel->getRootFolder()->setReshapeCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this)); mInventoryItemsPanel->getRootFolder()->setReshapeCallback(boost::bind(&LLPanelOutfitEdit::updatePlusButton, this));
mCOFDragAndDropObserver = new LLCOFDragAndDropObserver(mInventoryItemsPanel->getModel()); mCOFDragAndDropObserver = new LLCOFDragAndDropObserver(mInventoryItemsPanel->getModel());
...@@ -389,7 +389,7 @@ BOOL LLPanelOutfitEdit::postBuild() ...@@ -389,7 +389,7 @@ BOOL LLPanelOutfitEdit::postBuild()
mWearablesListViewPanel = getChild<LLPanel>("filtered_wearables_panel"); mWearablesListViewPanel = getChild<LLPanel>("filtered_wearables_panel");
mWearableItemsList = getChild<LLInventoryItemsList>("list_view"); mWearableItemsList = getChild<LLInventoryItemsList>("list_view");
mWearableItemsList->setCommitOnSelectionChange(true); mWearableItemsList->setCommitOnSelectionChange(true);
mWearableItemsList->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this)); mWearableItemsList->setCommitCallback(boost::bind(&LLPanelOutfitEdit::updatePlusButton, this));
mWearableItemsList->setDoubleClickCallback(boost::bind(&LLPanelOutfitEdit::onPlusBtnClicked, this)); mWearableItemsList->setDoubleClickCallback(boost::bind(&LLPanelOutfitEdit::onPlusBtnClicked, this));
mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this)); mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this));
...@@ -738,7 +738,7 @@ void LLPanelOutfitEdit::onEditWearableClicked(void) ...@@ -738,7 +738,7 @@ void LLPanelOutfitEdit::onEditWearableClicked(void)
} }
} }
void LLPanelOutfitEdit::onInventorySelectionChange() void LLPanelOutfitEdit::updatePlusButton()
{ {
uuid_vec_t selected_items; uuid_vec_t selected_items;
getSelectedItemsUUID(selected_items); getSelectedItemsUUID(selected_items);
...@@ -981,6 +981,9 @@ void LLPanelOutfitEdit::updateVerbs() ...@@ -981,6 +981,9 @@ void LLPanelOutfitEdit::updateVerbs()
mStatus->setText(outfit_is_dirty ? getString("unsaved_changes") : getString("now_editing")); mStatus->setText(outfit_is_dirty ? getString("unsaved_changes") : getString("now_editing"));
updateCurrentOutfitName(); updateCurrentOutfitName();
//updating state of "Wear Item" button previously known as "Plus" button
updatePlusButton();
} }
bool LLPanelOutfitEdit::switchPanels(LLPanel* switch_from_panel, LLPanel* switch_to_panel) bool LLPanelOutfitEdit::switchPanels(LLPanel* switch_from_panel, LLPanel* switch_to_panel)
......
...@@ -145,7 +145,7 @@ class LLPanelOutfitEdit : public LLPanel ...@@ -145,7 +145,7 @@ class LLPanelOutfitEdit : public LLPanel
void onFolderViewFilterCommitted(LLUICtrl* ctrl); void onFolderViewFilterCommitted(LLUICtrl* ctrl);
void onListViewFilterCommitted(LLUICtrl* ctrl); void onListViewFilterCommitted(LLUICtrl* ctrl);
void onSearchEdit(const std::string& string); void onSearchEdit(const std::string& string);
void onInventorySelectionChange(); void updatePlusButton();
void onPlusBtnClicked(void); void onPlusBtnClicked(void);
void onVisibilityChange(const LLSD &in_visible_chain); void onVisibilityChange(const LLSD &in_visible_chain);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment