int point = item( r, 1 )->data( Qt::UserRole ).toInt();
selected.push_back( CurveCreator_ICurve::SectionToPoint( section, point ) );
}
- myWidget->setSelectedPoints( selected );
+ //myWidget->setSelectedPoints( selected ); // seems unneeded and breaks the sorting
myCurrentSortId = theLogicalId;
}
finishCurveModification( myDragPoints );
}
-void CurveCreator_Widget::updateLocalPointView()
+void CurveCreator_Widget::updateLocalPointView(bool isGetSelected)
{
if ( myDragStarted )
return;
Handle(AIS_InteractiveContext) aContext = getAISContext();
if ( aContext.IsNull() )
return;
-
- CurveCreator_Utils::getSelectedPoints( aContext, myCurve, myLocalPoints );
+ if (isGetSelected)
+ {
+ CurveCreator_Utils::getSelectedPoints( aContext, myCurve, myLocalPoints );
+ }
int aNbPoints = myLocalPoints.size();
-
//bool isRowLimit = aNbPoints > myLocalPointRowLimit;
myLocalPointView->setVisible( getActionMode() == ModificationMode/* && !isRowLimit */);
return;
CurveCreator_Utils::setSelectedPoints( aContext, myCurve, thePoints );
-
- updateLocalPointView();
+ bool keepSelected = (thePoints.size() != 0) && (getActionMode() == ModificationMode);
+ updateLocalPointView(!keepSelected);
}
void CurveCreator_Widget::stopActionMode()
void setSelectedPoints( const CurveCreator_ICurve::SectionToPointList& =
CurveCreator_ICurve::SectionToPointList() );
- void updateLocalPointView();
+ void updateLocalPointView(bool isGetSelected = true);
void setLocalPointContext( const bool theOpen, const bool isUpdateTable = false );
signals: