From: aan Date: Tue, 17 Feb 2009 12:53:44 +0000 (+0000) Subject: added number_precision and changed DoubleToQString X-Git-Tag: V2_0_0~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2e860b8508c17a3aea353c3ce3d4ac1fd28d9477;p=modules%2Fgui.git added number_precision and changed DoubleToQString --- diff --git a/src/TableViewer/TableViewer_ViewWindow.cxx b/src/TableViewer/TableViewer_ViewWindow.cxx index 9e9305ed1..83c958974 100755 --- a/src/TableViewer/TableViewer_ViewWindow.cxx +++ b/src/TableViewer/TableViewer_ViewWindow.cxx @@ -528,10 +528,12 @@ void TableViewer_ViewWindow::exportTableData( Handle(HTMLService_HTMLTable)& tab bool isExpImg = true; bool dotToComma = false; + int number_precision; SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); if ( resMgr ) { isExpImg = resMgr->booleanValue( "TableViewer", "export_table_images", true ); dotToComma = resMgr->booleanValue( "TableViewer", "replace_dot_by_comma", true ); + number_precision = resMgr->integerValue( "TableViewer", "number_precision", 6 ); } for ( int c = 0, nbC = numCols( type ); c < nbC; c++ ) { @@ -554,7 +556,7 @@ void TableViewer_ViewWindow::exportTableData( Handle(HTMLService_HTMLTable)& tab double aVal = TableViewer_Tool::ToDouble( txt, aDbl ); if ( aDbl ) cell->InsertText( TableViewer_Tool::ToExtString( - TableViewer_Tool::DoubleToQString( aVal, dotToComma ) ) ); + TableViewer_Tool::DoubleToQString( aVal, number_precision, false, dotToComma ) ) ); else cell->InsertText( TableViewer_Tool::ToExtString( txt ) ); }