Skip to content

Commit

Permalink
fix(ui): output filename is determined after the serializer is instan…
Browse files Browse the repository at this point in the history
…ciated
  • Loading branch information
Guts committed Jul 18, 2024
1 parent 5b9ccce commit 6eaff80
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dicogis/ui/main_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,9 +519,7 @@ def process(self):
MetadatasetSerializerBase.get_serializer_from_parameters(
format_or_serializer=OutputFormats.excel,
localized_strings=self.localized_strings,
output_path=Path(self.tab_files.target_path.get()).joinpath(
self.ent_outxl_filename.get()
),
output_path=None,
opt_prettify_size=self.tab_options.opt_export_size_prettify.get(),
opt_raw_path=self.tab_options.opt_export_raw_path.get(),
)
Expand Down Expand Up @@ -630,14 +628,15 @@ def process_db(self, sgbd_reader: ReadPostGIS):

pg_service_name = self.tab_sgbd.ddl_pg_services.get()

# set the default output file
# set the default output file in UI and as serializer attribute
self.ent_outxl_filename.delete(0, END)
self.ent_outxl_filename.insert(
0,
determine_output_path(
output_path=None, output_format="excel", pg_services=[pg_service_name]
),
)
self.serializer.output_path = Path(self.ent_outxl_filename.get())

# setting progress bar
self.prog_layers["maximum"] = sgbd_reader.conn.GetLayerCount()
Expand All @@ -656,6 +655,7 @@ def process_db(self, sgbd_reader: ReadPostGIS):
# saving dictionary
self.serializer.post_serializing()

launch(url=f"{self.serializer.output_path.resolve()}")
send_system_notify(
notification_title="DicoGIS analysis ended",
notification_message="DicoGIS successfully processed "
Expand Down

0 comments on commit 6eaff80

Please sign in to comment.