Commit 645c7d0a1a0f91447a9d4e1fdd6ed2dd21e3f0dc

Authored by tatiana
1 parent cdf21028

ENH: English improvement, suggestion by Eugene Liscio

Showing 1 changed file with 11 additions and 11 deletions   Show diff stats
invesalius/gui/task_slice.py
@@ -213,7 +213,7 @@ class InnerFoldPanel(wx.Panel): @@ -213,7 +213,7 @@ class InnerFoldPanel(wx.Panel):
213 fold_panel.Expand(fold_panel.GetFoldPanel(0)) 213 fold_panel.Expand(fold_panel.GetFoldPanel(0))
214 214
215 # Fold 2 - Advanced edition tools 215 # Fold 2 - Advanced edition tools
216 - item = fold_panel.AddFoldPanel(_("Advanced edition tools"), collapsed=True) 216 + item = fold_panel.AddFoldPanel(_("Advanced editing tools"), collapsed=True)
217 fold_panel.ApplyCaptionStyle(item, style) 217 fold_panel.ApplyCaptionStyle(item, style)
218 fold_panel.AddFoldPanelWindow(item, EditionTools(item), Spacing= 0, 218 fold_panel.AddFoldPanelWindow(item, EditionTools(item), Spacing= 0,
219 leftSpacing=0, rightSpacing=0) 219 leftSpacing=0, rightSpacing=0)
@@ -389,28 +389,28 @@ class MaskProperties(wx.Panel): @@ -389,28 +389,28 @@ class MaskProperties(wx.Panel):
389 self.gradient.SetMaxValue(thresh_max) 389 self.gradient.SetMaxValue(thresh_max)
390 self.bind_evt_gradient = True 390 self.bind_evt_gradient = True
391 thresh = (thresh_min, thresh_max) 391 thresh = (thresh_min, thresh_max)
392 - if thresh in Project().presets.thresh_ct.values():  
393 - preset_name = Project().presets.thresh_ct.get_key(thresh)[0] 392 + if thresh in Project().threshold_modes.values():
  393 + preset_name = Project().threshold_modes.get_key(thresh)[0]
394 index = self.threshold_modes_names.index(preset_name) 394 index = self.threshold_modes_names.index(preset_name)
395 self.combo_thresh.SetSelection(index) 395 self.combo_thresh.SetSelection(index)
396 else: 396 else:
397 index = self.threshold_modes_names.index(_("Custom")) 397 index = self.threshold_modes_names.index(_("Custom"))
398 self.combo_thresh.SetSelection(index) 398 self.combo_thresh.SetSelection(index)
399 - Project().presets.thresh_ct[_("Custom")] = (thresh_min, thresh_max) 399 + Project().threshold_modes[_("Custom")] = (thresh_min, thresh_max)
400 400
401 def SetThresholdValues2(self, pubsub_evt): 401 def SetThresholdValues2(self, pubsub_evt):
402 thresh_min, thresh_max = pubsub_evt.data 402 thresh_min, thresh_max = pubsub_evt.data
403 self.gradient.SetMinValue(thresh_min) 403 self.gradient.SetMinValue(thresh_min)
404 self.gradient.SetMaxValue(thresh_max) 404 self.gradient.SetMaxValue(thresh_max)
405 thresh = (thresh_min, thresh_max) 405 thresh = (thresh_min, thresh_max)
406 - if thresh in Project().presets.thresh_ct.values():  
407 - preset_name = Project().presets.thresh_ct.get_key(thresh)[0] 406 + if thresh in Project().threshold_modes.values():
  407 + preset_name = Project().threshold_modes.get_key(thresh)[0]
408 index = self.threshold_modes_names.index(preset_name) 408 index = self.threshold_modes_names.index(preset_name)
409 self.combo_thresh.SetSelection(index) 409 self.combo_thresh.SetSelection(index)
410 else: 410 else:
411 index = self.threshold_modes_names.index(_("Custom")) 411 index = self.threshold_modes_names.index(_("Custom"))
412 self.combo_thresh.SetSelection(index) 412 self.combo_thresh.SetSelection(index)
413 - Project().presets.thresh_ct[_("Custom")] = (thresh_min, thresh_max) 413 + Project().threshold_modes[_("Custom")] = (thresh_min, thresh_max)
414 414
415 def SetItemsColour(self, evt_pubsub): 415 def SetItemsColour(self, evt_pubsub):
416 colour = evt_pubsub.data 416 colour = evt_pubsub.data
@@ -440,8 +440,8 @@ class MaskProperties(wx.Panel): @@ -440,8 +440,8 @@ class MaskProperties(wx.Panel):
440 self.combo_thresh.SetSelection(default_thresh) 440 self.combo_thresh.SetSelection(default_thresh)
441 (thresh_min, thresh_max) =\ 441 (thresh_min, thresh_max) =\
442 self.threshold_modes[thresh_modes_names[default_thresh]] 442 self.threshold_modes[thresh_modes_names[default_thresh]]
443 - elif default_thresh in proj.presets.thresh_ct.values():  
444 - preset_name = proj.presets.thresh_ct.get_key(default_thresh)[0] 443 + elif default_thresh in proj.threshold_modes.values():
  444 + preset_name = proj.threshold_modes.get_key(default_thresh)[0]
445 index = self.threshold_modes_names.index(preset_name) 445 index = self.threshold_modes_names.index(preset_name)
446 self.combo_thresh.SetSelection(index) 446 self.combo_thresh.SetSelection(index)
447 thresh_min, thresh_max = default_thresh 447 thresh_min, thresh_max = default_thresh
@@ -449,7 +449,7 @@ class MaskProperties(wx.Panel): @@ -449,7 +449,7 @@ class MaskProperties(wx.Panel):
449 index = self.threshold_modes_names.index(_("Custom")) 449 index = self.threshold_modes_names.index(_("Custom"))
450 self.combo_thresh.SetSelection(index) 450 self.combo_thresh.SetSelection(index)
451 thresh_min, thresh_max = default_thresh 451 thresh_min, thresh_max = default_thresh
452 - proj.presets.thresh_ct[_("Custom")] = (thresh_min, thresh_max) 452 + proj.threshold_modes[_("Custom")] = (thresh_min, thresh_max)
453 453
454 self.gradient.SetMinValue(thresh_min) 454 self.gradient.SetMinValue(thresh_min)
455 self.gradient.SetMaxValue(thresh_max) 455 self.gradient.SetMaxValue(thresh_max)
@@ -466,7 +466,7 @@ class MaskProperties(wx.Panel): @@ -466,7 +466,7 @@ class MaskProperties(wx.Panel):
466 ps.Publisher().sendMessage('Change mask selected', mask_index) 466 ps.Publisher().sendMessage('Change mask selected', mask_index)
467 467
468 def OnComboThresh(self, evt): 468 def OnComboThresh(self, evt):
469 - (thresh_min, thresh_max) = Project().presets.thresh_ct[evt.GetString()] 469 + (thresh_min, thresh_max) = Project().threshold_modes[evt.GetString()]
470 self.gradient.SetMinValue(thresh_min, True) 470 self.gradient.SetMinValue(thresh_min, True)
471 self.gradient.SetMaxValue(thresh_max, True) 471 self.gradient.SetMaxValue(thresh_max, True)
472 472