Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vcs3 d fix 2.2 slider issues #1147

Merged
merged 2 commits into from
Mar 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions Packages/DV3D/ButtonBarWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,14 +723,17 @@ def releaseSliders( self ):
self.releaseSlider( index )

def positionSlider(self, position_index, n_sliders ):
slider_pos = self.slider_postions[ n_sliders ]
( process_mode, interaction_state, swidget ) = self.currentControls[position_index]
sliderRep = swidget.GetRepresentation( )
sliderRep.GetPoint1Coordinate().SetValue( slider_pos[position_index][0], 0.06, 0 )
sliderRep.GetPoint2Coordinate().SetValue( slider_pos[position_index][1], 0.06, 0 )
sliderRep.Modified()
swidget.Modified()
sliderRep.NeedToRenderOn()
try:
slider_pos = self.slider_postions[ n_sliders ]
( process_mode, interaction_state, swidget ) = self.currentControls[position_index]
sliderRep = swidget.GetRepresentation( )
sliderRep.GetPoint1Coordinate().SetValue( slider_pos[position_index][0], 0.06, 0 )
sliderRep.GetPoint2Coordinate().SetValue( slider_pos[position_index][1], 0.06, 0 )
sliderRep.Modified()
swidget.Modified()
sliderRep.NeedToRenderOn()
except Exception, err:
print>>sys.stderr, " Error in positionSlider: ", str( err )

def setSliderValues( self, values ):
for index, value in enumerate(values):
Expand Down
5 changes: 2 additions & 3 deletions Packages/DV3D/DV3DPlot.py
Original file line number Diff line number Diff line change
Expand Up @@ -932,9 +932,8 @@ def buildPlotButtons( self, **args ):
if (self.type == '3d_vector') or not enable_3d_plots:
sliderLabels= 'Slice Position' if enable_3d_plots else []
b = bbar.addSliderButton( names=['ZSlider'], key='z', visible=enable_3d_plots, toggle=True, group='SliceRoundRobin', sliderLabels=sliderLabels, label="Slicing", state = 1, interactionHandler=self.processSlicingCommand )
if not enable_3d_plots:
vs_button = self.buttonBarHandler.findButton( 'VerticalScaling' )
if vs_button is not None: vs_button.setVisibility( False )
vs_button = self.buttonBarHandler.findButton( 'VerticalScaling' )
if vs_button is not None: vs_button.setVisibility( False )
else:
b = bbar.addConfigButton( names=['SliceRoundRobin'], key='p', interactionHandler=bbar.sliceRoundRobin )
b = bbar.addSliderButton( names=['XSlider'], key='x', toggle=True, group='SliceRoundRobin', sliderLabels='X Slice Position', label="Slicing", position=[0,3], interactionHandler=self.processSlicingCommand )
Expand Down