X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_Module.cxx;h=bd3b1a16fa0fe47439fc07b4111fd68ba84b5baf;hb=81c9f5cdf82909d0aebd2c491c50fa7516cc80b7;hp=aaa13984df975394f8ae313783a7e85f909aae67;hpb=2a8f1dac890bd9eb0b401687408e2545c3f46f17;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_Module.cxx b/src/HYDROGUI/HYDROGUI_Module.cxx index aaa13984..bd3b1a16 100644 --- a/src/HYDROGUI/HYDROGUI_Module.cxx +++ b/src/HYDROGUI/HYDROGUI_Module.cxx @@ -1501,21 +1501,31 @@ void HYDROGUI_Module::restoreSelection( const QStringList& theEntryList ) void HYDROGUI_Module::onMouseMove( SUIT_ViewWindow* theViewWindow, QMouseEvent* ) { - double aX, aY, aZ; + double X, Y, Z; bool doShow = false; HYDROGUI_Displayer* aDisplayer = getDisplayer(); if ( aDisplayer ) aDisplayer->SaveCursorViewPosition( theViewWindow ); - doShow = aDisplayer->GetCursorViewCoordinates( theViewWindow, aX, aY, aZ ); + doShow = aDisplayer->GetCursorViewCoordinates( theViewWindow, X, Y, Z ); if ( doShow ) { // Show the coordinates in the status bar SUIT_Desktop* aDesktop = getApp()->desktop(); - if ( aDesktop && aDesktop->statusBar() ) { - QString aXStr = HYDROGUI_Tool::GetCoordinateString( aX ); - QString anYStr = HYDROGUI_Tool::GetCoordinateString( aY ); - aDesktop->statusBar()->showMessage( tr("COORDINATES_INFO").arg( aXStr ).arg( anYStr ) ); + if ( aDesktop && aDesktop->statusBar() ) + { + gp_Pnt aWPnt( X, Y, Z ); + int aStudyId = application()->activeStudy()->id(); + HYDROData_Document::Document( aStudyId )->Transform( aWPnt, false ); + double WX = aWPnt.X(), WY = aWPnt.Y(); + + QString aXStr = HYDROGUI_Tool::GetCoordinateString( X, true ); + QString anYStr = HYDROGUI_Tool::GetCoordinateString( Y, true ); + QString aWXStr = HYDROGUI_Tool::GetCoordinateString( WX, true ); + QString aWYStr = HYDROGUI_Tool::GetCoordinateString( WY, true ); + QString aMsg = tr( "COORDINATES_INFO" ); + aMsg = aMsg.arg( aXStr ).arg( anYStr ).arg( aWXStr ).arg( aWYStr ); + aDesktop->statusBar()->showMessage( aMsg ); } } }