diff options
author | Leslie Linden <leslie@lindenlab.com> | 2011-10-19 17:33:10 -0700 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2011-10-19 17:33:10 -0700 |
commit | f3a4a48d8ed20b4bbd65d7cdb9b191c9faf2544b (patch) | |
tree | bc9c2d1e44b031b311d9edec8d5963a7c732c24b /indra/llui/lltoolbar.cpp | |
parent | 04d6bd302ba5809dc6aa1c33d91dc0737af6e033 (diff) |
* Fixed issue where dragging disabled buttons from the toybox to the toybox
would remove them from the surrounding toolbars.
* Removed dead drag & drop code
* Fixed issue where saving didn't necessarily work because toolbar populated
with command id's that didn't have associated names.
Diffstat (limited to 'indra/llui/lltoolbar.cpp')
-rw-r--r-- | indra/llui/lltoolbar.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index c559a2bf1d..bceda9bf54 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -217,7 +217,7 @@ bool LLToolBar::addCommand(const LLCommandId& commandId, int rank) if ((rank >= mButtonCommands.size()) || (rank == RANK_NONE)) { // In that case, back load - mButtonCommands.push_back(commandId); + mButtonCommands.push_back(command->id()); mButtons.push_back(button); } else @@ -232,7 +232,7 @@ bool LLToolBar::addCommand(const LLCommandId& commandId, int rank) rank--; } // ...then insert - mButtonCommands.insert(it_command,commandId); + mButtonCommands.insert(it_command, command->id()); mButtons.insert(it_button,button); } @@ -821,7 +821,7 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id) if (!commandp) return NULL; LLToolBarButton::Params button_p; - button_p.name = id.name(); + button_p.name = commandp->id().name(); // Make sure to retrieve the name from the command itself, not the passed in id button_p.label = LLTrans::getString(commandp->labelRef()); button_p.tool_tip = LLTrans::getString(commandp->tooltipRef()); button_p.image_overlay = LLUI::getUIImage(commandp->icon()); @@ -999,13 +999,13 @@ BOOL LLToolBarButton::handleHover(S32 x, S32 y, MASK mask) { if (!mIsDragged) { - mStartDragItemCallback(x,y,mId.uuid()); + mStartDragItemCallback(x, y, this); mIsDragged = true; handled = TRUE; } else { - handled = mHandleDragItemCallback(x,y,mId.uuid(),LLAssetType::AT_WIDGET); + handled = mHandleDragItemCallback(x, y, mId.uuid(), LLAssetType::AT_WIDGET); } } else |