wolfhece 2.1.74__py3-none-any.whl → 2.1.75__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/apps/version.py CHANGED
@@ -5,7 +5,7 @@ class WolfVersion():
5
5
 
6
6
  self.major = 2
7
7
  self.minor = 1
8
- self.patch = 74
8
+ self.patch = 75
9
9
 
10
10
  def __str__(self):
11
11
 
wolfhece/wolf_array.py CHANGED
@@ -1779,6 +1779,12 @@ class Ops_Array(wx.Frame):
1779
1779
  self.MoveSelection.SetToolTip(_("Store the current selection in an indexed list -- useful for some interpolation methods"))
1780
1780
  bSizer16_1.Add(self.MoveSelection, 0, wx.EXPAND)
1781
1781
 
1782
+ self.ReselectMemory = wx.Button(self.selection, wx.ID_ANY,
1783
+ _("Reselect from..."), wx.DefaultPosition,
1784
+ wx.DefaultSize, 0)
1785
+ self.ReselectMemory.SetToolTip(_("Reselect the nodes from an indexed list"))
1786
+ bSizer16_1.Add(self.ReselectMemory, 0, wx.EXPAND)
1787
+
1782
1788
  self.ResetSelection = wx.Button(self.selection, wx.ID_ANY,
1783
1789
  _("Reset"), wx.DefaultPosition,
1784
1790
  wx.DefaultSize, 0)
@@ -2040,6 +2046,7 @@ class Ops_Array(wx.Frame):
2040
2046
  self.LaunchSelection.Bind(wx.EVT_BUTTON, self.OnLaunchSelect)
2041
2047
  self.AllSelection.Bind(wx.EVT_BUTTON, self.OnAllSelect)
2042
2048
  self.MoveSelection.Bind(wx.EVT_BUTTON, self.OnMoveSelect)
2049
+ self.ReselectMemory.Bind(wx.EVT_BUTTON, self.OnReselectMemory)
2043
2050
  self.ResetSelection.Bind(wx.EVT_BUTTON, self.OnResetSelect)
2044
2051
  self.ResetAllSelection.Bind(wx.EVT_BUTTON, self.OnResetAllSelect)
2045
2052
  self.to_clipboard_str.Bind(wx.EVT_BUTTON, self.OnToClipboardStr)
@@ -2237,18 +2244,44 @@ class Ops_Array(wx.Frame):
2237
2244
  self.parentarray.myops.nbselect.SetLabelText('All')
2238
2245
  self.parentarray.myops.nbselect2.SetLabelText('All')
2239
2246
 
2247
+ def OnReselectMemory(self, event):
2248
+ """
2249
+ Reselect from memory
2250
+ """
2251
+
2252
+ if self.parentarray.mngselection is not None:
2253
+ self.parentarray.mngselection.reselect_from_memory()
2254
+
2240
2255
  def OnMoveSelect(self, event):
2241
2256
  """Transfert de la sélection courante dans un dictionnaire"""
2242
2257
 
2243
2258
  dlg = wx.TextEntryDialog(self, 'Choose id', 'id?')
2244
2259
  ret = dlg.ShowModal()
2260
+
2261
+ if ret == wx.ID_CANCEL:
2262
+ logging.info('Cancel transfer')
2263
+ dlg.Destroy()
2264
+ return
2265
+
2245
2266
  idtxt = dlg.GetValue()
2267
+ dlg.Destroy()
2246
2268
 
2247
- dlg = wx.ColourDialog(self)
2248
- ret = dlg.ShowModal()
2249
- color = dlg.GetColourData()
2269
+ if self.parentarray.SelectionData is not None:
2270
+ if self.parentarray.SelectionData.nb > 0:
2271
+ dlg = wx.ColourDialog(self)
2272
+ ret = dlg.ShowModal()
2273
+ if ret == wx.ID_OK:
2274
+ color = dlg.GetColourData()
2275
+ color = color.GetColour().Get()
2276
+ dlg.Destroy()
2277
+ else:
2278
+ logging.info('Cancel transfer')
2279
+ dlg.Destroy()
2280
+ return
2281
+ else:
2282
+ color = (20,20,20,255)
2250
2283
 
