Commit 6c04cfa46d0afb26b1dca643ae1c0ab5a72d4845
1 parent
c436a85d
Exists in
master
and in
38 other branches
Ctrl+scroll size the spinctrl
Showing
2 changed files
with
6 additions
and
1 deletions
Show diff stats
invesalius/data/styles.py
| ... | ... | @@ -706,7 +706,7 @@ class EditorInteractorStyle(DefaultInteractorStyle): |
| 706 | 706 | size = cursor.radius * 2 |
| 707 | 707 | size += 1 |
| 708 | 708 | |
| 709 | - if size < 100: | |
| 709 | + if size <= 100: | |
| 710 | 710 | Publisher.sendMessage('Set edition brush size', size) |
| 711 | 711 | cursor.SetPosition(cursor.position) |
| 712 | 712 | self.viewer.interactor.Render() | ... | ... |
invesalius/gui/task_slice.py
| ... | ... | @@ -740,6 +740,7 @@ class EditionTools(wx.Panel): |
| 740 | 740 | 'Update threshold limits') |
| 741 | 741 | Publisher.subscribe(self.ChangeMaskColour, 'Change mask colour') |
| 742 | 742 | Publisher.subscribe(self.SetGradientColour, 'Add mask') |
| 743 | + Publisher.subscribe(self._set_brush_size, 'Set edition brush size') | |
| 743 | 744 | |
| 744 | 745 | def ChangeMaskColour(self, pubsub_evt): |
| 745 | 746 | colour = pubsub_evt.data |
| ... | ... | @@ -792,6 +793,10 @@ class EditionTools(wx.Panel): |
| 792 | 793 | # Strangelly this is being called twice |
| 793 | 794 | Publisher.sendMessage('Set edition brush size',self.spin.GetValue()) |
| 794 | 795 | |
| 796 | + def _set_brush_size(self, pubsub_evt): | |
| 797 | + size = pubsub_evt.data | |
| 798 | + self.spin.SetValue(size) | |
| 799 | + | |
| 795 | 800 | def OnComboBrushOp(self, evt): |
| 796 | 801 | brush_op_id = evt.GetSelection() |
| 797 | 802 | Publisher.sendMessage('Set edition operation', brush_op_id) | ... | ... |