Permalink
Browse files

STYLE: Some style changes in code

git-svn-id: http://svn.softwarepublico.gov.br/svn/invesalius/invesalius3/trunk@1922 e1d098d0-f32f-0410-9823-cb12c6f6c872
  • Loading branch information...
1 parent a0c7a53 commit 7f893dc496cf43e1df836455091fcb5eca1f502e totonixsame@gmail.com committed Sep 13, 2010
Showing with 9 additions and 7 deletions.
  1. +9 −7 invesalius/gui/widgets/clut_raycasting.py
@@ -42,6 +42,7 @@
SELECTION_SIZE = 10
TOOLBAR_SIZE = 30
TOOLBAR_COLOUR = (25 , 25, 25)
+RANGE = 10
PADDING = 2
class Node(object):
@@ -277,8 +278,8 @@ def OnWheel(self, evt):
doesn't change values in preset, only to visualization.
"""
direction = evt.GetWheelRotation() / evt.GetWheelDelta()
- init = self.init - 10 * direction
- end = self.end + 10 * direction
+ init = self.init - RANGE * direction
+ end = self.end + RANGE * direction
print direction, init, end
self.SetRange((init, end))
self.Refresh()
@@ -434,14 +435,15 @@ def _move_curve(self, x, y):
node.x += (x - self.previous_wl)
node.graylevel = self.PixelToHounsfield(node.x)
+ self.previous_wl = x
+ self.to_draw_points = True
+ self.Refresh()
+
# The window level has been changed, raising a event!
evt = CLUTEvent(myEVT_CLUT_CURVE_WL_CHANGE, self.GetId(),
self.curve_dragged)
self.GetEventHandler().ProcessEvent(evt)
- self.previous_wl = x
- self.Refresh()
-
def RemovePoint(self, i, j):
"""
The point the point in the given i,j index
@@ -530,8 +532,8 @@ def _draw_selected_point_text(self, ctx):
font = ctx.CreateFont(font, TEXT_COLOUR)
ctx.SetFont(font)
- text1 = "Value: %6d" % value
- text2 = "Alpha: %.3f" % alpha
+ text1 = _("Value: %-6d" % value)
+ text2 = _("Alpha: %-.3f" % alpha)
if ctx.GetTextExtent(text1)[0] > ctx.GetTextExtent(text2)[0]:
wt, ht = ctx.GetTextExtent(text1)

0 comments on commit 7f893dc

Please sign in to comment.