2251
- self.parentarray.SelectionData.move_selectionto(idtxt, color.GetColour())
2284
+ self.parentarray.SelectionData.move_selectionto(idtxt, color)
2252
2285
 
2253
2286
  def OnContractSelection(self, event):
2254
2287
  """ Contract selection """
@@ -3215,6 +3248,39 @@ class SelectionData():
3215
3248
  else:
3216
3249
  logging.warning(_('Cannot open the clipboard'))
3217
3250
 
3251
+ def reselect_from_memory(self, idx:list[str] = None):
3252
+ """
3253
+ Reselect a stored selection
3254
+
3255
+ :param idx: id/key of the selection
3256
+ """
3257
+
3258
+ if idx is None:
3259
+ keys = list(self.selections.keys())
3260
+ with wx.MultiChoiceDialog(None, "Choose the memory to reselect", "Choices", keys+['All']) as dlg:
3261
+ ret = dlg.ShowModal()
3262
+ if ret == wx.ID_CANCEL:
3263
+ return
3264
+
3265
+ idx = dlg.GetSelections()
3266
+ if len(idx) == 0:
3267
+ return
3268
+
3269
+ if len(idx) == 1 and idx[0] == len(keys):
3270
+ idx = keys
3271
+ elif len(idx) in idx:
3272
+ idx = keys
3273
+ else:
3274
+ idx = [keys[i] for i in idx]
3275
+
3276
+ for curidx in idx:
3277
+ if curidx in self.selections:
3278
+ self.myselection += self.selections[curidx]['select']
3279
+ else:
3280
+ logging.error(_('Selection {} does not exist').format(idx))
3281
+
3282
+ self.update_nb_nodes_selection()
3283
+ self.parent.reset_plot()
3218
3284
 
3219
3285
  def move_selectionto(self, idx:str, color:list[float], resetplot:bool=True):
3220
3286
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wolfhece
3
- Version: 2.1.74
3
+ Version: 2.1.75
4
4
  Author-email: Pierre Archambeau <pierre.archambeau@uliege.be>
5
5
  License: Copyright (c) 2024 University of Liege. All rights reserved.
6
6
  Project-URL: Homepage, https://uee.uliege.be/hece
@@ -48,7 +48,7 @@ wolfhece/pywalous.py,sha256=yRaWJjKckXef1d9D5devP0yFHC9uc6kRV4G5x9PNq9k,18972
48
48
  wolfhece/rain_SPWMI.py,sha256=qCfcmF7LajloOaCwnTrrSMzyME03YyilmRUOqrPrv3U,13846
49
49
  wolfhece/textpillow.py,sha256=map7HsGYML_o5NHRdFg2s_TVQed_lDnpYNDv27MM0Vw,14130
50
50
  wolfhece/tools_mpl.py,sha256=gQ3Jg1iuZiecmMqa5Eli2ZLSkttu68VXL8YmMDBaEYU,564
51
- wolfhece/wolf_array.py,sha256=Oze4IYwE19LnxERNi48duYdp3qLXENg8p3_f5KuC1ho,393076
51
+ wolfhece/wolf_array.py,sha256=4D2fj4-Zaqe-IBRB-X4rhjAuHNlnYl9mT15KJeeyl50,395523
52
52
  wolfhece/wolf_hist.py,sha256=7jeVrgSkM3ErJO6SRMH_PGzfLjIdw8vTy87kesldggk,3582
53
53
  wolfhece/wolf_texture.py,sha256=DS5eobLxrq9ljyebYfpMSQPn8shkUAZZVfqrOKN_QUU,16951
54
54
  wolfhece/wolf_tiles.py,sha256=2Ho2I20rHRY81KXxjgLOYISdF4OkJ2d6omeY4shDoGI,10386
