@@ -31,6 +31,7 @@ UiInspector::UiInspector(QWidget *parent) :
3131 slidersLock = false ;
3232 toolbarButton = 0 ;
3333 lastTabBeforeRessources = 0 ;
34+ mouseDisplay = false ;
3435
3536 Help::syncHelpWith (ui->positionX , COMMAND_POS_X);
3637 Help::syncHelpWith (ui->positionY , COMMAND_POS_Y);
@@ -429,13 +430,16 @@ void UiInspector::actionMessages() {
429430}
430431
431432void UiInspector::setMousePos (const NxPoint & pos) {
432- ui->mouseLabel ->setText (tr (" MOUSE:" ) + QString (" %1 s. / %2 s." ).arg (pos.x (), 0 , ' f' , 3 ).arg (pos.y (), 0 , ' f' , 3 ));
433+ mousePos = tr (" MOUSE:" ) + QString (" %1 s. / %2 s." ).arg (pos.x (), 0 , ' f' , 3 ).arg (pos.y (), 0 , ' f' , 3 );
434+ mouseDisplay = true ;
433435}
434436void UiInspector::setMouseZoom (qreal zoom) {
435- ui->zoomLabel ->setText (tr (" ZOOM:" ) + QString (" %1%" ).arg (zoom, 0 , ' f' , 1 ));
437+ mouseZoom = tr (" ZOOM:" ) + QString (" %1%" ).arg (zoom, 0 , ' f' , 1 );
438+ mouseDisplay = true ;
436439}
437440void UiInspector:: setRotationAngles(const NxPoint &angles) {
438- ui->rotationLabel ->setText (tr (" ANGLES:" ) + QString (" %1° / %2°" ).arg (angles.y (), 0 , ' f' , 3 ).arg (angles.z (), 0 , ' f' , 3 ));
441+ rotationAngles = tr (" ANGLES:" ) + QString (" %1° / %2°" ).arg (angles.y (), 0 , ' f' , 3 ).arg (angles.z (), 0 , ' f' , 3 );
442+ mouseDisplay = true ;
439443}
440444
441445void UiInspector::actionTabChange (int ) {
@@ -450,6 +454,12 @@ void UiInspector::actionTabChange(int) {
450454void UiInspector::timerEvent (QTimerEvent *) {
451455 if (needRefresh)
452456 refresh ();
457+ if (mouseDisplay) {
458+ ui->mouseLabel ->setText (mousePos);
459+ ui->zoomLabel ->setText (mouseZoom);
460+ ui->rotationLabel ->setText (rotationAngles);
461+ mouseDisplay = false ;
462+ }
453463}
454464void UiInspector::refreshIp () {
455465 // IPs
0 commit comments