Skip to content

Commit

Permalink
keep provider selection on re-open
Browse files Browse the repository at this point in the history
  • Loading branch information
koebi committed Mar 3, 2022
1 parent 8506ba9 commit fcd5e3b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,14 @@ RELEASING:
12. Upload the package to https://plugins.qgis.org/plugins/ORStools/ (Manage > Add Version)
13. Create new release in GitHub with tag version and release title of `vX.X.X`
-->
## Unreleased

### Changed
- provider selection is kept on re-open ([#168](https://github.com/GIScience/orstools-qgis-plugin/pull/166))

## [1.5.2] - 2022-01-20

## Fixed
### Fixed
- error for layers with z/m values ([#166](https://github.com/GIScience/orstools-qgis-plugin/pull/166))

## [1.5.1] - 2022-01-11
Expand Down
6 changes: 5 additions & 1 deletion ORStools/gui/ORStoolsDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,16 @@ def _init_gui_control(self):
self.dlg.global_buttons.accepted.connect(self.run_gui_control)
self.dlg.avoidpolygon_dropdown.setFilters(QgsMapLayerProxyModel.PolygonLayer)

# Populate provider box on window startup, since can be changed from multiple menus/buttons
# Populate provider box on window startup, since can be changed from multiple menus/buttons,
current_provider = self.dlg.provider_combo.currentText()
providers = configmanager.read_config()['providers']
self.dlg.provider_combo.clear()
for provider in providers:
self.dlg.provider_combo.addItem(provider['name'], provider)

if current_provider != "":
self.dlg.provider_combo.setCurrentText(current_provider)

self.dlg.show()

def run_gui_control(self):
Expand Down

0 comments on commit fcd5e3b

Please sign in to comment.