From aa6a89e8bab743ded003337135ab4f19ef1f6979 Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 27 Feb 2008 05:27:12 +0000 Subject: [PATCH] Remove functionality by refresh dump image. Using method grabWidget instead of grabWindow. --- src/Plot2d/Plot2d_ViewModel.cxx | 1 - src/Plot2d/Plot2d_ViewWindow.cxx | 18 ++---------------- src/Plot2d/Plot2d_ViewWindow.h | 2 -- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/src/Plot2d/Plot2d_ViewModel.cxx b/src/Plot2d/Plot2d_ViewModel.cxx index 7906d7052..fae67f5cf 100755 --- a/src/Plot2d/Plot2d_ViewModel.cxx +++ b/src/Plot2d/Plot2d_ViewModel.cxx @@ -81,7 +81,6 @@ void Plot2d_Viewer::contextMenuPopup(QMenu* thePopup) thePopup->addSeparator(); thePopup->addAction("Show toolbar", this, SLOT(onShowToolbar())); } - aView->RefreshDumpImage(); } } diff --git a/src/Plot2d/Plot2d_ViewWindow.cxx b/src/Plot2d/Plot2d_ViewWindow.cxx index cb550532f..ed6ec0cdf 100755 --- a/src/Plot2d/Plot2d_ViewWindow.cxx +++ b/src/Plot2d/Plot2d_ViewWindow.cxx @@ -59,7 +59,6 @@ Plot2d_ViewWindow::Plot2d_ViewWindow( SUIT_Desktop* theDesktop, Plot2d_Viewer* t : SUIT_ViewWindow( theDesktop ) { myModel = theModel; - myDumpImage = QImage(); } /*! @@ -443,15 +442,6 @@ void Plot2d_ViewWindow::setVisualParameters( const QString& parameters ) myViewFrame->setVisualParameters( parameters ); } -/*! - \brief Grab the view window to the internal image. -*/ -void Plot2d_ViewWindow::RefreshDumpImage() -{ - QPixmap px = QPixmap::grabWindow( myViewFrame->winId() ); - myDumpImage = px.toImage(); -} - /*! \brief Called when the scale mode for the horizontal axis is changed. */ @@ -605,12 +595,8 @@ void Plot2d_ViewWindow::onDumpView() */ QImage Plot2d_ViewWindow::dumpView() { - if ( getToolBar()->underMouse() || myDumpImage.isNull() ) { - QPixmap px = QPixmap::grabWindow( myViewFrame->winId() ); - return px.toImage(); - } - - return myDumpImage; + QPixmap px = QPixmap::grabWidget( myViewFrame ); + return px.toImage(); } /*! diff --git a/src/Plot2d/Plot2d_ViewWindow.h b/src/Plot2d/Plot2d_ViewWindow.h index 0908cc67a..e3fc5c8b4 100755 --- a/src/Plot2d/Plot2d_ViewWindow.h +++ b/src/Plot2d/Plot2d_ViewWindow.h @@ -62,8 +62,6 @@ public: virtual QString getVisualParameters(); virtual void setVisualParameters( const QString& ); - - virtual void RefreshDumpImage(); public slots: void onChangeHorMode(); -- 2.39.2