Skip to content

Commit

Permalink
Don't show menu and then symbol editor dialog immediately if enter is…
Browse files Browse the repository at this point in the history
… pressed on first page of style manager dialog
  • Loading branch information
nyalldawson committed Oct 11, 2021
1 parent f5f6da0 commit 58287d1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/gui/symbology/qgsstylemanagerdialog.cpp
Expand Up @@ -213,7 +213,12 @@ QgsStyleManagerDialog::QgsStyleManagerDialog( QgsStyle *style, QWidget *parent,

if ( !mReadOnly )
{
connect( btnAddItem, &QPushButton::clicked, this, [ = ]( bool ) { addItem(); }
connect( btnAddItem, &QPushButton::clicked, this, [ = ]( bool )
{
// only show add item if the btn doesn't have a menu -- otherwise it should show the menu instead!
if ( !btnAddItem->menu() )
{ addItem(); }
}
);

connect( btnRemoveItem, &QPushButton::clicked, this, [ = ]( bool ) { removeItem(); }
Expand Down

0 comments on commit 58287d1

Please sign in to comment.