Skip to content

Commit

Permalink
[layouts] Allow double-clicking to add layer to legend
Browse files Browse the repository at this point in the history
Fixes #14410
  • Loading branch information
nyalldawson committed Dec 19, 2017
1 parent b25c489 commit 6640257
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/layout/qgslayoutlegendlayersdialog.cpp
Expand Up @@ -30,6 +30,8 @@ QgsLayoutLegendLayersDialog::QgsLayoutLegendLayersDialog( QWidget *parent )
listMapLayers->setModel( mModel );
QModelIndex firstLayer = mModel->index( 0, 0 );
listMapLayers->selectionModel()->select( firstLayer, QItemSelectionModel::Select );

connect( listMapLayers, &QListView::doubleClicked, this, &QgsLayoutLegendLayersDialog::accept );
}

QgsLayoutLegendLayersDialog::~QgsLayoutLegendLayersDialog()
Expand Down

0 comments on commit 6640257

Please sign in to comment.