Fix Ctrl+PgUp/PgDn shortcut for room switching
Before this change, Ctrl+PgUp/PgDown didn't select the next room, but actually moved two rooms at once because the signal handler was called twice. I'm not entirely sure why this happens (it might be a bug in a lower layer?), but as we don't want to handle the same event elsewhere, accepting the event doesn't feel wrong and it appears to fix the issue. So let's just do that. BUG: 459997
This commit is contained in:
@@ -133,8 +133,10 @@ Kirigami.ScrollablePage {
|
||||
|
||||
Keys.onPressed: {
|
||||
if (event.key === Qt.Key_PageDown && (event.modifiers & Qt.ControlModifier)) {
|
||||
event.accepted = true;
|
||||
switchRoomDown();
|
||||
} else if (event.key === Qt.Key_PageUp && (event.modifiers & Qt.ControlModifier)) {
|
||||
event.accepted = true;
|
||||
switchRoomUp();
|
||||
} else if (!(event.modifiers & Qt.ControlModifier) && event.key < Qt.Key_Escape) {
|
||||
event.accepted = true;
|
||||
|
||||
Reference in New Issue
Block a user