]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Set to curve the modified values only to avoid an empty Undo/Redo
authorakl <akl@opencascade.com>
Fri, 22 Nov 2013 07:52:11 +0000 (07:52 +0000)
committerakl <akl@opencascade.com>
Fri, 22 Nov 2013 07:52:11 +0000 (07:52 +0000)
src/HYDROCurveCreator/CurveCreator_Widget.cxx

index dc2edf73b52d6ef0464732f742abaf028691c74c..511810438fad8014df53312582e487d0e477eda9 100644 (file)
@@ -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();