Commit 4ed4823be62e297455a46338e288fc6bc7be5287
1 parent
55d959f7
Exists in
master
Some key shortcuts was not working when the focus is in the viewer slice
and reducing the warning and debug messages from gdcm
Showing
2 changed files
with
9 additions
and
1 deletions
Show diff stats
invesalius/data/viewer_slice.py
... | ... | @@ -1312,7 +1312,7 @@ class Viewer(wx.Panel): |
1312 | 1312 | |
1313 | 1313 | def OnKeyDown(self, evt=None, obj=None): |
1314 | 1314 | pos = self.scroll.GetThumbPosition() |
1315 | - skip = False | |
1315 | + skip = True | |
1316 | 1316 | |
1317 | 1317 | min = 0 |
1318 | 1318 | max = self.slice_.GetMaxSliceNumber(self.orientation) |
... | ... | @@ -1331,10 +1331,12 @@ class Viewer(wx.Panel): |
1331 | 1331 | if (evt.GetKeyCode() == wx.WXK_UP and pos > min): |
1332 | 1332 | self.OnScrollForward() |
1333 | 1333 | self.OnScrollBar() |
1334 | + skip = False | |
1334 | 1335 | |
1335 | 1336 | elif (evt.GetKeyCode() == wx.WXK_DOWN and pos < max): |
1336 | 1337 | self.OnScrollBackward() |
1337 | 1338 | self.OnScrollBar() |
1339 | + skip = False | |
1338 | 1340 | |
1339 | 1341 | elif (evt.GetKeyCode() == wx.WXK_NUMPAD_ADD): |
1340 | 1342 | actual_value = self.mip_ctrls.mip_size_spin.GetValue() |
... | ... | @@ -1342,6 +1344,7 @@ class Viewer(wx.Panel): |
1342 | 1344 | if self.mip_ctrls.mip_size_spin.GetValue() != actual_value: |
1343 | 1345 | self.number_slices = self.mip_ctrls.mip_size_spin.GetValue() |
1344 | 1346 | self.ReloadActualSlice() |
1347 | + skip = False | |
1345 | 1348 | |
1346 | 1349 | elif (evt.GetKeyCode() == wx.WXK_NUMPAD_SUBTRACT): |
1347 | 1350 | actual_value = self.mip_ctrls.mip_size_spin.GetValue() |
... | ... | @@ -1349,6 +1352,7 @@ class Viewer(wx.Panel): |
1349 | 1352 | if self.mip_ctrls.mip_size_spin.GetValue() != actual_value: |
1350 | 1353 | self.number_slices = self.mip_ctrls.mip_size_spin.GetValue() |
1351 | 1354 | self.ReloadActualSlice() |
1355 | + skip = False | |
1352 | 1356 | |
1353 | 1357 | elif evt.GetKeyCode() in projections: |
1354 | 1358 | self.slice_.SetTypeProjection(projections[evt.GetKeyCode()]) | ... | ... |
invesalius/reader/dicom_reader.py
... | ... | @@ -25,6 +25,9 @@ from multiprocessing import cpu_count |
25 | 25 | |
26 | 26 | import vtk |
27 | 27 | import gdcm |
28 | +# Not showing GDCM warning and debug messages | |
29 | +gdcm.Trace_DebugOff() | |
30 | +gdcm.Trace_WarningOff() | |
28 | 31 | from wx.lib.pubsub import pub as Publisher |
29 | 32 | |
30 | 33 | import invesalius.constants as const |
... | ... | @@ -48,6 +51,7 @@ if sys.platform == 'win32': |
48 | 51 | else: |
49 | 52 | _has_win32api = False |
50 | 53 | |
54 | + | |
51 | 55 | def ReadDicomGroup(dir_): |
52 | 56 | |
53 | 57 | patient_group = GetDicomGroups(dir_) | ... | ... |