From: akl Date: Fri, 22 Nov 2013 07:52:11 +0000 (+0000) Subject: Set to curve the modified values only to avoid an empty Undo/Redo X-Git-Tag: BR_hydro_v_0_3_1~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=baaef1555c2d86c8dc1e3824c1599d8afddd3b37;p=modules%2Fhydro.git Set to curve the modified values only to avoid an empty Undo/Redo --- diff --git a/src/HYDROCurveCreator/CurveCreator_Widget.cxx b/src/HYDROCurveCreator/CurveCreator_Widget.cxx index dc2edf73..51181043 100644 --- a/src/HYDROCurveCreator/CurveCreator_Widget.cxx +++ b/src/HYDROCurveCreator/CurveCreator_Widget.cxx @@ -571,9 +571,14 @@ void CurveCreator_Widget::onModifySection() bool isClosed = myNewSectionEditor->isClosed(); CurveCreator::SectionType aSectType = myNewSectionEditor->getSectionType(); // myCurve->startOperation(); - myCurve->setClosed( mySection, isClosed ); - myCurve->setSectionName( mySection , aName.toStdString() ); - myCurve->setSectionType( mySection, aSectType ); + if( myCurve->getSectionName(mySection) != aName.toStdString() ) + myCurve->setSectionName( mySection , aName.toStdString() ); + + if( myCurve->getSectionType(mySection) != aSectType ) + myCurve->setSectionType( mySection, aSectType ); + + if( myCurve->isClosed(mySection) != isClosed ) + myCurve->setClosed( mySection, isClosed ); // myCurve->finishOperation(); mySectionView->sectionChanged(mySection); updateUndoRedo();