From 40d157643739ac8b0636516f1ec1ca848992d455 Mon Sep 17 00:00:00 2001 From: mkr Date: Tue, 24 Nov 2015 18:38:51 +0300 Subject: [PATCH] refs #739: correct sorting of numerical data for columns in the table of local points. --- src/CurveCreator/CurveCreator_TableView.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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++; } -- 2.39.2