//
#include "OCCViewer_ViewModel.h"
-#include "OCCViewer.h"
#include "OCCViewer_ViewFrame.h"
#include "OCCViewer_VService.h"
#include "OCCViewer_ViewPort3d.h"
myIsUseLocalSelection(false),
#endif
myClippingDlg (NULL),
- myFitter(0)
+ myFitter(0),
+ mySelectionDone(false)
{
// init CasCade viewers
myV3dViewer = OCCViewer_VService::CreateViewer( TCollection_ExtendedString("Viewer3d").ToExtString() );
myEndPnt.setX(theEvent->x()); myEndPnt.setY(theEvent->y());
bool aHasShift = (theEvent->modifiers() & Qt::ShiftModifier);
-
- if (myStartPnt == myEndPnt)
+ // In case of small tremor of a mouse pointer, consider it as a click
+ if ( !OCCViewer::overThreshold( QRect( myStartPnt, myEndPnt ) ) && !mySelectionDone)
{
if (!aHasShift) {
myAISContext->ClearCurrents( false );
myAISContext->ShiftSelect( Standard_True );
else
myAISContext->Select( Standard_True );
+ emit selectionChanged();
}
+ mySelectionDone = false;
+
//else
//{
// if (aHasShift && myMultiSelectionEnabled)
// myAISContext->UpdateCurrentViewer();
//}
- emit selectionChanged();
}
/*!