From 1eeecfa1a8bf43a8980217ce34e3b5f4458483e0 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 14 May 2024 15:11:45 +0300 Subject: viewer#1425 Sorting in Appearance floater --- indra/llui/llflatlistview.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/llui/llflatlistview.h') diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index adb0e3e553..e42cae8985 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -480,7 +480,11 @@ public: bool getForceShowingUnmatchedItems(); - void setForceShowingUnmatchedItems(bool show); + /** + * Sets filtered out items to stay visible. Can result in rect changes, + * so can notify_parent if rect changes + */ + void setForceShowingUnmatchedItems(bool show, bool notify_parent); /** * Sets up new filter string and filters the list. -- cgit v1.2.3 From 9c3ce3dec7ad01620213079204d0a43d193bbfb9 Mon Sep 17 00:00:00 2001 From: Ansariel Hiller Date: Wed, 2 Oct 2024 22:51:10 +0200 Subject: Clean up LLUI and fix/add suggestions from VS (#2746) # Conflicts: # indra/llui/lltextbase.h # indra/llui/lltexteditor.h # indra/llwindow/llwindowsdl.cpp --- indra/llui/llflatlistview.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/llui/llflatlistview.h') diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index 6d75e9f282..3c40f91ab0 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -126,10 +126,10 @@ public: /** Returns full rect of child panel */ const LLRect& getItemsRect() const; - LLRect getRequiredRect() { return getItemsRect(); } + LLRect getRequiredRect() const { return getItemsRect(); } /** Returns distance between items */ - const S32 getItemsPad() { return mItemPad; } + const S32 getItemsPad() const { return mItemPad; } /** * Adds and item and LLSD value associated with it to the list at specified position @@ -264,7 +264,7 @@ public: void setCommitOnSelectionChange(bool b) { mCommitOnSelectionChange = b; } /** Get number of selected items in the list */ - U32 numSelected() const {return static_cast(mSelectedItemPairs.size()); } + U32 numSelected() const { return static_cast(mSelectedItemPairs.size()); } /** Get number of (visible) items in the list */ U32 size(const bool only_visible_items = true) const; @@ -294,8 +294,8 @@ public: void scrollToShowFirstSelectedItem(); - void selectFirstItem (); - void selectLastItem (); + void selectFirstItem(); + void selectLastItem(); virtual S32 notify(const LLSD& info) ; @@ -478,7 +478,7 @@ public: void setNoItemsMsg(const std::string& msg) { mNoItemsMsg = msg; } void setNoFilteredItemsMsg(const std::string& msg) { mNoFilteredItemsMsg = msg; } - bool getForceShowingUnmatchedItems(); + bool getForceShowingUnmatchedItems() const; void setForceShowingUnmatchedItems(bool show); @@ -486,7 +486,7 @@ public: * Sets up new filter string and filters the list. */ void setFilterSubString(const std::string& filter_str, bool notify_parent); - std::string getFilterSubString() { return mFilterSubString; } + std::string getFilterSubString() const { return mFilterSubString; } /** * Filters the list, rearranges and notifies parent about shape changes. -- cgit v1.2.3 From 1c3ce46d34293f0e1dc5887ef98b05921af663c9 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Fri, 18 Apr 2025 18:43:46 +0300 Subject: Restore missing 'override' --- indra/llui/llflatlistview.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'indra/llui/llflatlistview.h') diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index c459d81c90..5c5621019d 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -113,7 +113,7 @@ public: }; // disable traversal when finding widget to hand focus off to - /*virtual*/ bool canFocusChildren() const { return false; } + /*virtual*/ bool canFocusChildren() const override { return false; } /** * Connects callback to signal called when Return key is pressed. @@ -121,12 +121,12 @@ public: boost::signals2::connection setReturnCallback( const commit_signal_t::slot_type& cb ) { return mOnReturnSignal.connect(cb); } /** Overridden LLPanel's reshape, height is ignored, the list sets its height to accommodate all items */ - virtual void reshape(S32 width, S32 height, bool called_from_parent = true); + virtual void reshape(S32 width, S32 height, bool called_from_parent = true) override; /** Returns full rect of child panel */ const LLRect& getItemsRect() const; - LLRect getRequiredRect() const { return getItemsRect(); } + LLRect getRequiredRect() override { return getItemsRect(); } /** Returns distance between items */ const S32 getItemsPad() const { return mItemPad; } @@ -270,7 +270,7 @@ public: U32 size(const bool only_visible_items = true) const; /** Removes all items from the list */ - virtual void clear(); + virtual void clear() override; /** * Removes all items that can be detached from the list but doesn't destroy @@ -297,7 +297,7 @@ public: void selectFirstItem(); void selectLastItem(); - virtual S32 notify(const LLSD& info) ; + virtual S32 notify(const LLSD& info) override; virtual ~LLFlatListView(); @@ -346,8 +346,8 @@ protected: virtual bool selectNextItemPair(bool is_up_direction, bool reset_selection); - virtual bool canSelectAll() const; - virtual void selectAll(); + virtual bool canSelectAll() const override; + virtual void selectAll() override; virtual bool isSelected(item_pair_t* item_pair) const; @@ -364,15 +364,15 @@ protected: */ void notifyParentItemsRectChanged(); - virtual bool handleKeyHere(KEY key, MASK mask); + virtual bool handleKeyHere(KEY key, MASK mask) override; - virtual bool postBuild(); + virtual bool postBuild() override; - virtual void onFocusReceived(); + virtual void onFocusReceived() override; - virtual void onFocusLost(); + virtual void onFocusLost() override; - virtual void draw(); + virtual void draw() override; LLRect getLastSelectedItemRect(); -- cgit v1.2.3