From ebe6637b5375b6269f909d6b42886683b69e439f Mon Sep 17 00:00:00 2001 From: asl Date: Thu, 1 Jun 2006 07:42:18 +0000 Subject: [PATCH] PAL12468 --- src/SUIT/SUIT_ViewWindow.cxx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/SUIT/SUIT_ViewWindow.cxx b/src/SUIT/SUIT_ViewWindow.cxx index 354b32b3a..0df3081c3 100755 --- a/src/SUIT/SUIT_ViewWindow.cxx +++ b/src/SUIT/SUIT_ViewWindow.cxx @@ -131,12 +131,8 @@ void SUIT_ViewWindow::contextMenuEvent ( QContextMenuEvent * e ) */ void SUIT_ViewWindow::onDumpView() { - qApp->processEvents(); - qApp->sendEvent( this, new QPaintEvent( QRect( 0, 0, width(), height() ), TRUE ) ); - QImage im = dumpView(); - QCustomEvent* e = new QCustomEvent( DUMP_EVENT ); - e->setData( &im ); - qApp->sendEvent( this, e ); + qApp->postEvent( this, new QPaintEvent( QRect( 0, 0, width(), height() ), TRUE ) ); + qApp->postEvent( this, new QCustomEvent( DUMP_EVENT ) ); } /*! @@ -156,15 +152,15 @@ 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::null, filter(), tr( "TLT_DUMP_VIEW" ), 0 ); if( !fileName.isEmpty() ) { QString fmt = SUIT_Tools::extension( fileName ).upper(); - QCustomEvent* ce = ( QCustomEvent* )e; - QImage* im = ( QImage* )ce->data(); - bOk = dumpViewToFormat( *im, fileName, fmt ); + bOk = dumpViewToFormat( im, fileName, fmt ); } else { -- 2.39.2