* @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;
}
}
-/**
- * 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.