[med-svn] [Git][med-team/invesalius][master] Fixed patch

Thiago Franco de Moraes (@tfmoraes-guest) gitlab at salsa.debian.org
Tue Jul 26 22:59:15 BST 2022



Thiago Franco de Moraes pushed to branch master at Debian Med / invesalius


Commits:
354b244f by Thiago Franco de Moraes at 2022-07-26T18:58:36-03:00
Fixed patch

- - - - -


7 changed files:

- debian/patches/11_wxpython_int_fix.patch
- invesalius/data/viewer_slice.py
- invesalius/gui/dialogs.py
- invesalius/gui/dicom_preview_panel.py
- invesalius/gui/frame.py
- invesalius/gui/task_surface.py
- invesalius/gui/widgets/gradient.py


Changes:

=====================================
debian/patches/11_wxpython_int_fix.patch
=====================================
@@ -1,75 +1,3 @@
--diff --git a/invesalius/data/viewer_slice.py b/invesalius/data/viewer_slice.py
--index 51c9235..841731f 100644
----- a/invesalius/data/viewer_slice.py
--+++ b/invesalius/data/viewer_slice.py
--@@ -1316,7 +1316,7 @@ class Viewer(wx.Panel):
--             buffer_.discard_buffer()
-- 
--     def set_scroll_position(self, position):
---        self.scroll.SetThumbPosition(position)
--+        self.scroll.SetThumbPosition(int(position))
--         self.OnScrollBar()
-- 
--     def UpdateSlice3D(self, pos):
--@@ -1416,7 +1416,7 @@ class Viewer(wx.Panel):
--             if self._flush_buffer:
--                 self.slice_.apply_slice_buffer_to_mask(self.orientation)
--             pos = pos - 1
---            self.scroll.SetThumbPosition(pos)
--+            self.scroll.SetThumbPosition(int(pos))
--             self.OnScrollBar()
-- 
--     def OnScrollBackward(self, evt=None, obj=None):
--@@ -1429,7 +1429,7 @@ class Viewer(wx.Panel):
--             if self._flush_buffer:
--                 self.slice_.apply_slice_buffer_to_mask(self.orientation)
--             pos = pos + 1
---            self.scroll.SetThumbPosition(pos)
--+            self.scroll.SetThumbPosition(int(pos))
--             self.OnScrollBar()
-- 
--     def OnSetMIPSize(self, number_slices):
--@@ -1505,7 +1505,7 @@ class Viewer(wx.Panel):
-- 
--     def ChangeSliceNumber(self, index):
--         #self.set_slice_number(index)
---        self.scroll.SetThumbPosition(index)
--+        self.scroll.SetThumbPosition(int(index))
--         pos = self.scroll.GetThumbPosition()
--         self.set_slice_number(pos)
--         self.interactor.Render()
--diff --git a/invesalius/gui/dialogs.py b/invesalius/gui/dialogs.py
--index 4ecb2e3..9551da2 100644
----- a/invesalius/gui/dialogs.py
--+++ b/invesalius/gui/dialogs.py
--@@ -221,7 +221,7 @@ class ProgressDialog(object):
--     def Update(self, value, message):
--         if(int(value) != self.maximum):
--             try:
---                return self.dlg.Update(value,message)
--+                return self.dlg.Update(int(value),message)
--             #TODO:
--             #Exception in the Windows XP 64 Bits with wxPython 2.8.10
--             except(wx._core.PyAssertionError):
--diff --git a/invesalius/gui/dicom_preview_panel.py b/invesalius/gui/dicom_preview_panel.py
--index ce47bdd..8867584 100644
----- a/invesalius/gui/dicom_preview_panel.py
--+++ b/invesalius/gui/dicom_preview_panel.py
--@@ -429,7 +429,7 @@ class DicomPreviewSeries(wx.Panel):
--             self.files.append(info)
--             n+=1
-- 
---        scroll_range = len(self.files)/NCOLS
--+        scroll_range = len(self.files)//NCOLS
--         if scroll_range * NCOLS < len(self.files):
--             scroll_range +=1
--         self.scroll.SetScrollbar(0, NROWS, scroll_range, NCOLS)
--@@ -941,3 +941,5 @@ class SingleImagePreview(wx.Panel):
-- 
--         # Setting slider position
--         self.slider.SetValue(index)
--+
--+
 diff --git a/invesalius/data/viewer_slice.py b/invesalius/data/viewer_slice.py
 index 51c9235..841731f 100644
 --- a/invesalius/data/viewer_slice.py


