From: vsv Date: Fri, 18 Apr 2014 08:10:21 +0000 (+0400) Subject: Minimize/Maximize windows debug X-Git-Tag: V_0.2~149^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=198b07163ba035f2abbb6b9f73802b65fb79a7df;p=modules%2Fshaper.git Minimize/Maximize windows debug --- diff --git a/src/XGUI/XGUI_ViewWindow.cpp b/src/XGUI/XGUI_ViewWindow.cpp index 5f5b004b8..000e4b4ae 100644 --- a/src/XGUI/XGUI_ViewWindow.cpp +++ b/src/XGUI/XGUI_ViewWindow.cpp @@ -81,8 +81,8 @@ const char* imageCrossCursor[] = { "32 32 3 1", ". c None", "a c #000000", "# c void ViewerToolbar::paintEvent(QPaintEvent* theEvent) { - QApplication::syncX(); - printf("### ViewerToolbar::paintEvent\n"); + //QApplication::syncX(); + //printf("### ViewerToolbar::paintEvent\n"); //QToolBar::paintEvent(theEvent); // Paint background QPainter aPainter(this); @@ -396,7 +396,7 @@ void XGUI_ViewWindow::onMinimize() int aNewH = int(aH / aR); myPicture->setPixmap(aPMap.scaled(100, aNewH)); - myLastState = isMaximized() ? MaximizedState : WindowNormalState; + myLastState = (isMaximized() || parentWidget()->isMaximized()) ? MaximizedState : WindowNormalState; //parentWidget()->showMinimized(); showMinimized(); parentWidget()->setGeometry(parentWidget()->x(), parentWidget()->y(), 100, aNewH); @@ -405,10 +405,11 @@ void XGUI_ViewWindow::onMinimize() //**************************************************************** void XGUI_ViewWindow::onMaximize() { - if (isMaximized()) { + if (isMaximized() || parentWidget()->isMaximized()) { myMaximizeBtn->setIcon(MaximizeIco); myGripWgt->show(); showNormal(); + parentWidget()->showNormal(); } else { myMaximizeBtn->setIcon(RestoreIco); myGripWgt->hide();