diff --git a/felt/core/fsl_converter.py b/felt/core/fsl_converter.py index f0e46a8..1580707 100644 --- a/felt/core/fsl_converter.py +++ b/felt/core/fsl_converter.py @@ -1187,9 +1187,8 @@ def gradient_fill_to_fsl( """ Converts a QGIS gradient fill symbol layer to FSL """ - color = (layer.color() if layer.color().isValid() and - layer.color().alphaF() > 0 else - layer.color2()) + color1_valid = layer.color().isValid() and layer.color().alphaF() > 0 + color = layer.color() if color1_valid else layer.color2() if not color.isValid() or color.alphaF() == 0: return [] diff --git a/felt/core/map_uploader.py b/felt/core/map_uploader.py index a40c821..76d58b7 100644 --- a/felt/core/map_uploader.py +++ b/felt/core/map_uploader.py @@ -256,10 +256,6 @@ def run(self): self.feedback = QgsFeedback() - upload_raster_as_styled = QgsSettings().value( - "felt/upload_raster_as_styled", True, bool, QgsSettings.Plugins - ) - multi_step_feedback = MultiStepFeedback( total_steps, self.feedback ) diff --git a/felt/test/test_layer_exporter.py b/felt/test/test_layer_exporter.py index 2e6ad3b..0df35d7 100644 --- a/felt/test/test_layer_exporter.py +++ b/felt/test/test_layer_exporter.py @@ -160,6 +160,7 @@ def test_layer_style(self): ) # should only be the layer's style, not the source information self.assertNotIn('points.gpkg', style) + # pylint: enable=protected-access def test_vector_conversion(self): @@ -235,8 +236,10 @@ def test_raster_conversion_raw(self): exporter = LayerExporter( QgsCoordinateTransformContext() ) - result = exporter.export_layer_for_felt(layer, - force_upload_raster_as_styled=False) + result = exporter.export_layer_for_felt( + layer, + force_upload_raster_as_styled=False + ) self.assertEqual(result.result, LayerExportResult.Success) self.assertTrue(result.filename) self.assertEqual(result.filename[-4:], '.zip') @@ -280,8 +283,10 @@ def test_raster_conversion_styled(self): exporter = LayerExporter( QgsCoordinateTransformContext() ) - result = exporter.export_layer_for_felt(layer, - force_upload_raster_as_styled=True) + result = exporter.export_layer_for_felt( + layer, + force_upload_raster_as_styled=True + ) self.assertEqual(result.result, LayerExportResult.Success) self.assertTrue(result.filename) self.assertEqual(result.filename[-4:], '.zip')