Skip to content

Commit

Permalink
follow up e8061c7
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Oct 3, 2012
1 parent eeefecf commit 7bff3cf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/qgsvectorlayerproperties.cpp
Expand Up @@ -110,7 +110,7 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(
if ( layer->hasGeometryType() )
{
// Create the Labeling dialog tab
layout= new QVBoxLayout( labelingFrame );
layout = new QVBoxLayout( labelingFrame );
layout->setMargin( 0 );
labelingDialog = new QgsLabelingGui( QgisApp::instance()->palLabeling(), layer, QgisApp::instance()->mapCanvas(), labelingFrame );
layout->addWidget( labelingDialog );
Expand Down Expand Up @@ -470,10 +470,12 @@ void QgsVectorLayerProperties::updateButtons()
}
else
{
int cap = layer->dataProvider()->capabilities();
bool canChangeAttributes = cap & QgsVectorDataProvider::ChangeAttributeValues;
mAddAttributeButton->setEnabled( false );
mDeleteAttributeButton->setEnabled( false );
mToggleEditingButton->setChecked( false );
mToggleEditingButton->setEnabled( false );
mToggleEditingButton->setEnabled( canChangeAttributes && !layer->isReadOnly() );
mCalculateFieldButton->setEnabled( false );
}
}
Expand Down

0 comments on commit 7bff3cf

Please sign in to comment.