Navigation Menu

Skip to content

Commit

Permalink
[layertree] Fix last bit of #10384 (update on capitalization change)
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Jun 13, 2014
1 parent 559b810 commit 9868334
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -7245,6 +7245,8 @@ void QgisApp::showOptionsDialog( QWidget *parent, QString currentPage )
QSettings mySettings;
QString oldScales = mySettings.value( "Map/scales", PROJECT_SCALES ).toString();

bool oldCapitalise = mySettings.value( "/qgis/capitaliseLayerName", QVariant( false ) ).toBool();

QgsOptions *optionsDialog = new QgsOptions( parent );
if ( !currentPage.isEmpty() )
{
Expand Down Expand Up @@ -7272,6 +7274,13 @@ void QgisApp::showOptionsDialog( QWidget *parent, QString currentPage )

mMapCanvas->setMapUpdateInterval( mySettings.value( "/qgis/map_update_interval", 250 ).toInt() );

if ( oldCapitalise != mySettings.value( "/qgis/capitaliseLayerName", QVariant( false ) ).toBool() )
{
// if the layer capitalization has changed, we need to update all layer names
foreach ( QgsMapLayer* layer, QgsMapLayerRegistry::instance()->mapLayers() )
layer->setLayerName( layer->originalName() );
}

//update any open compositions so they reflect new composer settings
//we have to push the changes to the compositions here, because compositions
//have no access to qgisapp and accordingly can't listen in to changes
Expand Down
1 change: 1 addition & 0 deletions src/gui/layertree/qgslayertreemodel.cpp
Expand Up @@ -745,6 +745,7 @@ void QgsLayerTreeModel::connectToLayer( QgsLayerTreeLayer* nodeLayer )
connect( layer, SIGNAL( editingStarted() ), this, SLOT( layerNeedsUpdate() ), Qt::UniqueConnection );
connect( layer, SIGNAL( editingStopped() ), this, SLOT( layerNeedsUpdate() ), Qt::UniqueConnection );
connect( layer, SIGNAL( layerModified() ), this, SLOT( layerNeedsUpdate() ), Qt::UniqueConnection );
connect( layer, SIGNAL( layerNameChanged() ), this, SLOT( layerNeedsUpdate() ), Qt::UniqueConnection );
}
}

Expand Down

0 comments on commit 9868334

Please sign in to comment.