mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -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 ) );
|
std::unique_ptr< QgsLayoutItemBaseWidget > widget( QgsGui::layoutItemGuiRegistry()->createItemWidget( item ) );
|
||||||
if ( ! widget )
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
delete mItemPropertiesStack->takeMainPanel();
|
delete mItemPropertiesStack->takeMainPanel();
|
||||||
|
|
||||||
|
if ( ! widget )
|
||||||
|
return;
|
||||||
|
|
||||||
widget->setDockMode( true );
|
widget->setDockMode( true );
|
||||||
connect( item, &QgsLayoutItem::destroyed, widget.get(), [this]
|
connect( item, &QgsLayoutItem::destroyed, widget.get(), [this]
|
||||||
{
|
{
|
||||||
|
@ -112,6 +112,10 @@ void QgsLayoutViewToolSelect::layoutPressEvent( QgsLayoutViewMouseEvent *event )
|
|||||||
{
|
{
|
||||||
emit itemFocused( selectedItems.at( 0 ) );
|
emit itemFocused( selectedItems.at( 0 ) );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
emit itemFocused( nullptr );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -173,7 +177,7 @@ void QgsLayoutViewToolSelect::layoutReleaseEvent( QgsLayoutViewMouseEvent *event
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//not adding to or removing from selection, so clear current selection
|
//not adding to or removing from selection, so clear current selection
|
||||||
layout()->deselectAll();
|
whileBlocking( layout() )->deselectAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
//determine item selection mode, default to intersection
|
//determine item selection mode, default to intersection
|
||||||
@ -221,6 +225,11 @@ void QgsLayoutViewToolSelect::layoutReleaseEvent( QgsLayoutViewMouseEvent *event
|
|||||||
{
|
{
|
||||||
emit itemFocused( selectedItemList.at( 0 ) );
|
emit itemFocused( selectedItemList.at( 0 ) );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
emit itemFocused( nullptr );
|
||||||
|
}
|
||||||
|
mMouseHandles->selectionChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QgsLayoutViewToolSelect::wheelEvent( QWheelEvent *event )
|
void QgsLayoutViewToolSelect::wheelEvent( QWheelEvent *event )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user