From: mkr Date: Tue, 24 Nov 2015 15:38:51 +0000 (+0300) Subject: refs #739: correct sorting of numerical data for columns in the table of local points. X-Git-Tag: V8_0_0a1~3^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=40d157643739ac8b0636516f1ec1ca848992d455;p=modules%2Fgeom.git refs #739: correct sorting of numerical data for columns in the table of local points. --- diff --git a/src/CurveCreator/CurveCreator_TableView.cxx b/src/CurveCreator/CurveCreator_TableView.cxx index fe4c2dd69..31bbb5c4d 100644 --- a/src/CurveCreator/CurveCreator_TableView.cxx +++ b/src/CurveCreator/CurveCreator_TableView.cxx @@ -141,6 +141,7 @@ void CurveCreator_TableView::setLocalPointsToTable( anItem = new QTableWidgetItem( QString::number( anIPoint + 1 ) ); anItem->setFlags( anItem->flags() & ~Qt::ItemIsEnabled ); anItem->setData( Qt::UserRole, anIPoint ); + anItem->setData( Qt::DisplayRole, anIPoint ); setItem( aRowId, 1, anItem ); gp_Pnt aPoint; @@ -152,7 +153,7 @@ void CurveCreator_TableView::setLocalPointsToTable( setItem( aRowId, 2, anItem ); } 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 ); if ( !anItem ) { @@ -160,7 +161,7 @@ void CurveCreator_TableView::setLocalPointsToTable( setItem( aRowId, 3, anItem ); } 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++; }