Skip to content

Commit

Permalink
Merge pull request #116 from ricardogsilva/104-open-output-directory-…
Browse files Browse the repository at this point in the history
…not-working-on-windows

Use QUrl.fromLocalFile() in order to enusre correct URL generation
  • Loading branch information
ricardogsilva authored Oct 11, 2024
2 parents eb3d665 + 15ab413 commit d744083
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@ resources_rc.py
*~
.idea/*

build
build

src/qgis_conefor/ui/symbology-style.db
src/qgis_conefor/ui/user-history.db
3 changes: 2 additions & 1 deletion src/qgis_conefor/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@ def check_for_removed_layers(self, removed_layer_ids: list[str]):
def open_output_dir(self):
output_dir = load_settings_key(
schemas.QgisConeforSettingsKey.OUTPUT_DIR)
QtGui.QDesktopServices.openUrl(QtCore.QUrl(f"file://{output_dir}"))
output_dir_url = QtCore.QUrl.fromLocalFile(output_dir)
QtGui.QDesktopServices.openUrl(output_dir_url)

def _react_to_layer_attributes_added(
self,
Expand Down

0 comments on commit d744083

Please sign in to comment.