From db0f62bcbb8e94850a7acbfee2efca0e666445fa Mon Sep 17 00:00:00 2001 From: vtn Date: Tue, 12 Sep 2017 16:53:57 +0300 Subject: [PATCH] 0004003: External 20822 Read FORT21 not finish Use current application in order to dump view. --- src/SUIT/SUIT_ViewWindow.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/SUIT/SUIT_ViewWindow.cxx b/src/SUIT/SUIT_ViewWindow.cxx index 379505f8b..9263110fc 100755 --- a/src/SUIT/SUIT_ViewWindow.cxx +++ b/src/SUIT/SUIT_ViewWindow.cxx @@ -27,6 +27,7 @@ #include "SUIT_MessageBox.h" #include "SUIT_Application.h" #include "SUIT_ViewManager.h" +#include "SUIT_Session.h" #include "QtxActionToolMgr.h" #include @@ -171,20 +172,20 @@ bool SUIT_ViewWindow::event( QEvent* e ) if ( e->type() == DUMP_EVENT ) { bool bOk = false; - if ( myManager && myManager->study() && myManager->study()->application() ) + SUIT_Application* app = SUIT_Session::session()->activeApplication(); + if(app) { 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 ); + 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" ) ); -- 2.39.2