From f3a4a48d8ed20b4bbd65d7cdb9b191c9faf2544b Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Wed, 19 Oct 2011 17:33:10 -0700 Subject: * 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. --- indra/newview/llfloatertoybox.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/newview/llfloatertoybox.cpp') diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp index b4c9894271..66f644748e 100644 --- a/indra/newview/llfloatertoybox.cpp +++ b/indra/newview/llfloatertoybox.cpp @@ -39,7 +39,6 @@ LLFloaterToybox::LLFloaterToybox(const LLSD& key) : LLFloater(key) - , mBtnRestoreDefaults(NULL) , mToolBar(NULL) { mCommitCallbackRegistrar.add("Toybox.RestoreDefaults", boost::bind(&LLFloaterToybox::onBtnRestoreDefaults, this)); @@ -59,20 +58,19 @@ bool compare_localized_command_labels(LLCommand * cmd1, LLCommand * cmd2) BOOL LLFloaterToybox::postBuild() { - mBtnRestoreDefaults = getChild("btn_restore_defaults"); mToolBar = getChild("toybox_toolbar"); + mToolBar->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3)); mToolBar->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4)); mToolBar->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4)); - LLCommandManager& cmdMgr = LLCommandManager::instance(); - // // Sort commands by localized labels so they will appear alphabetized in all languages // std::list alphabetized_commands; + LLCommandManager& cmdMgr = LLCommandManager::instance(); for (U32 i = 0; i < cmdMgr.commandCount(); i++) { LLCommand * command = cmdMgr.getCommand(i); -- cgit v1.2.3