@@ -72,7 +72,7 @@ wolfhece/apps/check_install.py,sha256=Xoi_d8MzKzNAy2xqEpERdsqgRPu0hbBWukI0WkIYzD
72
72
  wolfhece/apps/curvedigitizer.py,sha256=Yps4bcayzbsz0AoVc_dkSk35dEhhn_esIBy1Ziefgmk,5334
73
73
  wolfhece/apps/isocurrent.py,sha256=dagmGR8ja9QQ1gwz_8fU-N052hIw-W0mWGVkzLu6C7I,4247
74
74
  wolfhece/apps/splashscreen.py,sha256=SrustmIQeXnsiD-92OzjdGhBi-S7c_j-cSvuX4T6rtg,2929
75
- wolfhece/apps/version.py,sha256=T9oL1EY3HMV5ZVLUeJEU1FuT__QAQ0iSx8HOFn7mc4Y,388
75
+ wolfhece/apps/version.py,sha256=xL8JIrHIqANzTmqWx_eqnA9DTXZoDlLxaaofqhuey1I,388
76
76
  wolfhece/apps/wolf.py,sha256=j_CgvsL8rwixbVvVD5Z0s7m7cHZ86gmFLojKGuetMls,729
77
77
  wolfhece/apps/wolf2D.py,sha256=4z_OPQ3IgaLtjexjMKX9ppvqEYyjFLt1hcfFABy3-jU,703
78
78
  wolfhece/apps/wolf_logo.bmp,sha256=ruJ4MA51CpGO_AYUp_dB4SWKHelvhOvd7Q8NrVOjDJk,3126
@@ -283,8 +283,8 @@ wolfhece/ui/wolf_multiselection_collapsiblepane.py,sha256=8PlMYrb_8jI8h9F0_EagpM
283
283
  wolfhece/ui/wolf_times_selection_comparison_models.py,sha256=ORy7fz4dcp691qKzaOZHrRLZ0uXNhL-LIHxmpDGL6BI,5007
284
284
  wolfhece/wintab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
285
285
  wolfhece/wintab/wintab.py,sha256=8A-JNONV6ujgsgG3lM5Uw-pVgglPATwKs86oBzzljoc,7179
286
- wolfhece-2.1.74.dist-info/METADATA,sha256=7aW4jIl11xOINRkPpa0QcgwbJNb_2AE0CRq8JJ3wy9o,2570
287
- wolfhece-2.1.74.dist-info/WHEEL,sha256=HiCZjzuy6Dw0hdX5R3LCFPDmFS4BWl8H-8W39XfmgX4,91
288
- wolfhece-2.1.74.dist-info/entry_points.txt,sha256=Q5JuIWV4odeIJI3qc6fV9MwRoz0ezqPVlFC1Ppm_vdQ,395
289
- wolfhece-2.1.74.dist-info/top_level.txt,sha256=EfqZXMVCn7eILUzx9xsEu2oBbSo9liWPFWjIHik0iCI,9
290
- wolfhece-2.1.74.dist-info/RECORD,,
286
+ wolfhece-2.1.75.dist-info/METADATA,sha256=90OU0iX7noC8qKik5I2b-UqAjkalAUEMy8qdKctQovo,2570
287
+ wolfhece-2.1.75.dist-info/WHEEL,sha256=HiCZjzuy6Dw0hdX5R3LCFPDmFS4BWl8H-8W39XfmgX4,91
288
+ wolfhece-2.1.75.dist-info/entry_points.txt,sha256=Q5JuIWV4odeIJI3qc6fV9MwRoz0ezqPVlFC1Ppm_vdQ,395
289
+ wolfhece-2.1.75.dist-info/top_level.txt,sha256=EfqZXMVCn7eILUzx9xsEu2oBbSo9liWPFWjIHik0iCI,9
290
+ wolfhece-2.1.75.dist-info/RECORD,,