Skip to content

Commit

Permalink
Merge branch 'main' into 229-point-annotations-stay-after-saving-proj…
Browse files Browse the repository at this point in the history
…ect-and-not-deleting-them-manually
  • Loading branch information
koebi committed Apr 26, 2024
2 parents 63b5758 + bffa119 commit 7bb3abe
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,15 @@ RELEASING:
-->

# Unreleased

### Fixed
- QGis crashes when selecting more than two vertices for deletion ([#230](https://github.com/GIScience/orstools-qgis-plugin/issues/230))
- Vertices on canvas not depicted fully with n having more than one digit in length ([#235](https://github.com/GIScience/orstools-qgis-plugin/issues/235))
- Fix: Point Annotations stay after saving project and not deleting them manually([#229](https://github.com/GIScience/orstools-qgis-plugin/issues/229))

### Added
- Add support for decimal ranges with isochrones([#237](https://github.com/GIScience/orstools-qgis-plugin/issues/237))

## [1.7.1] - 2024-01-15

### Added
Expand Down
8 changes: 4 additions & 4 deletions ORStools/gui/ORStoolsDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,12 +496,12 @@ def _on_clear_listwidget_click(self):
"""Clears the contents of the QgsListWidget and the annotations."""
items = self.routing_fromline_list.selectedItems()
if items:
rows = [self.routing_fromline_list.row(item) for item in items]
# if items are selected, only clear those
for item in items:
row = self.routing_fromline_list.row(item)
self.routing_fromline_list.takeItem(row)
for row in sorted(rows, reverse=True):
if self.annotations:
self.project.annotationManager().removeAnnotation(self.annotations.pop(row))
self.routing_fromline_list.takeItem(row)
else:
# else clear all items and annotations
self.routing_fromline_list.clear()
Expand All @@ -523,7 +523,7 @@ def _linetool_annotate_point(self, point, idx, crs=None):

annotation.setDocument(c)

annotation.setFrameSizeMm(QSizeF(7, 5))
annotation.setFrameSizeMm(QSizeF(8, 5))
annotation.setFrameOffsetFromReferencePointMm(QPointF(1.3, 1.3))
annotation.setMapPosition(point)
annotation.setMapPositionCrs(crs)
Expand Down
4 changes: 3 additions & 1 deletion ORStools/proc/isochrones_layer_proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ def processAlgorithm(self, parameters, context, feedback):

factor = 60 if dimension == "time" else 1
ranges_raw = parameters[self.IN_RANGES]
ranges_proc = [x * factor for x in map(int, ranges_raw.split(","))]
ranges_proc = [x * factor for x in map(float, ranges_raw.split(","))]
# round to the nearest second or meter
ranges_proc = list(map(int, ranges_proc))
smoothing = parameters[self.IN_SMOOTHING]

# self.difference = self.parameterAsBool(parameters, self.IN_DIFFERENCE, context)
Expand Down
4 changes: 3 additions & 1 deletion ORStools/proc/isochrones_point_proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ def processAlgorithm(self, parameters, context, feedback):

factor = 60 if dimension == "time" else 1
ranges_raw = parameters[self.IN_RANGES]
ranges_proc = [x * factor for x in map(int, ranges_raw.split(","))]
ranges_proc = [x * factor for x in map(float, ranges_raw.split(","))]
# round to the nearest second or meter
ranges_proc = list(map(int, ranges_proc))
smoothing = parameters[self.IN_SMOOTHING]

options = self.parseOptions(parameters, context)
Expand Down

0 comments on commit 7bb3abe

Please sign in to comment.