From: vsr Date: Fri, 19 Nov 2010 13:21:28 +0000 (+0000) Subject: 0021061: [CEA 433] Problem with "fit Area" in plot2D X-Git-Tag: V5_1_4_patch02 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d0767e4cdce0849bab0c40b6a5abde57a4b64e07;p=modules%2Fgui.git 0021061: [CEA 433] Problem with "fit Area" in plot2D Integrate last fixes from V5_1_5_BR branch --- diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index 7de8c5813..0380785c9 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -282,6 +282,7 @@ void Plot2d_ViewFrame::DisplayAll() updateCurve( clist.at( i ), false ); } myPlot->replot(); + if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); } /*! Removes all curves from the view @@ -291,6 +292,7 @@ void Plot2d_ViewFrame::EraseAll() myPlot->clear(); myPlot->getCurves().clear(); myPlot->replot(); + if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); } /*! Redraws viewframe contents @@ -315,6 +317,7 @@ void Plot2d_ViewFrame::Display( const Plot2d_Prs* prs ) setXGrid( myXGridMajorEnabled, myXGridMaxMajor, myXGridMinorEnabled, myXGridMaxMinor, true ); setYGrid( myYGridMajorEnabled, myYGridMaxMajor, myYGridMinorEnabled, myYGridMaxMinor, myY2GridMajorEnabled, myY2GridMaxMajor, myY2GridMinorEnabled, myY2GridMaxMinor, true ); + if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); } /*! @@ -328,6 +331,7 @@ void Plot2d_ViewFrame::Erase( const Plot2d_Prs* prs, const bool ) // erase all curves from presentation curveList aCurves = prs->getCurves(); eraseCurves( aCurves ); + if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); } bool Plot2d_ViewFrame::eventFilter( QObject* watched, QEvent* e ) @@ -631,6 +635,7 @@ void Plot2d_ViewFrame::displayCurve( Plot2d_Curve* curve, bool update ) myPlot->updateYAxisIdentifiers(); if ( update ) myPlot->replot(); + if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); } /*! @@ -669,6 +674,7 @@ void Plot2d_ViewFrame::eraseCurve( Plot2d_Curve* curve, bool update ) if ( update ) myPlot->replot(); } + if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); } /*! @@ -685,6 +691,7 @@ void Plot2d_ViewFrame::eraseCurves( const curveList& curves, bool update ) // fitAll(); if ( update ) myPlot->replot(); + if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); } /*! @@ -695,7 +702,7 @@ void Plot2d_ViewFrame::updateCurve( Plot2d_Curve* curve, bool update ) if ( !curve ) return; if ( hasPlotCurve( curve ) ) { - QwtPlotCurve* aPCurve = getPlotCurve( curve ); + QwtPlotCurve* aPCurve = getPlotCurve( curve ); if ( !curve->isAutoAssign() ) { Qt::PenStyle ps = Plot2d::plot2qwtLine( curve->getLine() ); QwtSymbol::Style ms = Plot2d::plot2qwtMarker( curve->getMarker() ); @@ -710,6 +717,7 @@ void Plot2d_ViewFrame::updateCurve( Plot2d_Curve* curve, bool update ) aPCurve->setVisible( true ); if ( update ) myPlot->replot(); + if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); } } @@ -1553,6 +1561,7 @@ void Plot2d_ViewFrame::wheelEvent(QWheelEvent* event) myPlot->setAxisScale( QwtPlot::yRight, y2Map.s1(), y2Map.s1() + aScale*(y2Map.s2() - y2Map.s1()) ); } myPlot->replot(); + if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); myPnt = event->pos(); } @@ -1744,6 +1753,7 @@ Plot2d_Plot2d::Plot2d_Plot2d( QWidget* parent ) canvas()->setMouseTracking( true ); myPlotZoomer->setEnabled( true ); + myPlotZoomer->setZoomBase(); } /*!