mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Partial fix for ticket #1182 - Mark project as dirty when adding layers.
git-svn-id: http://svn.osgeo.org/qgis/trunk@8897 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
dff07a8e18
commit
5133fc7eec
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user