@@ -1651,7 +1651,7 @@ void QgisApp::createToolBars()
1651
1651
case 1 : defNewLayerAction = mActionNewVectorLayer ; break ;
1652
1652
}
1653
1653
bt->setDefaultAction ( defNewLayerAction );
1654
- QAction* newLayerAction = mLayerToolBar ->insertWidget ( mActionRemoveLayer , bt );
1654
+ QAction* newLayerAction = mLayerToolBar ->insertWidget ( mActionAddDelimitedText , bt );
1655
1655
newLayerAction->setObjectName ( " ActionNewLayer" );
1656
1656
connect ( bt, SIGNAL ( triggered ( QAction * ) ), this , SLOT ( toolButtonActionTriggered ( QAction * ) ) );
1657
1657
@@ -2344,12 +2344,17 @@ void QgisApp::initLayerTreeView()
2344
2344
btnCollapseAll->setToolTip ( tr ( " Collapse All" ) );
2345
2345
connect ( btnCollapseAll, SIGNAL ( clicked () ), mLayerTreeView , SLOT ( collapseAll () ) );
2346
2346
2347
+ QToolButton* btnRemoveItem = new QToolButton;
2348
+ btnRemoveItem->setDefaultAction ( this ->mActionRemoveLayer );
2349
+ btnRemoveItem->setAutoRaise ( true );
2350
+
2347
2351
QHBoxLayout* toolbarLayout = new QHBoxLayout;
2348
2352
toolbarLayout->setContentsMargins ( QMargins ( 5 , 0 , 5 , 0 ) );
2349
2353
toolbarLayout->addWidget ( btnAddGroup );
2350
2354
toolbarLayout->addWidget ( btnVisibilityGroups );
2351
2355
toolbarLayout->addWidget ( btnExpandAll );
2352
2356
toolbarLayout->addWidget ( btnCollapseAll );
2357
+ toolbarLayout->addWidget ( btnRemoveItem );
2353
2358
toolbarLayout->addStretch ();
2354
2359
2355
2360
QVBoxLayout* vboxLayout = new QVBoxLayout;
@@ -8768,7 +8773,6 @@ void QgisApp::legendLayerSelectionChanged( void )
8768
8773
{
8769
8774
QList<QgsLayerTreeLayer*> selectedLayers = mLayerTreeView ? mLayerTreeView ->selectedLayerNodes () : QList<QgsLayerTreeLayer*>();
8770
8775
8771
- mActionRemoveLayer ->setEnabled ( selectedLayers.count () > 0 );
8772
8776
mActionDuplicateLayer ->setEnabled ( selectedLayers.count () > 0 );
8773
8777
mActionSetLayerScaleVisibility ->setEnabled ( selectedLayers.count () > 0 );
8774
8778
mActionSetLayerCRS ->setEnabled ( selectedLayers.count () > 0 );
0 commit comments