Browse Source

Merge pull request #2425 from pritamghanghas/esc_key_fix

Esc key fix
QGC4.4
Don Gagne 9 years ago
parent
commit
137ce9d7e4
  1. 6
      src/ui/MainWindow.cc
  2. 18
      src/ui/MainWindow.ui

6
src/ui/MainWindow.cc

@ -415,6 +415,12 @@ void MainWindow::normalActionItemCallback(bool)
if (!_ui.actionNormal->isChecked()) if (!_ui.actionNormal->isChecked())
_ui.actionNormal->setChecked(true); _ui.actionNormal->setChecked(true);
_ui.actionFullscreen->setChecked(false); _ui.actionFullscreen->setChecked(false);
// Qt documentation says that just call showNormal and it will return properly
// So calling showMaximized.
if (isFullScreen()) {
showMaximized();
}
} }
void MainWindow::showStatusBarCallback(bool checked) void MainWindow::showStatusBarCallback(bool checked)

18
src/ui/MainWindow.ui

@ -51,7 +51,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1024</width> <width>1024</width>
<height>22</height> <height>20</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menuMGround"> <widget class="QMenu" name="menuMGround">
@ -261,21 +261,5 @@
</hint> </hint>
</hints> </hints>
</connection> </connection>
<connection>
<sender>actionNormal</sender>
<signal>triggered()</signal>
<receiver>MainWindow</receiver>
<slot>showNormal()</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>399</x>
<y>249</y>
</hint>
</hints>
</connection>
</connections> </connections>
</ui> </ui>

Loading…
Cancel
Save