diff --git a/HISTORY.rst b/HISTORY.rst index 1838ee4..6212720 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,7 +4,7 @@ History 1.15 (unreleased) ----------------- -- Nothing changed yet. +- Fix type error: #278 1.14 (2024-11-12) diff --git a/threedi_schematisation_editor/processing/alghorithms_inflow.py b/threedi_schematisation_editor/processing/alghorithms_inflow.py index b71c584..4cbadf0 100644 --- a/threedi_schematisation_editor/processing/alghorithms_inflow.py +++ b/threedi_schematisation_editor/processing/alghorithms_inflow.py @@ -133,19 +133,19 @@ def initAlgorithm(self, config=None): ) ) storm_pref = QgsProcessingParameterNumber( - self.STORMWATER_SEWER_PREFERENCE, self.tr("Stormwater sewer preference [m]"), type=1, defaultValue=0.0 + self.STORMWATER_SEWER_PREFERENCE, self.tr("Stormwater sewer preference [m]"), type=QgsProcessingParameterNumber.Double, defaultValue=0.0 ) storm_pref.setMinimum(0.0) storm_pref.setMetadata({"widget_wrapper": {"decimals": 2}}) self.addParameter(storm_pref) sanitary_pref = QgsProcessingParameterNumber( - self.SANITARY_SEWER_PREFERENCE, self.tr("Sanitary sewer preference [m]"), type=1, defaultValue=0.0 + self.SANITARY_SEWER_PREFERENCE, self.tr("Sanitary sewer preference [m]"), type=QgsProcessingParameterNumber.Double, defaultValue=0.0 ) sanitary_pref.setMinimum(0.0) sanitary_pref.setMetadata({"widget_wrapper": {"decimals": 2}}) self.addParameter(sanitary_pref) search_distance = QgsProcessingParameterNumber( - self.SEARCH_DISTANCE, self.tr("Search distance"), type=1, defaultValue=10.0 + self.SEARCH_DISTANCE, self.tr("Search distance"), type=QgsProcessingParameterNumber.Double, defaultValue=10.0 ) search_distance.setMinimum(0.01) search_distance.setMetadata({"widget_wrapper": {"decimals": 2}}) diff --git a/threedi_schematisation_editor/processing/algorithms_1d2d.py b/threedi_schematisation_editor/processing/algorithms_1d2d.py index 5876c7b..115956e 100644 --- a/threedi_schematisation_editor/processing/algorithms_1d2d.py +++ b/threedi_schematisation_editor/processing/algorithms_1d2d.py @@ -64,7 +64,7 @@ def initAlgorithm(self, config=None): ) ) - offset_param = QgsProcessingParameterNumber(self.OFFSET_DISTANCE, self.tr("Distance (m)"), type=1) + offset_param = QgsProcessingParameterNumber(self.OFFSET_DISTANCE, self.tr("Distance (m)"), type=QgsProcessingParameterNumber.Double) offset_param.setMetadata({"widget_wrapper": {"decimals": 3}}) self.addParameter(offset_param) self.addParameter(