X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmainapp%2Fmdiwindow.cpp;h=a592c4bd6bc1f1d9ab335646b3e57c841174f2c2;hb=43c13b052d069ba435277d93867380d00c04931f;hp=b3d0ac4cb50e1b9ca862a6b084551eb7b58e406e;hpb=a18a12fc3bcb18e5c7ca5494d7f97fb8b93f90a2;p=architektonas diff --git a/src/mainapp/mdiwindow.cpp b/src/mainapp/mdiwindow.cpp index b3d0ac4..a592c4b 100644 --- a/src/mainapp/mdiwindow.cpp +++ b/src/mainapp/mdiwindow.cpp @@ -33,15 +33,24 @@ int MDIWindow::idCounter = 0; * @param parent Parent widget. Usually a workspace (QMdiArea). */ MDIWindow::MDIWindow(Document * doc, QWidget * parent, const char * name/*= NULL*/, - Qt::WindowFlags wflags/*= Qt::WDestructiveClose*/): - QMdiSubWindow(parent, Qt::SubWindow), owner(false)//, forceClosing(false) + Qt::WindowFlags wflags/*= Qt::SubWindow*/): + QMdiSubWindow(parent, Qt::SubWindow), +owner(false) #warning "!!! wflags is ignored !!!" { // This warning not longer occurs...! //This warning is most likely coming from the QMdiSubWindow() constructor above... //#warning "QWidget::setMinimumSize: (/QMdi::ControlLabel) Negative sizes (-1,-1) are not possible" initDoc(doc); - initView(); + + graphicView = new QG_GraphicView(document, this); +//Let's see if the trouble is in the graphicView... +//And it is... So... How to fix this??? + setWidget(graphicView); +//THIS was the problem... Somehow, setting focus on the this widget was screwing +//*everything* about the MDI system up! +// graphicView->setFocus(); + id = idCounter++; parentWindow = NULL; @@ -208,20 +217,6 @@ void MDIWindow::initDoc(Document * doc) } } -/** - * Initialize the view. - */ -void MDIWindow::initView() -{ - // This is only called once: In the MDIWindow constructor. - DEBUG->print("MDIWindow::initView()"); - -// graphicView = new QC_GraphicView(document, this); - graphicView = new QG_GraphicView(document, this); - setWidget(graphicView); - graphicView->setFocus(); -} - /** * Called when the current pen (color, style, width) has changed. * Sets the active pen for the document in this MDI window.