[layouts] Allow double-clicking to add layer to legend

Fixes #14410
This commit is contained in:
Nyall Dawson 2017-12-19 11:06:57 +10:00
parent b25c48917f
commit 664025709e

View File

@ -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()