Skip to content
Snippets Groups Projects
Commit 15cd87e1 authored by Bienchen's avatar Bienchen
Browse files

Probably fix for BZDNG-273.

Since the problem is hard to reproduce, we say this 'might' be a fix: Updates of the slider & spinbox only occur, if the value has changed.
parent f1f0e4ed
No related branches found
No related tags found
No related merge requests found
......@@ -159,9 +159,11 @@ class CustomWidget(RenderModeWidget):
self.radius_sphere_spinbox_.setValue(value)
def UpdateBondRadiusGui(self,value):
if(abs(value*100.0 - self.radius_bond_slider_.value())>=self.radius_bond_spinbox_.singleStep()):
value = round(value, 2)
if(abs(value*100.0 - self.radius_bond_slider_.value())>=self.radius_bond_slider_.singleStep()):
self.radius_bond_slider_.setValue(value*100.0)
self.radius_bond_spinbox_.setValue(value)
if (abs(value - self.radius_bond_spinbox_.value()/100)>=self.radius_bond_spinbox_.singleStep()):
self.radius_bond_spinbox_.setValue(value)
def UpdateGui(self,options):
self.sphere_spinbox_.setValue(options.GetSphereDetail())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment