Skip to content
Permalink
Browse files

Correctly emit presetsChanged() from QgsVisibilityPresetCollection

  • Loading branch information
nyalldawson committed May 13, 2016
1 parent 7b64feb commit b51d70ab956e9c67ab30ac9d746ab2d8de064978
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/core/qgsvisibilitypresetcollection.cpp
@@ -57,6 +57,7 @@ void QgsVisibilityPresetCollection::insert( const QString& name, const QgsVisibi
mPresets.insert( name, state );

reconnectToLayersStyleManager();
emit presetsChanged();
}

void QgsVisibilityPresetCollection::update( const QString& name, const PresetRecord& state )
@@ -67,6 +68,7 @@ void QgsVisibilityPresetCollection::update( const QString& name, const PresetRec
mPresets[name] = state;

reconnectToLayersStyleManager();
emit presetsChanged();
}

void QgsVisibilityPresetCollection::removePreset( const QString& name )
@@ -77,13 +79,15 @@ void QgsVisibilityPresetCollection::removePreset( const QString& name )
mPresets.remove( name );

reconnectToLayersStyleManager();
emit presetsChanged();
}

void QgsVisibilityPresetCollection::clear()
{
mPresets.clear();

reconnectToLayersStyleManager();
emit presetsChanged();
}

QStringList QgsVisibilityPresetCollection::presets() const
@@ -231,6 +235,7 @@ void QgsVisibilityPresetCollection::readXML( const QDomDocument& doc )
}

reconnectToLayersStyleManager();
emit presetsChanged();
}

void QgsVisibilityPresetCollection::writeXML( QDomDocument& doc )
@@ -286,6 +291,7 @@ void QgsVisibilityPresetCollection::registryLayersRemoved( const QStringList& la
rec.mPerLayerCurrentStyle.remove( layerID );
}
}
emit presetsChanged();
}

void QgsVisibilityPresetCollection::layerStyleRenamed( const QString& oldName, const QString& newName )
@@ -308,4 +314,5 @@ void QgsVisibilityPresetCollection::layerStyleRenamed( const QString& oldName, c
rec.mPerLayerCurrentStyle[layerID] = newName;
}
}
emit presetsChanged();
}

0 comments on commit b51d70a

Please sign in to comment.
You can’t perform that action at this time.