Skip to content

Commit

Permalink
Refs #8984. Set current win. of MdiArea to current win. of app.
Browse files Browse the repository at this point in the history
  • Loading branch information
arturbekasov committed Feb 25, 2014
1 parent af818d8 commit 27ef814
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions Code/Mantid/MantidPlot/src/ApplicationWindow.cpp
Expand Up @@ -8797,13 +8797,21 @@ void ApplicationWindow::setActiveWindow(MdiSubWindow* w)
{
d_active_window = NULL;
}
else if ( d_active_window->getFloatingWindow() )
else
{
// If floating window is activated, we set MdiArea to not have any active sub-window. This makes
// sure that we don't have two versions of current active window (d_active_window and active
// window of MdiArea) and they are either equal (when docked window is active> or the latter one
// is NULL (when floating window is active).
d_workspace->setActiveSubWindow(NULL);
// This make sure that we don't have two versions of current active window (d_active_window and
// active window of MdiArea) and they are either equal (when docked window is active> or the
// latter one is NULL (when floating window is active).
if ( d_active_window->getFloatingWindow() )
{
// If floating window is activated, we set MdiArea to not have any active sub-window.
d_workspace->setActiveSubWindow(NULL);
}
else if ( QMdiSubWindow* w = d_active_window->getDockedWindow() )
{
// If docked window activated, activate it in MdiArea as well.
d_workspace->setActiveSubWindow(w);
}
}
}

Expand Down

0 comments on commit 27ef814

Please sign in to comment.