Skip to content
Permalink
Browse files
Partial fix for ticket #1182 - Mark project as dirty when adding layers.
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8897 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Jul 25, 2008
1 parent 608a324 commit 6dab7e7737a9982bbd3fa0cb64a527b64f9bd8a3
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/app/qgisapp.cpp
@@ -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
@@ -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
{
@@ -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));

@@ -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
@@ -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;
}

0 comments on commit 6dab7e7

Please sign in to comment.