Skip to content
Permalink
Browse files

Move down the "Remove rule" action in contextual menu

to avoid it being accidentally clicked
  • Loading branch information
DelazJ authored and nyalldawson committed Jan 2, 2020
1 parent e6a83c9 commit c367e770de510e61d10870c7ba995b4ec9c3ced2
@@ -44,9 +44,9 @@ QgsRuleBased3DRendererWidget::QgsRuleBased3DRendererWidget( QWidget *parent )
mDeleteAction = new QAction( tr( "Remove Rule" ), this );
mDeleteAction->setShortcut( QKeySequence( QKeySequence::Delete ) );

viewRules->addAction( mDeleteAction );
viewRules->addAction( mCopyAction );
viewRules->addAction( mPasteAction );
viewRules->addAction( mDeleteAction );

connect( viewRules, &QAbstractItemView::doubleClicked, this, static_cast<void ( QgsRuleBased3DRendererWidget::* )( const QModelIndex & )>( &QgsRuleBased3DRendererWidget::editRule ) );

@@ -71,9 +71,9 @@ QgsRuleBasedLabelingWidget::QgsRuleBasedLabelingWidget( QgsVectorLayer *layer, Q
mDeleteAction = new QAction( tr( "Remove Rule" ), this );
mDeleteAction->setShortcut( QKeySequence( QKeySequence::Delete ) );

viewRules->addAction( mDeleteAction );
viewRules->addAction( mCopyAction );
viewRules->addAction( mPasteAction );
viewRules->addAction( mDeleteAction );

connect( viewRules, &QAbstractItemView::doubleClicked, this, static_cast<void ( QgsRuleBasedLabelingWidget::* )( const QModelIndex & )>( &QgsRuleBasedLabelingWidget::editRule ) );

@@ -83,9 +83,9 @@ QgsRuleBasedRendererWidget::QgsRuleBasedRendererWidget( QgsVectorLayer *layer, Q
mDeleteAction = new QAction( tr( "Remove Rule" ), this );
mDeleteAction->setShortcut( QKeySequence( QKeySequence::Delete ) );

viewRules->addAction( mDeleteAction );
viewRules->addAction( mCopyAction );
viewRules->addAction( mPasteAction );
viewRules->addAction( mDeleteAction );

mRefineMenu = new QMenu( tr( "Refine Current Rule" ), btnRefineRule );
mRefineMenu->addAction( tr( "Add Scales to Rule" ), this, SLOT( refineRuleScales() ) );

0 comments on commit c367e77

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