55import vtk
66import vcs .vcs2vtk
77import priority
8+ import sys
89
910class MarkerEditor (behaviors .ClickableMixin , behaviors .DraggableMixin , priority .PriorityEditor ):
1011 """
@@ -61,7 +62,8 @@ def __init__(self, interactor, marker, index, display, configurator):
6162 prop .SetBackgroundColor (.87 , .79 , .55 )
6263 prop .SetBackgroundOpacity (1 )
6364 prop .SetColor (0 , 0 , 0 )
64- self .tooltip = vtk_ui .Label (self .interactor , "Ctrl + Click to place new markers." , textproperty = prop )
65+
66+ self .tooltip = vtk_ui .Label (self .interactor , "%s + Click to place new markers." % ("Cmd" if sys .platform == "darwin" else "Ctrl" ), textproperty = prop )
6567 self .tooltip .left = 0
6668 self .tooltip .top = self .interactor .GetRenderWindow ().GetSize ()[1 ] - self .tooltip .get_dimensions ()[1 ]
6769 self .tooltip .show ()
@@ -73,7 +75,7 @@ def get_object(self):
7375
7476 def handle_click (self , point ):
7577 x , y = point
76- # Alt drops a new instance
78+ # Control drops a new instance
7779 return self .in_bounds (x , y ) or self .toolbar .in_toolbar (x , y ) or self .current_modifiers ()["control" ]
7880
7981 def is_object (self , marker ):
@@ -136,7 +138,6 @@ def cancel_color(self):
136138
137139 def click_release (self ):
138140 x , y = self .event_position ()
139-
140141 if self .current_modifiers ()["control" ]:
141142 h = vtk_ui .Handle (self .interactor , (x , y ), dragged = self .adjust , color = (0 ,0 ,0 ), normalize = True )
142143 h .show ()
0 commit comments