mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-26 01:10:36 +05:00
fix polyline curve tablewidget edition: avoid deselection and table hide at each modification, fix order by colummns
This commit is contained in:
parent
951250adc1
commit
1f28437543
@ -219,7 +219,7 @@ void CurveCreator_TableView::OnHeaderClick( int theLogicalId )
|
|||||||
int point = item( r, 1 )->data( Qt::UserRole ).toInt();
|
int point = item( r, 1 )->data( Qt::UserRole ).toInt();
|
||||||
selected.push_back( CurveCreator_ICurve::SectionToPoint( section, point ) );
|
selected.push_back( CurveCreator_ICurve::SectionToPoint( section, point ) );
|
||||||
}
|
}
|
||||||
myWidget->setSelectedPoints( selected );
|
//myWidget->setSelectedPoints( selected ); // seems unneeded and breaks the sorting
|
||||||
|
|
||||||
myCurrentSortId = theLogicalId;
|
myCurrentSortId = theLogicalId;
|
||||||
}
|
}
|
||||||
|
@ -1526,17 +1526,18 @@ void CurveCreator_Widget::moveSelectedPoints( const int theXPosition,
|
|||||||
finishCurveModification( myDragPoints );
|
finishCurveModification( myDragPoints );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CurveCreator_Widget::updateLocalPointView()
|
void CurveCreator_Widget::updateLocalPointView(bool isGetSelected)
|
||||||
{
|
{
|
||||||
if ( myDragStarted )
|
if ( myDragStarted )
|
||||||
return;
|
return;
|
||||||
Handle(AIS_InteractiveContext) aContext = getAISContext();
|
Handle(AIS_InteractiveContext) aContext = getAISContext();
|
||||||
if ( aContext.IsNull() )
|
if ( aContext.IsNull() )
|
||||||
return;
|
return;
|
||||||
|
if (isGetSelected)
|
||||||
|
{
|
||||||
CurveCreator_Utils::getSelectedPoints( aContext, myCurve, myLocalPoints );
|
CurveCreator_Utils::getSelectedPoints( aContext, myCurve, myLocalPoints );
|
||||||
|
}
|
||||||
int aNbPoints = myLocalPoints.size();
|
int aNbPoints = myLocalPoints.size();
|
||||||
|
|
||||||
//bool isRowLimit = aNbPoints > myLocalPointRowLimit;
|
//bool isRowLimit = aNbPoints > myLocalPointRowLimit;
|
||||||
myLocalPointView->setVisible( getActionMode() == ModificationMode/* && !isRowLimit */);
|
myLocalPointView->setVisible( getActionMode() == ModificationMode/* && !isRowLimit */);
|
||||||
|
|
||||||
@ -1606,8 +1607,8 @@ void CurveCreator_Widget::setSelectedPoints( const CurveCreator_ICurve::SectionT
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
CurveCreator_Utils::setSelectedPoints( aContext, myCurve, thePoints );
|
CurveCreator_Utils::setSelectedPoints( aContext, myCurve, thePoints );
|
||||||
|
bool keepSelected = (thePoints.size() != 0) && (getActionMode() == ModificationMode);
|
||||||
updateLocalPointView();
|
updateLocalPointView(!keepSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CurveCreator_Widget::stopActionMode()
|
void CurveCreator_Widget::stopActionMode()
|
||||||
|
@ -98,7 +98,7 @@ public:
|
|||||||
void setSelectedPoints( const CurveCreator_ICurve::SectionToPointList& =
|
void setSelectedPoints( const CurveCreator_ICurve::SectionToPointList& =
|
||||||
CurveCreator_ICurve::SectionToPointList() );
|
CurveCreator_ICurve::SectionToPointList() );
|
||||||
|
|
||||||
void updateLocalPointView();
|
void updateLocalPointView(bool isGetSelected = true);
|
||||||
void setLocalPointContext( const bool theOpen, const bool isUpdateTable = false );
|
void setLocalPointContext( const bool theOpen, const bool isUpdateTable = false );
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
Loading…
Reference in New Issue
Block a user