Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git]
/
src
/
XGUI
/
XGUI_MainWindow.cpp
diff --git
a/src/XGUI/XGUI_MainWindow.cpp
b/src/XGUI/XGUI_MainWindow.cpp
index a0cefc1d3e881a4ac865ae3de153f12786b4c4b6..1400fc0ccc7f4c502b092cbdae6bc5b93cd4532b 100644
(file)
--- a/
src/XGUI/XGUI_MainWindow.cpp
+++ b/
src/XGUI/XGUI_MainWindow.cpp
@@
-13,6
+13,8
@@
#include <QAction>
#include <QDockWidget>
#include <QApplication>
#include <QAction>
#include <QDockWidget>
#include <QApplication>
+#include <QTimer>
+#include <QCloseEvent>
XGUI_MainWindow::XGUI_MainWindow(QWidget* parent)
: QMainWindow(parent),
XGUI_MainWindow::XGUI_MainWindow(QWidget* parent)
: QMainWindow(parent),
@@
-171,15
+173,18
@@
void XGUI_MainWindow::activateView()
QMdiArea* aMdiArea = static_cast<QMdiArea*>(centralWidget());
QList<QMdiSubWindow*> aWndList = aMdiArea->subWindowList();
QMdiArea* aMdiArea = static_cast<QMdiArea*>(centralWidget());
QList<QMdiSubWindow*> aWndList = aMdiArea->subWindowList();
+ QMdiSubWindow* aTargetView = 0;
foreach(QMdiSubWindow* aWnd, aWndList) {
if (aWnd->windowTitle() == aWndTitle) {
aWnd->raise();
aWnd->activateWindow();
foreach(QMdiSubWindow* aWnd, aWndList) {
if (aWnd->windowTitle() == aWndTitle) {
aWnd->raise();
aWnd->activateWindow();
- a
Wnd->setFocus()
;
+ a
TargetView = aWnd
;
break;
}
}
QApplication::processEvents();
break;
}
}
QApplication::processEvents();
+ if (aTargetView)
+ QTimer::singleShot(20, aTargetView, SLOT(setFocus()));
}
void XGUI_MainWindow::onViewActivated(QMdiSubWindow* theSubWnd)
}
void XGUI_MainWindow::onViewActivated(QMdiSubWindow* theSubWnd)
@@
-193,4
+198,10
@@
void XGUI_MainWindow::onViewActivated(QMdiSubWindow* theSubWnd)
if (aAct->isCheckable())
aAct->setChecked(aAct->text() == aWndTitle);
}
if (aAct->isCheckable())
aAct->setChecked(aAct->text() == aWndTitle);
}
-}
\ No newline at end of file
+}
+
+void XGUI_MainWindow::closeEvent(QCloseEvent * event)
+{
+ emit exitKeySequence();
+ event->ignore();
+}