From a0c339f80e4585341179edef1898defd21a0d36a Mon Sep 17 00:00:00 2001 From: Joanna Hulboj Date: Wed, 11 Jan 2017 09:20:07 +0000 Subject: 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 diff --git a/.gitignore b/.gitignore index 41a35b5..0f71819 100644 --- a/.gitignore +++ b/.gitignore @@ -72,3 +72,14 @@ cscope.out cscope.files ctags.sh compile_commands.json + +# Ignore some of the Visual Studio files +/Debug/ +/Release/ +*.VC.db +*.VC.VC.opendb +*.sln +*.vcxproj +*.vcxproj.filters +*.vcxproj.user +*.sdf 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); -- cgit v0.10.2-6-g49f6