Skip to content

Commit

Permalink
Switches on (#1564)
Browse files Browse the repository at this point in the history
* Improved the Hydraulic Structures message and turned on the Channel switch when the channel test is passed.

* Turned on the ARF and WRF switch when the ARF and WRF is calculated successfully.

* Turned on the Infiltration switch when the Infiltration is schematized.
  • Loading branch information
rpachaly authored Sep 20, 2024
1 parent 32c355a commit ba3c44c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
5 changes: 4 additions & 1 deletion flo2d/gui/grid_tools_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,10 @@ def eval_arfwrf(self):
self.iface.mapCanvas().clearCache()
user_arf_lyr.triggerRepaint()
QApplication.restoreOverrideCursor()
self.uc.show_info("ARF and WRF values calculated!")
self.uc.bar_info("ARF and WRF values calculated! The ARF and WRF switch is now enabled.")
self.uc.log_info("ARF and WRF values calculated! The ARF and WRF switch is now enabled.")
# Set ARFs on the Control Parameters
self.gutils.set_cont_par("IWRFS", 1)
except Exception as e:
self.uc.log_info(traceback.format_exc())
self.uc.show_error(
Expand Down
7 changes: 5 additions & 2 deletions flo2d/gui/infil_editor_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,11 @@ def schematize_infiltration(self):
self.con.commit()
self.gutils.enable_geom_triggers()
QApplication.restoreOverrideCursor()
self.uc.bar_info("Schematizing of infiltration finished!")
self.uc.log_info("Schematizing of infiltration finished!")
self.uc.bar_info("Schematizing Infiltration finished! The Infiltration switch is now enabled.")
self.uc.log_info("Schematizing Infiltration finished! The Infiltration switch is now enabled.")
# Set Structures on the Control Parameters
self.gutils.set_cont_par("INFIL", 1)

except Exception as e:
self.gutils.enable_geom_triggers()
self.uc.log_info(traceback.format_exc())
Expand Down
4 changes: 2 additions & 2 deletions flo2d/gui/struct_editor_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,11 @@ def schematize_struct(self):
# Return True there are no errors
else:
self.uc.log_info(
"Schematizing Hydraulic Structures finished!\n\n"
"Schematizing Hydraulic Structures finished! The Hydraulic Structure switch is now enabled.\n\n"
+ str(len(structs)) + " structures were updated in the Hydraulic Structures table."
)
self.uc.bar_info(
"Schematizing Hydraulic Structures finished!"
"Schematizing Hydraulic Structures finished! The Hydraulic Structure switch is now enabled."
)
else:
self.uc.bar_error("WARNING 151203.0646: Error during Hydraulic Structures schematization!")
Expand Down
7 changes: 6 additions & 1 deletion flo2d/gui/xs_editor_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,12 @@ def check_schematized_channel(self):

self.uc.log_info(msg)
else:
self.uc.show_info("The schematized channel has passed all required checks!")
self.uc.bar_info("The schematized channel has passed all required checks! The Channel switch is now "
"enabled.")
self.uc.log_info("The schematized channel has passed all required checks! The Channel switch is now "
"enabled.")
# Set Channels on the Control Parameters
self.gutils.set_cont_par("ICHANNEL", 1)

except Exception as e:
QApplication.restoreOverrideCursor()
Expand Down

0 comments on commit ba3c44c

Please sign in to comment.