mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Small tweaks to selection behavior
This commit is contained in:
parent
06650808b5
commit
3735c7f06f
@ -644,12 +644,11 @@ void QgsLayoutDesignerDialog::showItemOptions( QgsLayoutItem *item, bool bringPa
|
||||
}
|
||||
|
||||
std::unique_ptr< QgsLayoutItemBaseWidget > widget( QgsGui::layoutItemGuiRegistry()->createItemWidget( item ) );
|
||||
if ( ! widget )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
delete mItemPropertiesStack->takeMainPanel();
|
||||
|
||||
if ( ! widget )
|
||||
return;
|
||||
|
||||
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 )
|
||||
|
Loading…
x
Reference in New Issue
Block a user