From: sln Date: Tue, 13 Jan 2009 15:48:02 +0000 (+0000) Subject: Problem with Fit Area functionality when coordinates more than 1000. X-Git-Tag: CTH_142~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=eb9d32bd313267796a1083e5d1e35f8ab4a95762;p=modules%2Fgui.git Problem with Fit Area functionality when coordinates more than 1000. setZoomBase() method is added in Plot2d. It update initial zoomer structure. This method is called from onViewFitArea() slots to reinitialize zoomer in accordance with current plot 2d state --- diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index d4152dd04..62cbb3c6e 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -1704,6 +1704,7 @@ void Plot2d_ViewFrame::onViewFitArea() myPlot->canvas()->setCursor( QCursor( Qt::PointingHandCursor ) ); myOperation = FitAreaId; myPlot->setPickerMousePattern( Qt::LeftButton ); + myPlot->setZoomBase(); } /*! View operations : Global panning @@ -2106,6 +2107,16 @@ int Plot2d_Plot2d::curveNbMarkers( Plot2d_Curve* curve ) const return aPlotCurve ? aPlotCurve->nbMarkers() : 0; } +/*! + Update initial zoomer structure. This method is called from onViewFitArea() + slots to reinitialize zoomer in accordance with current plot 2d state +*/ +void Plot2d_Plot2d::setZoomBase( const bool doReplot ) +{ + if ( myPlotZoomer ) + myPlotZoomer->setZoomBase( doReplot ); +} + /*! Checks if marker belongs to any enitity */ diff --git a/src/Plot2d/Plot2d_ViewFrame.h b/src/Plot2d/Plot2d_ViewFrame.h index 324220ff2..8931a9171 100755 --- a/src/Plot2d/Plot2d_ViewFrame.h +++ b/src/Plot2d/Plot2d_ViewFrame.h @@ -247,6 +247,8 @@ public: bool setCurveNbMarkers( Plot2d_Curve* curve, const int nb ); int curveNbMarkers( Plot2d_Curve* curve ) const; + void setZoomBase( const bool doReplot = true ); + public slots: virtual void polish();