Bug report #11433

Processing: Help editor does not save the text

Added by Paolo Cavallini about 5 years ago. Updated over 4 years ago.

Status:Closed
Priority:Normal
Assignee:Victor Olaya
Category:Processing/Modeller
Affected QGIS version:2.8.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:19709

Description

The user can add alg description etc., but the data are not saved in the model (when it is reopened, the text is not shown)


Related issues

Related to QGIS Application - Bug report #11087: Modeler, help from QGIS 2.2 don't work in QGIS 2.4 Closed 2014-08-21
Duplicated by QGIS Application - Bug report #12127: Help text for Models does not save In Graphical Modeler Closed 2015-02-04

History

#1 Updated by Alexander Bruy about 5 years ago

  • Category changed from Processing/GUI to Processing/Modeller
  • Status changed from Open to Rejected

This caused by recent modeler overhaul

#2 Updated by Paolo Cavallini about 5 years ago

  • Status changed from Rejected to Feedback

Sorry I miss your point: the data should be saved in the model anyway.

#3 Updated by Alexander Bruy about 5 years ago

  • Resolution set to fixed/implemented
  • Status changed from Feedback to Closed

There is another ticket about this issue, see #11087.

Anyway, Victor fixed it in master.

#4 Updated by Paolo Cavallini almost 5 years ago

  • Resolution deleted (fixed/implemented)
  • Status changed from Closed to Reopened

Still true on 2.8.1

#5 Updated by Paolo Cavallini almost 5 years ago

  • Affected QGIS version changed from 2.4.0 to 2.8.1

#6 Updated by Arnaud Morvan over 4 years ago

Actually in master help edition dialog work on a copy of the algorithm.
https://github.com/qgis/QGIS/blob/master/python/plugins/processing/modeler/ModelerDialog.py#L224

The help dialog take the (cloned) algorithm as a parameter,
during initialization, it copy algorithm help content into a local variable (but it is reference copy)

it modify the local dictionnary during edition, and the (cloned) algorithm help content in the same time.

on validation
it affect the local dictionnary to the (cloned) algorithm (but it the same reference affectation <=> do nothing)

Note : with the script dialog, after comming back from the help dialog, it get the help content from the help dialog local variable (if help dialog was accepted).

I can propose a simple solution for the model case:
do the same thing that the script dialog

Regards

Arnaud

#7 Updated by Arnaud Morvan over 4 years ago

I notice that, for the script case, if script help file already exist, help content is written to file on help dialog validation, and written a second time when script is saved.

If script file does not exist, it will be saved only when script file is saved.

For the model case, help content is only write down on model save.

This is not consistent.

I propose to not save script help content in help validation but only in caller acceptation (model or script dialog)
like this it remove some specific code to script and models from the help dialog.

Arnaud

#9 Updated by Paolo Cavallini over 4 years ago

  • Status changed from Reopened to Closed
  • Resolution set to fixed/implemented

Fixed, merci Arnaud!

Also available in: Atom PDF