=====================================
invesalius/data/viewer_slice.py
=====================================
@@ -1316,7 +1316,7 @@ class Viewer(wx.Panel):
             buffer_.discard_buffer()
 
     def set_scroll_position(self, position):
-        self.scroll.SetThumbPosition(int(position))
+        self.scroll.SetThumbPosition(position)
         self.OnScrollBar()
 
     def UpdateSlice3D(self, pos):
@@ -1416,7 +1416,7 @@ class Viewer(wx.Panel):
             if self._flush_buffer:
                 self.slice_.apply_slice_buffer_to_mask(self.orientation)
             pos = pos - 1
-            self.scroll.SetThumbPosition(int(pos))
+            self.scroll.SetThumbPosition(pos)
             self.OnScrollBar()
 
     def OnScrollBackward(self, evt=None, obj=None):
@@ -1429,7 +1429,7 @@ class Viewer(wx.Panel):
             if self._flush_buffer:
                 self.slice_.apply_slice_buffer_to_mask(self.orientation)
             pos = pos + 1
-            self.scroll.SetThumbPosition(int(pos))
+            self.scroll.SetThumbPosition(pos)
             self.OnScrollBar()
 
     def OnSetMIPSize(self, number_slices):
@@ -1505,7 +1505,7 @@ class Viewer(wx.Panel):
 
     def ChangeSliceNumber(self, index):
         #self.set_slice_number(index)
-        self.scroll.SetThumbPosition(int(index))
+        self.scroll.SetThumbPosition(index)
         pos = self.scroll.GetThumbPosition()
         self.set_slice_number(pos)
         self.interactor.Render()


=====================================
invesalius/gui/dialogs.py
=====================================
@@ -221,7 +221,7 @@ class ProgressDialog(object):
     def Update(self, value, message):
         if(int(value) != self.maximum):
             try:
-                return self.dlg.Update(int(value),message)
+                return self.dlg.Update(value,message)
             #TODO:
             #Exception in the Windows XP 64 Bits with wxPython 2.8.10
             except(wx._core.PyAssertionError):


=====================================
invesalius/gui/dicom_preview_panel.py
=====================================
@@ -429,7 +429,7 @@ class DicomPreviewSeries(wx.Panel):
             self.files.append(info)
             n+=1
 
-        scroll_range = len(self.files)//NCOLS
+        scroll_range = len(self.files)/NCOLS
         if scroll_range * NCOLS < len(self.files):
             scroll_range +=1
         self.scroll.SetScrollbar(0, NROWS, scroll_range, NCOLS)
@@ -941,5 +941,3 @@ class SingleImagePreview(wx.Panel):
 
         # Setting slider position
         self.slider.SetValue(index)
-
-


=====================================
invesalius/gui/frame.py
=====================================
@@ -42,7 +42,7 @@ import wx.lib.agw.toasterbox as TB
 import wx.lib.popupctl as pc
 from invesalius import inv_paths
 from invesalius.gui import project_properties
-from invesalius.gui.widgets.auibar import AUI_TB_PLAIN_BACKGROUND, AuiToolBar
+from wx.lib.agw.aui.auibar import AUI_TB_PLAIN_BACKGROUND, AuiToolBar
 from invesalius.pubsub import pub as Publisher
 
 try:


=====================================
invesalius/gui/task_surface.py
=====================================
@@ -587,7 +587,7 @@ class SurfaceProperties(scrolled.ScrolledPanel):
         self.combo_surface_name.SetSelection(i)
         transparency = 100*surface.transparency
         self.button_colour.SetColour(colour)
-        self.slider_transparency.SetValue(int(transparency))
+        self.slider_transparency.SetValue(transparency)
         #  Publisher.sendMessage('Update surface data', (index))
 
     def OnComboName(self, evt):


=====================================
invesalius/gui/widgets/gradient.py
=====================================
@@ -340,7 +340,7 @@ class GradientSlider(wx.Panel):
             return 0
 
     def SetColour(self, colour):
-        self.colour = [int(i) for i in colour]
+        self.colour = colour
 
     def SetGradientColours(self, colors):
         self._gradient_colours = colors



View it on GitLab: https://salsa.debian.org/med-team/invesalius/-/commit/354b244f4b37c25700096ab702c2e9f3faef9072

-- 
View it on GitLab: https://salsa.debian.org/med-team/invesalius/-/commit/354b244f4b37c25700096ab702c2e9f3faef9072
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20220726/338075ea/attachment-0001.htm>


More information about the debian-med-commit mailing list