From 6f9fde311f0307de690c0a8e1aeef19719aafe6f Mon Sep 17 00:00:00 2001 From: Tats Date: Sat, 26 Mar 2016 19:40:51 -0400 Subject: [PATCH] Fixed bug: ESC key would not work properly to exit full screen. --- MainWindow.cpp | 11 +++-------- MainWindow.h | 2 +- OutputGLWindow.cpp | 6 ------ 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/MainWindow.cpp b/MainWindow.cpp index f06f9d5..d353685 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -1637,7 +1637,7 @@ void MainWindow::createActions() closeOutput->setShortcut(Qt::Key_Escape); closeOutput->setShortcutContext(Qt::ApplicationShortcut); addAction(closeOutput); - connect(closeOutput, SIGNAL(triggered(bool)), outputWindow, SLOT(close())); + connect(closeOutput, SIGNAL(triggered(bool)), this, SLOT(exitFullScreen())); // Toggle display of canvas controls. displayControlsAction = new QAction(tr("&Display Canvas Controls"), this); @@ -2927,14 +2927,9 @@ void MainWindow::pollOscInterface() #endif } -void MainWindow::updateOutputAction(int screen) +void MainWindow::exitFullScreen() { - // Change window (untested). - if (outputWindow->isFullScreen()) - { - outputWindow->setFullScreen(false); - outputWindow->setFullScreen(true); - } + outputFullScreenAction->setChecked(false); } // void MainWindow::applyOscCommand(const QVariantList& command) diff --git a/MainWindow.h b/MainWindow.h index 0f75113..a058043 100644 --- a/MainWindow.h +++ b/MainWindow.h @@ -129,7 +129,7 @@ private slots: // Other. void windowModified(); void pollOscInterface(); - void updateOutputAction(int screen); + void exitFullScreen(); public slots: diff --git a/OutputGLWindow.cpp b/OutputGLWindow.cpp index ca5e3da..7f0e0bd 100644 --- a/OutputGLWindow.cpp +++ b/OutputGLWindow.cpp @@ -61,12 +61,6 @@ OutputGLWindow:: OutputGLWindow(QWidget* parent, const MapperGLCanvas* canvas_) // //} -{ - - { - } - else -} void OutputGLWindow::closeEvent(QCloseEvent *event) {