summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoanna Hulboj <joanna.hulboj@isode.com>2017-01-11 09:20:07 (GMT)
committerJoanna Hulboj <joanna.hulboj@isode.com>2017-01-11 09:20:57 (GMT)
commita0c339f80e4585341179edef1898defd21a0d36a (patch)
tree9eec5ff9da0c75f1df0965a13829e4cde4fb9d79 /Swift/QtUI/Trellis
parent6e1b4401f1aaf639293a2bc5b0669b6a07cedeb7 (diff)
downloadswift-a0c339f80e4585341179edef1898defd21a0d36a.zip
swift-a0c339f80e4585341179edef1898defd21a0d36a.tar.bz2
Allow cancelling trellis resize window with escape key
Test-Information: From view menu chose "Change Layout". Cancelled the trellis resizer using Escape. Change-Id: I82e196f813cf34db9b50d812ce0597975432869f
Diffstat (limited to 'Swift/QtUI/Trellis')
-rw-r--r--Swift/QtUI/Trellis/QtGridSelectionDialog.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Swift/QtUI/Trellis/QtGridSelectionDialog.cpp b/Swift/QtUI/Trellis/QtGridSelectionDialog.cpp
index f03d0ec..f67a4b8 100644
--- a/Swift/QtUI/Trellis/QtGridSelectionDialog.cpp
+++ b/Swift/QtUI/Trellis/QtGridSelectionDialog.cpp
@@ -87,6 +87,10 @@ void QtGridSelectionDialog::keyReleaseEvent(QKeyEvent* event) {
hide();
setCurrentGridSize(currentGridSize);
}
+ else if (event->key() == Qt::Key_Escape) {
+ hide();
+ }
+
if (minGridSize.expandedTo(newGridSize).boundedTo(maxGridSize) != currentGridSize) {
currentGridSize = minGridSize.expandedTo(newGridSize).boundedTo(maxGridSize);