From 8935becb09be43e793fa77c7535b4810d919571c Mon Sep 17 00:00:00 2001 From: apl Date: Wed, 12 Oct 2016 19:00:32 +0300 Subject: [PATCH] Fix highlighting problem during interaction --- src/MeasureGUI/MeasureGUI_AnnotationInteractor.cxx | 11 +++++++++++ src/MeasureGUI/MeasureGUI_AnnotationInteractor.h | 0 2 files changed, 11 insertions(+) mode change 100755 => 100644 src/MeasureGUI/MeasureGUI_AnnotationInteractor.cxx mode change 100755 => 100644 src/MeasureGUI/MeasureGUI_AnnotationInteractor.h diff --git a/src/MeasureGUI/MeasureGUI_AnnotationInteractor.cxx b/src/MeasureGUI/MeasureGUI_AnnotationInteractor.cxx old mode 100755 new mode 100644 index 9e1c0e3c5..504743406 --- a/src/MeasureGUI/MeasureGUI_AnnotationInteractor.cxx +++ b/src/MeasureGUI/MeasureGUI_AnnotationInteractor.cxx @@ -232,6 +232,11 @@ bool MeasureGUI_AnnotationInteractor::eventFilter( QObject* theObject, QEvent* t mySelection.Append( anAISContext->SelectedOwner() ); } + if ( anAISContext->IsHilighted( myActiveIO ) ) + { + anAISContext->Unhilight( myActiveIO, Standard_False ); + } + anAISContext->ClearSelected( Standard_False ); anAISContext->AddOrRemoveSelected( aDetected ); @@ -253,6 +258,12 @@ bool MeasureGUI_AnnotationInteractor::eventFilter( QObject* theObject, QEvent* t if ( !myActiveIO.IsNull() ) { const Handle(AIS_InteractiveContext) anAISContext = myViewer->getAISContext(); + + if ( anAISContext->IsHilighted( myActiveIO ) ) + { + anAISContext->Unhilight( myActiveIO, Standard_False ); + } + const QPoint aDelta = aMouseEv->pos() - myStartPoint; myActiveIO->Drag( aDelta.x(), (-aDelta.y()), aView3d ); anAISContext->Update( myActiveIO, Standard_False ); diff --git a/src/MeasureGUI/MeasureGUI_AnnotationInteractor.h b/src/MeasureGUI/MeasureGUI_AnnotationInteractor.h old mode 100755 new mode 100644 -- 2.39.2