enable interactive tools that can operate on "Current canvas" extent to manage layers owned by QGIS

Issue #1017 new
Andreas Janz created an issue

By coincidence, the tools work fine with layers owned by QGIS as long as the extent used is “Whole raster”.

For “Current canvas” they fail, because we just look at EnMAP-Box map view canvases.

One tool is the Raster Layer Styling panel:

Other tools are:

Comments (2)

  1. Benjamin Jakimow

    You can use the maplayer.project() information
    To see if the layer instance is owned either by QGIS or the EnMAP-Box, you can use the maplayer.project():
    maplayer.project() == QgsProject.instance() -> QGIS
    maplayer.project() == EnMAPBox().project() -> EnMAP-Box

    Be aware that the same layer can occur in both projects. For example tests like
    if maplayer in list(QgsProject.instance().mapLayers().values())

    do not guarantee ownership of the underlying QgsMapLayerStore.

  2. Log in to comment