}
}
+//! For internal use only! Undo/Redo are not used here.
+bool CurveCreator_Curve::moveSectionInternal(const int theISection,
+ const int theNewIndex)
+{
+ bool res = false;
+ if (theISection != theNewIndex) {
+ CurveCreator_Section *aSection = mySections.at(theISection);
+
+ // Remove section
+ CurveCreator::Sections::iterator anIter = mySections.begin() + theISection;
+
+ mySections.erase(anIter);
+
+ // Insert section.
+ anIter = mySections.begin() + theNewIndex;
+ mySections.insert(anIter, aSection);
+ res = true;
+ }
+ return res;
+}
+
+//=======================================================================
+// function: moveSection
+// purpose:
+//=======================================================================
+bool CurveCreator_Curve::moveSection(const int theISection,
+ const int theNewIndex)
+{
+ bool res = false;
+ // Set the difference.
+ startOperation();
+ if (addEmptyDiff()) {
+ myListDiffs.back().init(this, CurveCreator_Operation::MoveSection,
+ theISection, theNewIndex);
+ }
+
+ // Update the curve.
+ res = moveSectionInternal(theISection, theNewIndex);
+ finishOperation();
+ return res;
+}
+
/************ Implementation of INTERFACE methods ************/
/***********************************************/
return res;
}
+//! Set coordinates of specified points from different sections
+bool CurveCreator_Curve::setSeveralPoints( const SectionToPointCoordsList &theSectionToPntCoords)
+{
+ return false;
+}
+
//! For internal use only! Undo/Redo are not used here.
bool CurveCreator_Curve::removePointsInternal( const std::vector<int> &theISections,
const std::vector<int> &theIPnts )
return res;
}
-//=======================================================================
+//! Remove several points from different sections with given ids
+bool CurveCreator_Curve::removeSeveralPoints( const SectionToPointList &theSectionToPntIDs)
+{
+ return false;
+}
+
+ //=======================================================================
// function: getCoordinates
// purpose:
//=======================================================================