summaryrefslogtreecommitdiff
path: root/indra/llui/llmenugl.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-10-03 19:46:29 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-10-03 19:55:49 +0300
commit878fb36a0bb632f5e541b132a7ded5eb047ff947 (patch)
tree9280a9ce33ddec5e186526077c7edcba2f6fe736 /indra/llui/llmenugl.cpp
parentbcfd5d5279f1796abaf347d2276d2a0b9983f35e (diff)
parent2465470817957c8378e81ec1a7e32551fbac7b26 (diff)
Merge branch 'main' into DRTVWR-591-maint-X
# Conflicts: # indra/newview/app_settings/settings.xml # indra/newview/llinventorybridge.cpp # indra/newview/lltexturectrl.h # indra/newview/llvovolume.cpp
Diffstat (limited to 'indra/llui/llmenugl.cpp')
-rw-r--r--indra/llui/llmenugl.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index fe25ac1647..10da3fb7e0 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();