wolfhece 2.1.123__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
 
@@ -6598,12 +6605,13 @@ class WolfMapViewer(wx.Frame):
6598
6605
  dlg = wx.SingleChoiceDialog(None, _("Pick a colormap"), "Choices", choices)
6599
6606
 
6600
6607
  if self.active_laz is not None:
6601
- dlg.SetSelection(ass_values.index(self.active_laz.associated_color))
6608
+ if self.active_laz.associated_color is not None:
6609
+ dlg.SetSelection(ass_values.index(self.active_laz.associated_color))
6602
6610
 
6603
6611
  ret = dlg.ShowModal()
6604
6612
  if ret == wx.ID_CANCEL:
6605
6613
  dlg.Destroy()
6606
- return
6614
+ return self.active_laz.associated_color
6607
6615
 
6608
6616
  colormap = dlg.GetStringSelection()
6609
6617
  idx = choices.index(colormap)
@@ -10249,7 +10257,10 @@ class WolfMapViewer(wx.Frame):
10249
10257
 
10250
10258
  xyz = self.selected_object.xyz_selected
10251
10259
  if xyz.shape[0] ==0:
10252
- logging.warning('No points selected')
10260
+ logging.warning(_('No points selected'))
10261
+
10262
+ if self.selected_object._myprops[('Selection', 'Codes')] != '':
10263
+ logging.info(_('You filtered the points with the codes : {}'.format(self.selected_object._myprops[('Selection', 'Codes')])))
10253
10264
  return
10254
10265
 
10255
10266
  if xyz.shape[0] > 100000:
@@ -11044,6 +11055,8 @@ class WolfMapViewer(wx.Frame):
11044
11055
  pos = e.GetPosition()
11045
11056
 
11046
11057
  ctrldown = e.ControlDown()
11058
+ altdown = e.AltDown()
11059
+ shiftdown = e.ShiftDown()
11047
11060
 
11048
11061
  x, y = self.getXY(pos)
11049
11062
 
@@ -11053,7 +11066,7 @@ class WolfMapViewer(wx.Frame):
11053
11066
  self.oneclick = False
11054
11067
  self.setbounds()
11055
11068
 
11056
- if ctrldown:
11069
+ if shiftdown:
11057
11070
  if self.active_array is not None:
11058
11071
  if self.active_viewer3d is not None:
11059
11072
  self.active_viewer3d.force_view(self.mousex, self.mousey, self.active_array.get_value(self.mousex, self.mousey))