Skip to content

Commit

Permalink
Project dirtying improvements
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
nirvn committed May 29, 2018
1 parent b202d60 commit f5c0a2c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9632,7 +9632,6 @@ void QgisApp::setLayerCrs()
}
}

markDirty();
refreshMapCanvas();
}

Expand Down
3 changes: 3 additions & 0 deletions src/core/qgsmaplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ QgsMapLayer::QgsMapLayer( QgsMapLayer::LayerType type,
// there for the compiler, so the pattern is actually \W
mID.replace( QRegExp( "[\\W]" ), QStringLiteral( "_" ) );

connect( this, &QgsMapLayer::crsChanged, this, &QgsMapLayer::configChanged );
connect( this, &QgsMapLayer::nameChanged, this, &QgsMapLayer::configChanged );

connect( mStyleManager, &QgsMapLayerStyleManager::currentStyleChanged, this, &QgsMapLayer::styleChanged );
connect( mRefreshTimer, &QTimer::timeout, this, [ = ] { triggerRepaint( true ); } );
}
Expand Down
3 changes: 3 additions & 0 deletions src/core/qgsvectorlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,10 @@ bool QgsVectorLayer::setSubsetString( const QString &subset )
updateFields();

if ( res )
{
emit configChanged();
emit repaintRequested();
}

return res;
}
Expand Down
1 change: 0 additions & 1 deletion src/gui/qgsquerybuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ void QgsQueryBuilder::accept()

return;
}
QgsProject::instance()->setDirty( true );
}

QDialog::accept();
Expand Down

0 comments on commit f5c0a2c

Please sign in to comment.