Skip to content

Commit

Permalink
Re #4282. Some small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mantid-roman committed Dec 14, 2011
1 parent 19f6d94 commit 4241b69
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions Code/Mantid/MantidPlot/src/ApplicationWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3367,13 +3367,18 @@ void ApplicationWindow::windowActivated(QMdiSubWindow *w)

if (d_opening_file) return;


QList<MdiSubWindow *> windows = current_folder->windowsList();
foreach(MdiSubWindow *ow, windows){
std::cerr << ow->className() << std::endl;
// if (ow != w && ow->status() == MdiSubWindow::Maximized){
// ow->setNormal();
// break;
// }
QMdiSubWindow* qw = dynamic_cast<QMdiSubWindow*>(ow->parent());
std::cerr << ow->className();
if (ow->parent()) std::cerr << ' ' << ow->parent()->className() ;
std::cerr << std::endl;
if (qw && qw != w && qw->isMaximized())
{
ow->setNormal();
break;
}
}

Folder *f = qti_subwin->folder();
Expand Down Expand Up @@ -17171,7 +17176,7 @@ void ApplicationWindow::goFloat(MdiSubWindow* w)

QAction *goMdi = new QAction("MDI",this);
connect(goMdi,SIGNAL(triggered()),w,SLOT(goMdi()));
QMainWindow* mw =new QMainWindow(this);
QMainWindow* mw =new QMainWindow();
MdiSubWindowParent_t* wrapper = new MdiSubWindowParent_t(mw,0);
wrapper->setWidget(w);
mw->setCentralWidget(wrapper);
Expand Down

0 comments on commit 4241b69

Please sign in to comment.