diff options
| author | dolphin <dolphin@lindenlab.com> | 2013-04-02 15:04:41 -0700 |
|---|---|---|
| committer | dolphin <dolphin@lindenlab.com> | 2013-04-02 15:04:41 -0700 |
| commit | f684d897f532bcba87cda1f72bd19efac82f6cb6 (patch) | |
| tree | 6222ff28ee7825e987a127383a081297a80d7e6c /indra/llui/lltoolbar.cpp | |
| parent | 4bdecca57ec82a5dbc323432b7b5cb6aba9c1303 (diff) | |
| parent | 90b56ee9fa95ca8cc15e3abc81977f504eb32c5b (diff) | |
Merge with viewer-development
Diffstat (limited to 'indra/llui/lltoolbar.cpp')
| -rw-r--r-- | indra/llui/lltoolbar.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 63b7e452d2..1c74395c66 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -872,8 +872,15 @@ void LLToolBar::reshape(S32 width, S32 height, BOOL called_from_parent) void LLToolBar::createButtons() { + std::set<LLUUID> set_flashing; + BOOST_FOREACH(LLToolBarButton* button, mButtons) { + if (button->getFlashTimer() && button->getFlashTimer()->isFlashingInProgress()) + { + set_flashing.insert(button->getCommandId().uuid()); + } + if (mButtonRemoveSignal) { (*mButtonRemoveSignal)(button); @@ -896,6 +903,11 @@ void LLToolBar::createButtons() { (*mButtonAddSignal)(button); } + + if (set_flashing.find(button->getCommandId().uuid()) != set_flashing.end()) + { + button->setFlashing(true); + } } mNeedsLayout = true; } @@ -920,6 +932,7 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id) button_p.label = LLTrans::getString(commandp->labelRef()); button_p.tool_tip = LLTrans::getString(commandp->tooltipRef()); button_p.image_overlay = LLUI::getUIImage(commandp->icon()); + button_p.button_flash_enable = commandp->isFlashingAllowed(); button_p.overwriteFrom(mButtonParams[mButtonType]); LLToolBarButton* button = LLUICtrlFactory::create<LLToolBarButton>(button_p); @@ -1046,10 +1059,9 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, // Convert drag position into insert position and rank if (!isReadOnly() && handled && !drop) { - LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data; - LLAssetType::EType type = inv_item->getType(); - if (type == LLAssetType::AT_WIDGET) + if (cargo_type == DAD_WIDGET) { + LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data; LLCommandId dragged_command(inv_item->getUUID()); int orig_rank = getRankFromPosition(dragged_command); mDragRank = getRankFromPosition(x, y); |
