Skip to content
Permalink
Browse files

[FEATURE] Shift-clicking a selected composer item should deselect it

  • Loading branch information
nyalldawson authored and mhugent committed May 22, 2013
1 parent 0b18954 commit 8b131bd1d88190fcc21e1fe03ac9869fead83478
Showing with 18 additions and 3 deletions.
  1. +18 −3 src/gui/qgscomposerview.cpp
@@ -100,9 +100,24 @@ void QgsComposerView::mousePressEvent( QMouseEvent* e )
break;
}

selectedItem->setSelected( true );
QGraphicsView::mousePressEvent( e );
emit selectedItemChanged( selectedItem );
if (( e->modifiers() & Qt::ShiftModifier ) && ( selectedItem->selected() ) )
{
//SHIFT-clicking a selected item deselects it
selectedItem->setSelected( false );

//Check if we have any remaining selected items, and if so, update the item panel
QList<QgsComposerItem*> selectedItems = composition()->selectedComposerItems();
if ( selectedItems.size() > 0 )
{
emit selectedItemChanged( selectedItems.at( 0 ) );
}
}
else
{
selectedItem->setSelected( true );
QGraphicsView::mousePressEvent( e );
emit selectedItemChanged( selectedItem );
}
break;
}

0 comments on commit 8b131bd

Please sign in to comment.
You can’t perform that action at this time.