mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-13 17:18:36 +05:00
refs #739: correct sorting of numerical data for columns in the table of local points.
This commit is contained in:
parent
643db5d3ff
commit
40d1576437
@ -141,6 +141,7 @@ void CurveCreator_TableView::setLocalPointsToTable(
|
|||||||
anItem = new QTableWidgetItem( QString::number( anIPoint + 1 ) );
|
anItem = new QTableWidgetItem( QString::number( anIPoint + 1 ) );
|
||||||
anItem->setFlags( anItem->flags() & ~Qt::ItemIsEnabled );
|
anItem->setFlags( anItem->flags() & ~Qt::ItemIsEnabled );
|
||||||
anItem->setData( Qt::UserRole, anIPoint );
|
anItem->setData( Qt::UserRole, anIPoint );
|
||||||
|
anItem->setData( Qt::DisplayRole, anIPoint );
|
||||||
setItem( aRowId, 1, anItem );
|
setItem( aRowId, 1, anItem );
|
||||||
|
|
||||||
gp_Pnt aPoint;
|
gp_Pnt aPoint;
|
||||||
@ -152,7 +153,7 @@ void CurveCreator_TableView::setLocalPointsToTable(
|
|||||||
setItem( aRowId, 2, anItem );
|
setItem( aRowId, 2, anItem );
|
||||||
}
|
}
|
||||||
anItem->setData( Qt::UserRole, aPoint.X() );
|
anItem->setData( Qt::UserRole, aPoint.X() );
|
||||||
anItem->setData( Qt::DisplayRole, QString::number( aPoint.X(), 'f', 2 ) );
|
anItem->setData( Qt::DisplayRole, QString::number( aPoint.X(), 'f', 2 ).toDouble() );
|
||||||
|
|
||||||
anItem = item( aRowId, 3 );
|
anItem = item( aRowId, 3 );
|
||||||
if ( !anItem ) {
|
if ( !anItem ) {
|
||||||
@ -160,7 +161,7 @@ void CurveCreator_TableView::setLocalPointsToTable(
|
|||||||
setItem( aRowId, 3, anItem );
|
setItem( aRowId, 3, anItem );
|
||||||
}
|
}
|
||||||
anItem->setData( Qt::UserRole, aPoint.Y() );
|
anItem->setData( Qt::UserRole, aPoint.Y() );
|
||||||
anItem->setData( Qt::DisplayRole, QString::number( aPoint.Y(), 'f', 2 ) );
|
anItem->setData( Qt::DisplayRole, QString::number( aPoint.Y(), 'f', 2 ).toDouble() );
|
||||||
|
|
||||||
aRowId++;
|
aRowId++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user