summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorDenis Serdjuk <dserduk@productengine.com>2010-02-22 16:50:31 +0200
committerDenis Serdjuk <dserduk@productengine.com>2010-02-22 16:50:31 +0200
commit09053688c3b35b7c4e33ed831b806220a77ce662 (patch)
treee8fe267d4d36ded97e725ad56a77020cb2973bb3 /indra/newview
parent3759c382d42d45eb9876cd4c1dcbb22b287116d0 (diff)
fixed low Bug EXT-5194 SLURL field dropdown should display empty menu rather than do nothing when empty
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lllocationinputctrl.cpp9
-rw-r--r--indra/newview/lllocationinputctrl.h7
2 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index 04c684b240..a9ead36a70 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -674,6 +674,15 @@ void LLLocationInputCtrl::onLocationPrearrange(const LLSD& data)
_1, filter));
}
}
+ if(mList->isEmpty())
+ {
+ /**
+ * Add a couple of empty items for a better view.
+ * EXT-5194
+ */
+ for(int i = 0; i < NUMBER_OF_EMPTY_ITEMS; i++ )
+ add("", LLSD());
+ }
sortByName();
mList->mouseOverHighlightNthItem(-1); // Clear highlight on the last selected item.
diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h
index 4bb41f3bf4..ee128a5cf7 100644
--- a/indra/newview/lllocationinputctrl.h
+++ b/indra/newview/lllocationinputctrl.h
@@ -120,6 +120,13 @@ private:
ICON_COUNT
};
+ /**
+ * This constant holds number of empty dropdown items, which will be displayed instead of doing nothing when the list is empty.
+ * Added due to EXT-5194
+ */
+ static const S32 NUMBER_OF_EMPTY_ITEMS = 3;
+
+
friend class LLUICtrlFactory;
LLLocationInputCtrl(const Params&);
virtual ~LLLocationInputCtrl();