diff options
author | Richard Nelson <richard@lindenlab.com> | 2007-02-17 03:02:16 +0000 |
---|---|---|
committer | Richard Nelson <richard@lindenlab.com> | 2007-02-17 03:02:16 +0000 |
commit | 73bc0fb42b5bcd80030d9f30d5cb57ec2397ba08 (patch) | |
tree | e7c0b2e22d4719123fd688e49a16b76a084c3f77 /indra/llui | |
parent | 12ac04231b8d358e70c830f7958f7efbc0f7c0d1 (diff) |
merge -r 56779:58057 /branches/selection_management
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llfloater.cpp | 7 | ||||
-rw-r--r-- | indra/llui/llfloater.h | 3 | ||||
-rw-r--r-- | indra/llui/llmenugl.cpp | 18 |
3 files changed, 22 insertions, 6 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 5d4711ef10..22d898c5ce 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -527,6 +527,8 @@ void LLFloater::open() /* Flawfinder: ignore */ make_ui_sound("UISndWindowOpen"); } } + + onOpen(); } void LLFloater::close(bool app_quitting) @@ -1337,6 +1339,11 @@ void LLFloater::draw() } // virtual +void LLFloater::onOpen() +{ +} + +// virtual void LLFloater::onClose(bool app_quitting) { destroy(); diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index c1ef54ed42..a743081335 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -157,6 +157,9 @@ public: virtual void draw(); + // does nothing by default + virtual void onOpen(); + // Call destroy() to free memory, or setVisible(FALSE) to keep it // If app_quitting, you might not want to save your visibility. // Defaults to destroy(). diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 6ec0719ad5..7aaa306f05 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -385,11 +385,7 @@ void LLMenuItemGL::doIt( void ) { // close all open menus by default // if parent menu is actually visible (and we are not triggering menu item via accelerator) - // HACK: do not call hidemenus() from a pie menu item, as most pie menu operations - // assume that the thing you clicked on stays selected (parcel and/or object) after the - // pie menu is gone --RN - if (getMenu()->getWidgetType() != WIDGET_TYPE_PIE_MENU - && !getMenu()->getTornOff() + if (!getMenu()->getTornOff() && getMenu()->getVisible()) { LLMenuGL::sMenuContainer->hideMenus(); @@ -3283,7 +3279,7 @@ void LLPieMenuBranch::doIt( void ) S32 center_y; parent->localPointToScreen(rect.getWidth() / 2, rect.getHeight() / 2, ¢er_x, ¢er_y); - parent->hide(TRUE); + parent->hide(FALSE); mBranch->show( center_x, center_y, FALSE ); } @@ -3473,6 +3469,11 @@ BOOL LLPieMenu::handleMouseDown( S32 x, S32 y, MASK mask ) // to make sure it's within the item's rectangle handled = item->handleMouseDown( 0, 0, mask ); } + else if (!mRightMouseDown) + { + // call hidemenus to make sure transient selections get cleared + ((LLMenuHolderGL*)getParent())->hideMenus(); + } // always handle mouse down as mouse up will close open menus return handled; @@ -3546,6 +3547,11 @@ BOOL LLPieMenu::handleMouseUp( S32 x, S32 y, MASK mask ) hide(TRUE); } } + else if (!mRightMouseDown) + { + // call hidemenus to make sure transient selections get cleared + ((LLMenuHolderGL*)getParent())->hideMenus(); + } if (handled) { |