summary refs log tree commit diff
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-07-21 14:57:56 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-07-21 14:57:56 +0300
commit73e3161c88c7e10afe9780fd688ce7b977b0b81e (patch)
tree069d6c721220a9778299077434ab4c5e9383ecbd
parentReuse the profile modal & adjust its spacing relative to the font size (diff)
downloadnheko-73e3161c88c7e10afe9780fd688ce7b977b0b81e.tar.xz
Disable paint updates while applying room filtering (#380)
-rw-r--r--src/RoomList.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/RoomList.cpp b/src/RoomList.cpp
index 771081b9..7a88b31b 100644
--- a/src/RoomList.cpp
+++ b/src/RoomList.cpp
@@ -355,6 +355,9 @@ RoomList::removeFilter()
 void
 RoomList::applyFilter(const std::map<QString, bool> &filter)
 {
+        // Disabling paint updates will resolve issues with screen flickering on big room lists.
+        setUpdatesEnabled(false);
+
         for (int i = 0; i < contentsLayout_->count(); i++) {
                 // If filter contains the room for the current RoomInfoListItem,
                 // show the list item, otherwise hide it
@@ -370,6 +373,8 @@ RoomList::applyFilter(const std::map<QString, bool> &filter)
                         listitem->hide();
         }
 
+        setUpdatesEnabled(true);
+
         // If the already selected room is part of the group, make sure it's visible.
         if (!selectedRoom_.isEmpty() && (filter.find(selectedRoom_) != filter.end()))
                 return;