Commit bb8f5543aa68ad4bbe1e8c63449fe4d26ec2a5a7
1 parent
73387fd2
Exists in
master
and in
67 other branches
FIX: It wasn't possible to create a new mask
Showing
2 changed files
with
8 additions
and
2 deletions
Show diff stats
invesalius/gui/dialogs.py
@@ -529,8 +529,8 @@ class NewMask(wx.Dialog): | @@ -529,8 +529,8 @@ class NewMask(wx.Dialog): | ||
529 | import project as prj | 529 | import project as prj |
530 | proj = prj.Project() | 530 | proj = prj.Project() |
531 | (thresh_min, thresh_max) = proj.threshold_modes[evt.GetString()] | 531 | (thresh_min, thresh_max) = proj.threshold_modes[evt.GetString()] |
532 | - self.gradient.SetMinValue(thresh_min, True) | ||
533 | - self.gradient.SetMaxValue(thresh_max, True) | 532 | + self.gradient.SetMinimun(thresh_min) |
533 | + self.gradient.SetMaximun(thresh_max) | ||
534 | 534 | ||
535 | def OnSlideChanged(self, evt): | 535 | def OnSlideChanged(self, evt): |
536 | import project as prj | 536 | import project as prj |
invesalius/gui/widgets/gradient.py
@@ -288,6 +288,12 @@ class GradientSlider(wx.Panel): | @@ -288,6 +288,12 @@ class GradientSlider(wx.Panel): | ||
288 | self.CalculateControlPositions() | 288 | self.CalculateControlPositions() |
289 | self.Refresh() | 289 | self.Refresh() |
290 | 290 | ||
291 | + def GetMaxValue(self): | ||
292 | + return self.maximun | ||
293 | + | ||
294 | + def GetMinValue(self): | ||
295 | + return self.minimun | ||
296 | + | ||
291 | def _generate_event(self): | 297 | def _generate_event(self): |
292 | evt = SliderEvent(myEVT_SLIDER_CHANGE, self.GetId(), self.min_range, | 298 | evt = SliderEvent(myEVT_SLIDER_CHANGE, self.GetId(), self.min_range, |
293 | self.max_range, self.minimun, self.maximun) | 299 | self.max_range, self.minimun, self.maximun) |