From 0f175cb71da22f24112deb25b572b789bc1667c6 Mon Sep 17 00:00:00 2001 From: mpv Date: Wed, 27 Dec 2006 07:45:11 +0000 Subject: [PATCH] MPV NPAL13114: added 'deselected' slignal. This signal inform that everything is deselected in case of mouse-release event in OCC Viewer without Shift button pressed. --- src/OCCViewer/OCCViewer_ViewModel.cxx | 2 ++ src/OCCViewer/OCCViewer_ViewModel.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/OCCViewer/OCCViewer_ViewModel.cxx b/src/OCCViewer/OCCViewer_ViewModel.cxx index 5f1026947..51efb15f7 100755 --- a/src/OCCViewer/OCCViewer_ViewModel.cxx +++ b/src/OCCViewer/OCCViewer_ViewModel.cxx @@ -201,6 +201,8 @@ void OCCViewer_Viewer::onMouseRelease(SUIT_ViewWindow* theWindow, QMouseEvent* t myEndPnt.setX(theEvent->x()); myEndPnt.setY(theEvent->y()); OCCViewer_ViewWindow* aView = (OCCViewer_ViewWindow*) theWindow; bool aHasShift = (theEvent->state() & Qt::ShiftButton); + + if (!aHasShift) emit deselection(); if (myStartPnt == myEndPnt) { diff --git a/src/OCCViewer/OCCViewer_ViewModel.h b/src/OCCViewer/OCCViewer_ViewModel.h index 56ffbbfa4..654dec238 100755 --- a/src/OCCViewer/OCCViewer_ViewModel.h +++ b/src/OCCViewer/OCCViewer_ViewModel.h @@ -139,6 +139,7 @@ public: signals: void selectionChanged(); + void deselection(); protected: void initView( OCCViewer_ViewWindow* view ); -- 2.39.2