summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-07-29 17:48:41 +0300
committerVadim Savchuk <vsavchuk@productengine.com>2010-07-29 17:48:41 +0300
commit45adf1d6124e72be55a5764a72a58cde8b7c85fe (patch)
treef0c1ba4e4053ebc5527ce76396e2c9e93b8cfe98 /indra/llui
parent5e2448347c3b3d071a51a26fc71ea29c779dd7b5 (diff)
EXT-8501 FIXED Check menu items always looked as checked.
Reason: Check menu items (instances of LLMenuItemCheckGL) had used LLUICtrl::getValue() to know whether they should draw the checkmark. Recently this was broken when getValue() was overriden in LLMenuItemCallGL to return a string. Fix: Overriden getValue() in LLMenuItemCheckGL to return a boolean value, not a string. Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/821/ --HG-- branch : product-engine
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llmenugl.cpp9
-rw-r--r--indra/llui/llmenugl.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 8610d79142..12007f7b52 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -928,6 +928,15 @@ void LLMenuItemCheckGL::setValue(const LLSD& value)
}
}
+//virtual
+LLSD LLMenuItemCheckGL::getValue() const
+{
+ // Get our boolean value from the view model.
+ // If we don't override this method then the implementation from
+ // LLMenuItemGL will return a string. (EXT-8501)
+ return LLUICtrl::getValue();
+}
+
// called to rebuild the draw label
void LLMenuItemCheckGL::buildDrawLabel( void )
{
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h
index a484405eaa..bf40163dac 100644
--- a/indra/llui/llmenugl.h
+++ b/indra/llui/llmenugl.h
@@ -322,6 +322,7 @@ public:
virtual void onCommit( void );
virtual void setValue(const LLSD& value);
+ virtual LLSD getValue() const;
// called to rebuild the draw label
virtual void buildDrawLabel( void );