From ecd113de2429f54608bbcce043d118cd24b1bb5c Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Mon, 15 Jan 2018 13:38:31 +1000 Subject: [PATCH] Fix modeler dialog doesn't respect hide from modeler flag --- python/core/processing/qgsprocessingalgorithm.sip | 1 + python/plugins/processing/modeler/ModelerDialog.py | 2 +- src/core/processing/qgsprocessingalgorithm.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/python/core/processing/qgsprocessingalgorithm.sip b/python/core/processing/qgsprocessingalgorithm.sip index e0244553438..1c09ba3062e 100644 --- a/python/core/processing/qgsprocessingalgorithm.sip +++ b/python/core/processing/qgsprocessingalgorithm.sip @@ -179,6 +179,7 @@ alphanumeric characters only and no spaces or other formatting characters. .. seealso:: :py:func:`group` %End + virtual Flags flags() const; %Docstring Returns the flags indicating how and when the algorithm operates and should be exposed to users. diff --git a/python/plugins/processing/modeler/ModelerDialog.py b/python/plugins/processing/modeler/ModelerDialog.py index bdd59307260..86781d45307 100644 --- a/python/plugins/processing/modeler/ModelerDialog.py +++ b/python/plugins/processing/modeler/ModelerDialog.py @@ -711,7 +711,7 @@ class ModelerDialog(BASE, WIDGET): # Add algorithms for alg in algs: - if alg.flags() & QgsProcessingAlgorithm.FlagHideFromToolbox: + if alg.flags() & QgsProcessingAlgorithm.FlagHideFromModeler: continue groupItem = None if alg.group() in groups: diff --git a/src/core/processing/qgsprocessingalgorithm.h b/src/core/processing/qgsprocessingalgorithm.h index 8e1bf303ee5..97a38fa9e91 100644 --- a/src/core/processing/qgsprocessingalgorithm.h +++ b/src/core/processing/qgsprocessingalgorithm.h @@ -206,7 +206,7 @@ class CORE_EXPORT QgsProcessingAlgorithm * alphanumeric characters only and no spaces or other formatting characters. * \see group() */ - virtual QString groupId() const { return QString(); }; + virtual QString groupId() const { return QString(); } /** * Returns the flags indicating how and when the algorithm operates and should be exposed to users.