From 80c49b32491b74ca704c4d2f01f9678c2a18f320 Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Fri, 15 Jul 2016 15:52:43 -0300 Subject: [PATCH] Changing mouse cursor when above a measure mark --- invesalius/data/styles.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/invesalius/data/styles.py b/invesalius/data/styles.py index 22dca7f..3ba7ab8 100644 --- a/invesalius/data/styles.py +++ b/invesalius/data/styles.py @@ -407,14 +407,20 @@ class LinearMeasureInteractorStyle(DefaultInteractorStyle): self.selected = None def OnMoveMeasurePoint(self, obj, evt): + x, y, z = self._get_pos_clicked() if self.selected: n, m, mr = self.selected - x, y, z = self._get_pos_clicked() idx = self.measures._list_measures.index((m, mr)) Publisher.sendMessage('Change measurement point position', (idx, n, (x, y, z))) Publisher.sendMessage('Reload actual slice %s' % self.orientation) + else: + if self._verify_clicked(x, y, z): + self.viewer.interactor.SetCursor(wx.StockCursor(wx.CURSOR_HAND)) + else: + self.viewer.interactor.SetCursor(wx.StockCursor(wx.CURSOR_DEFAULT)) + def CleanUp(self): self.picker.PickFromListOff() Publisher.sendMessage("Remove incomplete measurements") -- libgit2 0.21.2