}
+/*!
+ Returns tue if selection by rect is preformed
+*/
+bool GLViewer_ViewPort2d::isSelectByRect() const
+{
+ return mypFirstPoint && mypLastPoint;
+}
+
/*!
Finishes rectangle selection
*/
void drawSelectByRect( int x, int y );
//! Pass rect into selector and update
void finishSelectByRect();
+
+ //! Pass rect into selector and update
+ bool isSelectByRect() const;
//! \warnign It is for ouv
bool startPulling( GLViewer_Pnt );
transPoint( x, y );
GLViewer_Pnt point( x, y );
- if( e->button() == Qt::LeftButton && vp->startPulling( point ) )
- return;
+ // moved to updateOperations() - see below
+ //if( e->button() == Qt::LeftButton && vp->startPulling( point ) )
+ // return;
if( e->button() == Qt::LeftButton && !(vp->currentBlock() & BS_Selection) && !myGLContext->getCurrentObject() )
- vp->startSelectByRect( e->x(), e->y() );
+ vp->startSelectByRect( e->x(), e->y() );
}
/*!
}
/*if( vp->isDragProcess() == GLViewer_ViewPort2d::inDrag )
- return true;
+ return true;*/
- if( e->state() == Qt::LeftButton && vp->startPulling( point ) )
+ if( e->state() == Qt::LeftButton )
{
- vp->finishSelectByRect();
+ if ( !vp->isSelectByRect() && vp->startPulling( point ) )
+ {
+ vp->finishSelectByRect(); //startSelectByRect
return true;
- }*/
+ }
+ }
if( !myGLContext->getCurrentObject() )
{