From: nds Date: Wed, 29 Jan 2014 05:12:29 +0000 (+0000) Subject: It removes ".e" form in the conversion of a double to string. X-Git-Tag: BR_hydro_v_1_0~38 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=151fba7fcab1d11d18bfa01e11b9e8c6313949e5;p=modules%2Fhydro.git It removes ".e" form in the conversion of a double to string. Scenario: import "barrage" image, show it, copy coordinate, paste in to Office. The digit contains exponential value. Status bar shows another conversion. --- diff --git a/src/HYDROGUI/HYDROGUI_CopyPastePositionOp.cxx b/src/HYDROGUI/HYDROGUI_CopyPastePositionOp.cxx index 55a41afc..48ed4378 100644 --- a/src/HYDROGUI/HYDROGUI_CopyPastePositionOp.cxx +++ b/src/HYDROGUI/HYDROGUI_CopyPastePositionOp.cxx @@ -24,6 +24,7 @@ #include "HYDROGUI_Module.h" #include "HYDROGUI_Displayer.h" +#include "HYDROGUI_Tool.h" #include #include @@ -56,8 +57,11 @@ void HYDROGUI_CopyPastePositionOp::startOperation() SUIT_ViewManager* aViewMgr = aModule->getApp()->activeViewManager(); SUIT_ViewWindow* aViewWindow = aViewMgr ? aViewMgr->getActiveView() : 0; double aX, aY, aZ; - if ( aDisplayer->GetCursorViewCoordinates( aViewWindow, aX, aY, aZ ) ) - aResult = tr( "%1,%2" ).arg( aX ).arg( aY ); + if ( aDisplayer->GetCursorViewCoordinates( aViewWindow, aX, aY, aZ ) ) { + QString aXStr = HYDROGUI_Tool::GetCoordinateString( aX ); + QString anYStr = HYDROGUI_Tool::GetCoordinateString( aY ); + aResult = tr( "%1,%2" ).arg( aXStr ).arg( anYStr ); + } } if ( !aResult.isEmpty() ) { QClipboard* aClBoard = QApplication::clipboard();