Skip to content
Snippets Groups Projects
Commit 29f95333 authored by Alexian Masson's avatar Alexian Masson
Browse files

ProfilDialog: Update secondarySectionsOffset Slider & SpinBox min/max range to...

ProfilDialog: Update secondarySectionsOffset Slider & SpinBox min/max range to 2x current_profil length
parent 537abbbd
No related branches found
No related tags found
1 merge request!71Gsedfqgis 96 fixes
Pipeline #22393 passed
......@@ -462,6 +462,14 @@ class ProfileDialog(QtWidgets.QDialog, FORM_CLASS):
self.set_section(index)
self.compute_buffered_sections()
spinBoxOffset = 2 * round(
self.current_section.distances[-1] - self.current_section.distances[0]
)
sliderOffset = spinBoxOffset * 100
self.secondarySectionsOffsetSlider.setRange(-sliderOffset, sliderOffset)
self.secondarySectionsOffsetSpinBox.setRange(-spinBoxOffset, spinBoxOffset)
def set_section(self, index):
if index == -1:
self.graphWidget.clear()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment