Skip to content

Commit

Permalink
[gui] Address situation where applying style enables deprecated labels
Browse files Browse the repository at this point in the history
  • Loading branch information
dakcarto committed Sep 2, 2013
1 parent d212cb4 commit a339702
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/app/qgsvectorlayerproperties.cpp
Expand Up @@ -418,6 +418,14 @@ void QgsVectorLayerProperties::syncToLayer( void )

mFieldsPropertiesDialog->init();

if ( layer->hasLabelsEnabled() )
{
// though checked on projectRead, can reoccur after applying a style with enabled deprecated labels
// otherwise, the deprecated labels will render, but the tab to disable them will not show up
QgsProject::instance()->writeEntry( "DeprecatedLabels", "/Enabled", true );
// (this also overrides any '/Enabled, false' project property the user may have manually set)
}

// delete deprecated labels tab if not already used by project
// NOTE: this is not ideal, but a quick fix for QGIS 2.0 release
bool ok;
Expand All @@ -434,7 +442,8 @@ void QgsVectorLayerProperties::syncToLayer( void )
mOptsPage_LabelsOld = 0;
}
}
} // reset()

} // syncToLayer()



Expand Down

0 comments on commit a339702

Please sign in to comment.