From: ouv Date: Thu, 15 Nov 2018 11:39:52 +0000 (+0300) Subject: 0004412: External 9984 Add text X-Git-Tag: CTH_2_3_2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ddf3b9f1769a029a38504f36966437a0904984b9;p=modules%2Fgui.git 0004412: External 9984 Add text --- diff --git a/src/Plot2d/Plot2d_ViewModel.cxx b/src/Plot2d/Plot2d_ViewModel.cxx index 4b505c4f2..746f11865 100755 --- a/src/Plot2d/Plot2d_ViewModel.cxx +++ b/src/Plot2d/Plot2d_ViewModel.cxx @@ -195,15 +195,21 @@ void Plot2d_Viewer::onCloneView( Plot2d_ViewFrame* clonedVF, Plot2d_ViewFrame* n curveList aCurves; clonedVF->getCurves( aCurves ); - curveList::const_iterator anIt = aCurves.begin(), aLast = aCurves.end(); - - for( ; anIt!=aLast; anIt++ ) - if( clonedVF->isVisible( *anIt ) ) - newVF->displayCurve( *anIt, false ); + curveList::const_iterator aCurveIter = aCurves.begin(), aCurveIterEnd = aCurves.end(); + for( ; aCurveIter != aCurveIterEnd; aCurveIter++ ) + if( clonedVF->isVisible( *aCurveIter ) ) + newVF->displayCurve( *aCurveIter, false ); newVF->updateTitles( false ); - // 3) Copy range of the cloned view + // 3) Display all comments displayed in cloned view + + CommentList aComments = clonedVF->getComments(); + CommentList::const_iterator aCommentIter = aComments.begin(), aCommentIterEnd = aComments.end(); + for( ; aCommentIter != aCommentIterEnd; aCommentIter++ ) + newVF->displayComment( *aCommentIter, false ); + + // 4) Copy range of the cloned view double aXMin, aXMax, aYMin, aYMax, aY2Min, aY2Max; clonedVF->getFitRanges( aXMin, aXMax, aYMin, aYMax, aY2Min, aY2Max );