Skip to content

Commit

Permalink
+ fix switching to another mdi view when using the sketcher creation …
Browse files Browse the repository at this point in the history
…command from task panel
  • Loading branch information
wwmayer committed Sep 4, 2015
1 parent 568f263 commit 134acba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Gui/TaskView/TaskView.cpp
Expand Up @@ -593,6 +593,8 @@ void TaskView::updateWatcher(void)
// to the mdi area which may switch to another mdi view which is not an
// acceptable behaviour.
QWidget *fw = QApplication::focusWidget();
if (!fw)
this->setFocus();
QPointer<QWidget> fwp = fw;
while (fw && !fw->isWindow()) {
if (fw == this) {
Expand Down Expand Up @@ -666,6 +668,8 @@ void TaskView::removeTaskWatcher(void)
// to the mdi area which may switch to another mdi view which is not an
// acceptable behaviour.
QWidget *fw = QApplication::focusWidget();
if (!fw)
this->setFocus();
while (fw && !fw->isWindow()) {
if (fw == this) {
this->setFocus();
Expand Down

0 comments on commit 134acba

Please sign in to comment.