summary refs log tree commit diff
path: root/src/RoomList.cc
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-08-15 21:06:27 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-08-15 21:06:27 +0300
commit8d81489e053c28173ca864064774bd07e2758a1d (patch)
treeca166acddaea998f70b22d8dbe3fa27ebb8115ed /src/RoomList.cc
parentFocus on the text input when switching rooms (diff)
downloadnheko-8d81489e053c28173ca864064774bd07e2758a1d.tar.xz
Ghetto room switcher
Diffstat (limited to 'src/RoomList.cc')
-rw-r--r--src/RoomList.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/RoomList.cc b/src/RoomList.cc

index 042391a2..a35ef2f8 100644 --- a/src/RoomList.cc +++ b/src/RoomList.cc
@@ -166,8 +166,12 @@ void RoomList::highlightSelectedRoom(const QString &room_id) calculateUnreadMessageCount(); for (auto it = rooms_.constBegin(); it != rooms_.constEnd(); it++) { - if (it.key() != room_id) + if (it.key() != room_id) { it.value()->setPressedState(false); + } else { + it.value()->setPressedState(true); + scrollArea_->ensureWidgetVisible(qobject_cast<QWidget *>(it.value().data())); + } } }