Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## [Unreleased]
- Pass the QGIS plugin portal's Qt6 compatibility check: legacy enum fallbacks for QGIS < 3.30/3.36 are now spelled with their enum class (no behavior change)

## [2.1.1] - 2026-09-26
_Not published on the QGIS plugin portal (it failed the portal's Qt6 check); superseded by 2.1.2, which includes all of the fixes below._

- Fix the interactive map tool crashing on every single click under QGIS 4 / Qt 6 (`QMouseEvent.x()`/`y()` no longer exist); drag-rectangle was unaffected
- Fix the Processing algorithm failing on QGIS 3.22-3.36 when creating the `_rotated` output field
- Fix polygon holes (interior rings) influencing the rotation: the pivot vertex and its adjacent segments now always come from the exterior ring
Expand Down
13 changes: 7 additions & 6 deletions PolygonsParallelToLine/src/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
COLUMN_NAME = "_rotated"
OUTPUT_LAYER_NAME = "Output layer with rotated features"

# Scoped enums below were added in QGIS 3.30/3.36; older releases only expose the legacy aliases.
# Qgis.* scoped enums were added in QGIS 3.30/3.36; older releases fall back to the legacy enums, spelled
# with their enum class so the plugin portal's Qt6 check (a static scan) accepts them.
try:
LINE_GEOMETRY = Qgis.GeometryType.Line
POLYGON_GEOMETRY = Qgis.GeometryType.Polygon
except AttributeError:
LINE_GEOMETRY = QgsWkbTypes.LineGeometry
POLYGON_GEOMETRY = QgsWkbTypes.PolygonGeometry
LINE_GEOMETRY = QgsWkbTypes.GeometryType.LineGeometry
POLYGON_GEOMETRY = QgsWkbTypes.GeometryType.PolygonGeometry

# Line first: where both are candidates, a line is preferred.
SUPPORTED_GEOMETRIES = (LINE_GEOMETRY, POLYGON_GEOMETRY)
Expand All @@ -19,9 +20,9 @@
SOURCE_TYPE_POLYGON = Qgis.ProcessingSourceType.VectorPolygon
NUMBER_TYPE_DOUBLE = Qgis.ProcessingNumberParameterType.Double
except AttributeError:
SOURCE_TYPE_LINE = QgsProcessing.TypeVectorLine
SOURCE_TYPE_POLYGON = QgsProcessing.TypeVectorPolygon
NUMBER_TYPE_DOUBLE = QgsProcessingParameterNumber.Double
SOURCE_TYPE_LINE = QgsProcessing.SourceType.TypeVectorLine
SOURCE_TYPE_POLYGON = QgsProcessing.SourceType.TypeVectorPolygon
NUMBER_TYPE_DOUBLE = QgsProcessingParameterNumber.Type.Double

# QgsField(name, QMetaType.Type) needs QGIS 3.38+.
if Qgis.QGIS_VERSION_INT >= 33800: # noqa: PLR2004
Expand Down
Loading