How to "Draw on Map Canvas" (as asked by Translate Raster Layer/Spatial Extent)?

Issue #1343 new
Agustin Lobo created an issue

One of the options in Translate Raster Layer/Spatial Extent is “Draw on Map Canvas”, but how?

Cannot find any drawing tool

Comments (5)

  1. Agustin Lobo reporter

    But then, how do we use this Translate option? When we are prompted ““Draw on Map Canvas””, should we go to the QGIS Map Canvas and the polygon would be read from there? I do not mind, I understand duplicating the drawing tools is not necessary (and a pain for you, I bet). But in that case, perhaps the image should get automatically displayed in the QGIS Map Canvas and the message should be “Draw on QGIS Map Canvas”.

  2. Andreas Rabe

    Unfortunately, this widget is not under my control. I can’t rename or reimplement those details.

  3. Benjamin Jakimow

    This may become possible in future by changing the canvas object used in the QgsProcesisnParameterWidgetContext.
    However, this requires modifications in the QGIS code. processingPlugin.executeAlgorithm(…) in plugins/processing/ProcessingPlugin.py and the AlgorithmDialog need some improvements to be able to acceppt none-standard QgsProcessingContext and QgsProcessingParameterWidgetContext objects.

    see QGIS\src\gui\processing\qgsprocessingwidgetwrapperimpl.cpp

    void QgsProcessingExtentWidgetWrapper::setWidgetContext( const QgsProcessingParameterWidgetContext &context )
    {
      QgsAbstractProcessingParameterWidgetWrapper::setWidgetContext( context );
      if ( mExtentWidget && context.mapCanvas() && type() != QgsProcessingGui::Modeler )
        mExtentWidget->setMapCanvas( context.mapCanvas() );
    }
    

  4. Agustin Lobo reporter

    “This may become possible…”

    What is “this”?

    All I ask is to clarify to the user what to do when this tool asks “Draw on Map Canvas”. Currently:

    • The user has a Canvas with an image, but no drawing tool.
    • The user has another Canvas with a drawing tool, but no image.

  5. Log in to comment