[vlmc-devel] [PATCH] Notify toolbar about fullscreen mode change
Paweł Goliński
golpaw1 at gmail.com
Fri Mar 11 00:19:33 CET 2016
Toolbar was not notified about user turning on/off
fullscreen mode without using toolbar button, which
caused it to show inconsistent state.
---
src/Gui/MainWindow.cpp | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
index 609e710..c162cf9 100644
--- a/src/Gui/MainWindow.cpp
+++ b/src/Gui/MainWindow.cpp
@@ -176,6 +176,13 @@ MainWindow::changeEvent( QEvent *e )
m_ui.retranslateUi( this );
retranslateUi();
break;
+ case QEvent::WindowStateChange:
+ if ( isFullScreen() ) {
+ m_ui.actionFullscreen->setChecked( true );
+ } else {
+ m_ui.actionFullscreen->setChecked( false );
+ }
+ break;
default:
break;
}
@@ -496,7 +503,7 @@ MainWindow::initToolbar()
mouseActions->addAction( m_ui.actionCut_mode );
m_ui.actionSelection_mode->setChecked( true );
m_ui.toolBar->addActions( mouseActions->actions() );
- connect( mouseActions, SIGNAL( triggered(QAction*) ),
+ connect( mouseActions, SIGNAL( triggered( QAction* ) ),
this, SLOT( toolButtonClicked( QAction* ) ) );
m_ui.menuTools->addActions( mouseActions->actions() );
}
--
2.5.4 (Apple Git-61)
More information about the Vlmc-devel
mailing list