wolfhece 2.1.124__py3-none-any.whl → 2.1.125__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
wolfhece/PyDraw.py CHANGED
@@ -2738,7 +2738,14 @@ class WolfMapViewer(wx.Frame):
2738
2738
 
2739
2739
  every = dlg.GetValue()
2740
2740
 
2741
- danger_maps = self.active_res2d.danger_map(start_step-1, end_step-1, every)
2741
+ pgbar = wx.ProgressDialog(_('Danger map'), _('Danger map'), maximum = end_step-1, parent=self, style = wx.PD_APP_MODAL | wx.PD_AUTO_HIDE)
2742
+ def _callback(id, msg):
2743
+ pgbar.Update(id+1-start_step, msg)
2744
+
2745
+ danger_maps = self.active_res2d.danger_map(start_step-1, end_step-1, every, _callback)
2746
+
2747
+ pgbar.Hide()
2748
+ pgbar.Destroy()
2742
2749
 
2743
2750
  with wx.DirDialog(None, _('Choose a directory'), style=wx.DD_DEFAULT_STYLE) as dlg:
2744
2751
 
@@ -2747,7 +2754,7 @@ class WolfMapViewer(wx.Frame):
2747
2754
 
2748
2755
  outdir = dlg.GetPath()
2749
2756
 
2750
- names = ['danger_h.tif', 'danger_u.tif', 'danger_q.tif', 'danger_Z.tif']
2757
+ names = ['danger_h.tif', 'danger_u.tif', 'danger_q.tif', 'danger_Z.tif', 'danger_head.tif']
2751
2758
  for name, danger_map in zip(names, danger_maps):
2752
2759
  danger_map.write_all(Path(outdir) / name)
2753
2760