Skip to content

Commit

Permalink
Fix double redraw after applying vector properties
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Feb 5, 2013
1 parent 18cd145 commit 89bdb10
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/app/qgslabelinggui.cpp
Expand Up @@ -359,15 +359,20 @@ void QgsLabelingGui::collapseSample( QgsCollapsibleGroupBox* grpbx )

void QgsLabelingGui::apply()
{
QgsPalLayerSettings settings = layerSettings();
settings.writeToLayer( mLayer );
writeSettingsToLayer();
// trigger refresh
if ( mMapCanvas )
{
mMapCanvas->refresh();
}
}

void QgsLabelingGui::writeSettingsToLayer()
{
QgsPalLayerSettings settings = layerSettings();
settings.writeToLayer( mLayer );
}

QgsPalLayerSettings QgsLabelingGui::layerSettings()
{
QgsPalLayerSettings lyr;
Expand Down
1 change: 1 addition & 0 deletions src/app/qgslabelinggui.h
Expand Up @@ -37,6 +37,7 @@ class QgsLabelingGui : public QWidget, private Ui::QgsLabelingGuiBase
~QgsLabelingGui();

QgsPalLayerSettings layerSettings();
void writeSettingsToLayer();

public slots:
void collapseSample( QgsCollapsibleGroupBox* grpbx );
Expand Down
4 changes: 3 additions & 1 deletion src/app/qgsvectorlayerproperties.cpp
Expand Up @@ -425,7 +425,9 @@ void QgsVectorLayerProperties::reset( void )
void QgsVectorLayerProperties::apply()
{
if ( labelingDialog )
labelingDialog->apply();
{
labelingDialog->writeSettingsToLayer();
}

//
// Set up sql subset query if applicable
Expand Down

0 comments on commit 89bdb10

Please sign in to comment.