Skip to content

Commit

Permalink
Partial fix for ticket #1182 - Mark project as dirty when adding layers.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@8897 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Jul 25, 2008
1 parent dff07a8 commit 5133fc7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -2081,6 +2081,8 @@ bool QgisApp::addVectorLayers(QStringList const & theLayerQStringList, const QSt

// Register this layer with the layers registry
QgsMapLayerRegistry::instance()->addMapLayer(layer);
// notify the project we've made a change
QgsProject::instance()->dirty(true);

}
else
Expand Down Expand Up @@ -2174,6 +2176,8 @@ void QgisApp::addDatabaseLayer()
{
// register this layer with the central layers registry
QgsMapLayerRegistry::instance()->addMapLayer(layer);
// notify the project we've made a change
QgsProject::instance()->dirty(true);
}
else
{
Expand Down Expand Up @@ -4448,6 +4452,8 @@ QgsVectorLayer* QgisApp::addVectorLayer(QString vectorLayerPath, QString baseNam
{
// Register this layer with the layers registry
QgsMapLayerRegistry::instance()->addMapLayer(layer);
// notify the project we've made a change
QgsProject::instance()->dirty(true);

statusBar()->showMessage(mMapCanvas->extent().stringRep(2));

Expand Down Expand Up @@ -4493,6 +4499,8 @@ void QgisApp::addMapLayer(QgsMapLayer *theMapLayer)
// not necessary since adding to registry adds to canvas mMapCanvas->addLayer(theMapLayer);

statusBar()->showMessage(mMapCanvas->extent().stringRep(2));
// notify the project we've made a change
QgsProject::instance()->dirty(true);

}
else
Expand Down Expand Up @@ -5167,6 +5175,8 @@ bool QgisApp::addRasterLayer(QgsRasterLayer * theRasterLayer)
SIGNAL(setStatus(QString)),
this,
SLOT(showStatusMessage(QString)));
// notify the project we've made a change
QgsProject::instance()->dirty(true);

return true;
}
Expand Down

0 comments on commit 5133fc7

Please sign in to comment.