diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2023-10-03 19:28:18 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2023-10-03 19:42:47 +0300 |
commit | 13f1273c1d0cd7af382b282bd54da2b7efcc70b3 (patch) | |
tree | 31a0e89bd7fe86a91b0fccf3f33642af0741c7bc /indra/llui/llmenugl.cpp | |
parent | 78f5dbd95f1295af14093807ca125b92e6f5a9d3 (diff) | |
parent | 2465470817957c8378e81ec1a7e32551fbac7b26 (diff) |
Merge branch 'main' into DRTVWR-588-maint-W
# Conflicts:
# indra/llui/lltooltip.h
# indra/newview/llinventoryfunctions.cpp
# indra/newview/llvovolume.cpp
# indra/newview/skins/default/textures/textures.xml
Diffstat (limited to 'indra/llui/llmenugl.cpp')
-rw-r--r-- | indra/llui/llmenugl.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 73ac72ac56..c26b0b9828 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -573,13 +573,13 @@ void LLMenuItemGL::onVisibilityChange(BOOL new_visibility) // // This class represents a separator. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -LLMenuItemSeparatorGL::Params::Params() -{ -} - LLMenuItemSeparatorGL::LLMenuItemSeparatorGL(const LLMenuItemSeparatorGL::Params& p) : LLMenuItemGL( p ) { + if (p.on_visible.isProvided()) + { + mVisibleSignal.connect(initEnableCallback(p.on_visible)); + } } //virtual @@ -596,6 +596,15 @@ void LLMenuItemSeparatorGL::draw( void ) gl_line_2d( PAD, y, getRect().getWidth() - PAD, y ); } +void LLMenuItemSeparatorGL::buildDrawLabel( void ) +{ + if (mVisibleSignal.num_slots() > 0) + { + bool visible = mVisibleSignal(this, LLSD()); + setVisible(visible); + } +} + BOOL LLMenuItemSeparatorGL::handleMouseDown(S32 x, S32 y, MASK mask) { LLMenuGL* parent_menu = getMenu(); |