diff options
| author | Merov Linden <merov@lindenlab.com> | 2011-09-27 19:45:38 -0700 |
|---|---|---|
| committer | Merov Linden <merov@lindenlab.com> | 2011-09-27 19:45:38 -0700 |
| commit | 1bdfe7ec471efb94acc4a8f98e8084c08199c9da (patch) | |
| tree | 93f844ff1083d18bd076b6f884ab0a22cbf530ae /indra/llui/lltoolbar.cpp | |
| parent | 3a473bd8ca301a5cd7e0284e40da890d598d394d (diff) | |
| parent | 9eef4b6c569b48975cd74ef80b1393febe1387d8 (diff) | |
EXP-1202 : pull from richard/viewer-experience-fui
Diffstat (limited to 'indra/llui/lltoolbar.cpp')
| -rw-r--r-- | indra/llui/lltoolbar.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 8249df3e9d..677d50a0c7 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -30,6 +30,7 @@ #include <boost/foreach.hpp> #include "lltoolbar.h" +#include "llcommandmanager.h" #include "llmenugl.h" #include "lltrans.h" @@ -206,8 +207,8 @@ bool LLToolBar::addCommand(const LLCommandId& commandId) if (add_command) { - mButtonCommands.push_back(commandId); - createButtons(); + mButtonCommands.push_back(commandId); + createButtons(); } return add_command; @@ -251,7 +252,9 @@ bool LLToolBar::enableCommand(const LLCommandId& commandId, bool enabled) BOOL LLToolBar::handleRightMouseDown(S32 x, S32 y, MASK mask) { - BOOL handle_it_here = !mReadOnly; + LLRect button_panel_rect; + mButtonPanel->localRectToOtherView(mButtonPanel->getLocalRect(), &button_panel_rect, this); + BOOL handle_it_here = !mReadOnly && button_panel_rect.pointInRect(x, y); if (handle_it_here) { |
