mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
If composer map is set to use project CRS, update cached render
when project CRS changes This should prevent one of the most common confusions with composer maps - users inserting multiple maps, with apparently different CRS due to outdated cache renders, and getting confused because outputs from composer look different to the composer view....
This commit is contained in:
parent
5e3b903955
commit
c5566e72c0
@ -1142,6 +1142,16 @@ void QgsComposerMap::connectUpdateSlot()
|
||||
// redraws the map AFTER layers are removed
|
||||
connect( project, &QgsProject::layersRemoved, this, &QgsComposerMap::renderModeUpdateCachedImage );
|
||||
connect( project, &QgsProject::legendLayersAdded, this, &QgsComposerMap::renderModeUpdateCachedImage );
|
||||
|
||||
connect( project, &QgsProject::crsChanged, this, [ = ]
|
||||
{
|
||||
if ( !mCrs.isValid() )
|
||||
{
|
||||
//using project CRS, which just changed....
|
||||
invalidateCache();
|
||||
}
|
||||
} );
|
||||
|
||||
}
|
||||
connect( mComposition, &QgsComposition::refreshItemsTriggered, this, &QgsComposerMap::invalidateCache );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user