]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
*** empty log message ***
authorvsv <vsv@opencascade.com>
Fri, 19 Nov 2010 07:58:25 +0000 (07:58 +0000)
committervsv <vsv@opencascade.com>
Fri, 19 Nov 2010 07:58:25 +0000 (07:58 +0000)
src/SUIT/SUIT_ViewWindow.cxx

index ebf0055c94aa6a9d2e11861fa9271fefb0b50ecf..31b39bf38b821dfa4fe0954cce372667283df446 100755 (executable)
@@ -157,7 +157,8 @@ void SUIT_ViewWindow::contextMenuEvent( QContextMenuEvent* e )
 */
 void SUIT_ViewWindow::onDumpView()
 {
-  QApplication::postEvent( this, new QPaintEvent( QRect( 0, 0, width(), height() ) ) );
+  // Causes error messages
+  //QApplication::postEvent( this, new QPaintEvent( QRect( 0, 0, width(), height() ) ) );
   QApplication::postEvent( this, new QEvent( (QEvent::Type)DUMP_EVENT ) );
 }
 
@@ -178,18 +179,17 @@ bool SUIT_ViewWindow::event( QEvent* e )
     bool bOk = false;
     if ( myManager && myManager->study() && myManager->study()->application() )
     {
-      QImage im = dumpView();
-
       // get file name
       SUIT_Application* app = myManager->study()->application();
       QString fileName = app->getFileName( false, QString(), filter(), tr( "TLT_DUMP_VIEW" ), 0 );
       if ( !fileName.isEmpty() )
       {
-              QString fmt = SUIT_Tools::extension( fileName ).toUpper();
-              bOk = dumpViewToFormat( im, fileName, fmt );
+        QImage im = dumpView();
+        QString fmt = SUIT_Tools::extension( fileName ).toUpper();
+        bOk = dumpViewToFormat( im, fileName, fmt );
       }
       else
-              bOk = true; // cancelled
+        bOk = true; // cancelled
     }
     if ( !bOk )
       SUIT_MessageBox::critical( this, tr( "ERROR" ), tr( "ERR_CANT_DUMP_VIEW" ) );