Skip to content

Commit

Permalink
More style manager fixes:
Browse files Browse the repository at this point in the history
- disable ramp actions when nothing selected
- disabled Edit item when nothing selected
- rename "Apply group" to "Add to group"
  • Loading branch information
nyalldawson committed Jan 7, 2016
1 parent 32e2849 commit fcef952
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/gui/symbology-ng/qgsstylev2managerdialog.cpp
Expand Up @@ -142,7 +142,7 @@ QgsStyleV2ManagerDialog::QgsStyleV2ManagerDialog( QgsStyleV2* style, QWidget* pa
// Context menu for symbols/colorramps. The menu entries for every group are created when displaying the menu.
mGroupMenu = new QMenu( this );
mGroupListMenu = new QMenu( mGroupMenu );
mGroupListMenu->setTitle( tr( "Apply Group" ) );
mGroupListMenu->setTitle( tr( "Add to group" ) );
mGroupListMenu->setEnabled( false );
mGroupMenu->addMenu( mGroupListMenu );
actnUngroup->setData( 0 );
Expand Down Expand Up @@ -301,6 +301,8 @@ void QgsStyleV2ManagerDialog::populateColorRamps( const QStringList& colorRamps,
model->appendRow( item );
delete ramp;
}
selectedSymbolsChanged( QItemSelection(), QItemSelection() );
symbolSelected( listItems->currentIndex() );
}

int QgsStyleV2ManagerDialog::currentItemType()
Expand Down Expand Up @@ -1303,6 +1305,7 @@ void QgsStyleV2ManagerDialog::selectedSymbolsChanged( const QItemSelection& sele
actnUngroup->setDisabled( nothingSelected );
actnExportAsPNG->setDisabled( nothingSelected );
actnExportAsSVG->setDisabled( nothingSelected );
actnEditItem->setDisabled( nothingSelected );
}

void QgsStyleV2ManagerDialog::enableSymbolInputs( bool enable )
Expand Down

0 comments on commit fcef952

Please sign in to comment.