Skip to content
Permalink
Browse files

Small tweaks to selection behavior

  • Loading branch information
nyalldawson committed Oct 10, 2017
1 parent 0665080 commit 3735c7f06f5ce9812eb7601f30f96f62236c52c8
Showing with 12 additions and 4 deletions.
  1. +2 −3 src/app/layout/qgslayoutdesignerdialog.cpp
  2. +10 −1 src/gui/layout/qgslayoutviewtoolselect.cpp
@@ -644,12 +644,11 @@ void QgsLayoutDesignerDialog::showItemOptions( QgsLayoutItem *item, bool bringPa
}

std::unique_ptr< QgsLayoutItemBaseWidget > widget( QgsGui::layoutItemGuiRegistry()->createItemWidget( item ) );
delete mItemPropertiesStack->takeMainPanel();

if ( ! widget )
{
return;
}

delete mItemPropertiesStack->takeMainPanel();
widget->setDockMode( true );
connect( item, &QgsLayoutItem::destroyed, widget.get(), [this]
{
@@ -112,6 +112,10 @@ void QgsLayoutViewToolSelect::layoutPressEvent( QgsLayoutViewMouseEvent *event )
{
emit itemFocused( selectedItems.at( 0 ) );
}
else
{
emit itemFocused( nullptr );
}
}
else
{
@@ -173,7 +177,7 @@ void QgsLayoutViewToolSelect::layoutReleaseEvent( QgsLayoutViewMouseEvent *event
else
{
//not adding to or removing from selection, so clear current selection
layout()->deselectAll();
whileBlocking( layout() )->deselectAll();
}

//determine item selection mode, default to intersection
@@ -221,6 +225,11 @@ void QgsLayoutViewToolSelect::layoutReleaseEvent( QgsLayoutViewMouseEvent *event
{
emit itemFocused( selectedItemList.at( 0 ) );
}
else
{
emit itemFocused( nullptr );
}
mMouseHandles->selectionChanged();
}

void QgsLayoutViewToolSelect::wheelEvent( QWheelEvent *event )

0 comments on commit 3735c7f

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