Fix Roomlist Shortcuts
Fix the ctrl + pgup/pgdwn shortcuts for the room list so that they work with tree model
BUG: 485949
(cherry picked from commit 28c9d94457)
This commit is contained in:
committed by
Tobias Fella
parent
3786710d81
commit
4dfd4b68eb
@@ -205,4 +205,14 @@ void SortFilterRoomTreeModel::setMode(SortFilterRoomTreeModel::Mode mode)
|
||||
invalidate();
|
||||
}
|
||||
|
||||
QModelIndex SortFilterRoomTreeModel::currentRoomIndex() const
|
||||
{
|
||||
const auto roomModel = dynamic_cast<RoomTreeModel *>(sourceModel());
|
||||
if (roomModel == nullptr) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return mapFromSource(roomModel->indexForRoom(RoomManager::instance().currentRoom()));
|
||||
}
|
||||
|
||||
#include "moc_sortfilterroomtreemodel.cpp"
|
||||
|
||||
@@ -76,6 +76,8 @@ public:
|
||||
Mode mode() const;
|
||||
void setMode(Mode mode);
|
||||
|
||||
Q_INVOKABLE QModelIndex currentRoomIndex() const;
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @brief Returns true if the value of source_left is less than source_right.
|
||||
|
||||
Reference in New Issue
Block a user