diff options
| author | Richard Nelson <richard@lindenlab.com> | 2011-10-14 18:25:30 -0700 |
|---|---|---|
| committer | Richard Nelson <richard@lindenlab.com> | 2011-10-14 18:25:30 -0700 |
| commit | 0976964f8315aab5879678f07318267b6887ed95 (patch) | |
| tree | 4d9f82393756de80880d5708a2226f022db11c5a /indra/llui/lltoolbar.cpp | |
| parent | cf98cdf69f481dd473363d4a80a80f27e96f87e8 (diff) | |
EXP-1336 FIX Move Notifications to upper right
also made toolbar buttons not trigger if enabled callback returns false
Diffstat (limited to 'indra/llui/lltoolbar.cpp')
| -rw-r--r-- | indra/llui/lltoolbar.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 7fcd1da7b1..bd2b55c105 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -668,6 +668,7 @@ void LLToolBar::draw() if (command && btn->mIsEnabledSignal) { const bool button_command_enabled = (*btn->mIsEnabledSignal)(btn, command->isEnabledParameters()); + // TODO: make button appear disabled but have it still respond to drag and drop btn->setEnabled(button_command_enabled); } @@ -941,6 +942,16 @@ void LLToolBarButton::onMouseCaptureLost() mIsDragged = false; } +void LLToolBarButton::onCommit() +{ + LLCommand* command = LLCommandManager::instance().getCommand(mId); + + if (!mIsEnabledSignal || (*mIsEnabledSignal)(this, command->isEnabledParameters())) + { + LLButton::onCommit(); + } +} + void LLToolBarButton::reshape(S32 width, S32 height, BOOL called_from_parent) { LLButton::reshape(mWidthRange.clamp(width), height, called_from_parent); @@ -967,6 +978,3 @@ const std::string LLToolBarButton::getToolTip() const - - - |
