Skip to content

Commit f5c0a2c

Browse files
committedMay 29, 2018
Project dirtying improvements
- Mark as dirty when renaming a layer/group - Better approach to mark as dirty when changing CRS - Better approach to mark as dirty when changing subset string
1 parent b202d60 commit f5c0a2c

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9632,7 +9632,6 @@ void QgisApp::setLayerCrs()
96329632
}
96339633
}
96349634

9635-
markDirty();
96369635
refreshMapCanvas();
96379636
}
96389637

‎src/core/qgsmaplayer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ QgsMapLayer::QgsMapLayer( QgsMapLayer::LayerType type,
9393
// there for the compiler, so the pattern is actually \W
9494
mID.replace( QRegExp( "[\\W]" ), QStringLiteral( "_" ) );
9595

96+
connect( this, &QgsMapLayer::crsChanged, this, &QgsMapLayer::configChanged );
97+
connect( this, &QgsMapLayer::nameChanged, this, &QgsMapLayer::configChanged );
98+
9699
connect( mStyleManager, &QgsMapLayerStyleManager::currentStyleChanged, this, &QgsMapLayer::styleChanged );
97100
connect( mRefreshTimer, &QTimer::timeout, this, [ = ] { triggerRepaint( true ); } );
98101
}

‎src/core/qgsvectorlayer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,10 @@ bool QgsVectorLayer::setSubsetString( const QString &subset )
896896
updateFields();
897897

898898
if ( res )
899+
{
900+
emit configChanged();
899901
emit repaintRequested();
902+
}
900903

901904
return res;
902905
}

‎src/gui/qgsquerybuilder.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ void QgsQueryBuilder::accept()
264264

265265
return;
266266
}
267-
QgsProject::instance()->setDirty( true );
268267
}
269268

270269
QDialog::accept();

0 commit comments

Comments
 (0)
Please sign in to comment.