//================================================================
bool GraphicsView_ViewPort::isItemAdded( QGraphicsItem* theItem )
{
- if( GraphicsView_Object* anObject = dynamic_cast<GraphicsView_Object*>( theItem ) )
+ if( dynamic_cast<GraphicsView_Object*>( theItem ) )
{
for( GraphicsView_ObjectList::iterator anIter = myObjects.begin(); anIter != myObjects.end(); anIter++ )
if( theItem == *anIter )
bool anIsHighlighted = false;
bool anIsOnObject = false;
- GraphicsView_Object* aPreviousHighlightedObject = myHighlightedObject;
GraphicsView_Object* aHighlightedObject = 0;
QCursor aCursor;
{
aStatus = GVSS_NoChanged;
- bool updateAll = false;
if( !theIsAppend )
{
if( !mySelectedObjects.isEmpty() )
else
anObjectsToMove.append( anObject );
}
- else if( ( hasInteractionFlag( DraggingByMiddleButton ) && ( e->buttons() & Qt::MidButton ) ||
- isDraggingSelectedByLeftButton() && ( e->buttons() & Qt::LeftButton ) ) &&
+ else if( ( ( hasInteractionFlag( DraggingByMiddleButton ) && ( e->buttons() & Qt::MidButton ) ) ||
+ ( isDraggingSelectedByLeftButton() && ( e->buttons() & Qt::LeftButton ) ) ) &&
nbSelected() )
{
for( initSelected(); moreSelected(); nextSelected() )
if( ( getHighlightedObject() &&
getHighlightedObject()->isMovable() &&
!( anAccel || e->button() != Qt::LeftButton ) ) ||
- ( ( hasInteractionFlag( DraggingByMiddleButton ) && e->button() == Qt::MidButton ||
- isDraggingSelectedByLeftButton() && e->button() == Qt::LeftButton ) &&
+ ( ( ( hasInteractionFlag( DraggingByMiddleButton ) && e->button() == Qt::MidButton ) ||
+ ( isDraggingSelectedByLeftButton() && e->button() == Qt::LeftButton ) ) &&
nbSelected() && !anAccel ) )
{
myIsDragging = true;