limits: fix sliders rescaling and not restoring values when set lower than the max configured value
This commit is contained in:
parent
d3d7104ec4
commit
b988c3c8c9
@ -67,10 +67,11 @@ class LimitsPanel(ScreenPanel):
|
|||||||
if opt["option"] == option:
|
if opt["option"] == option:
|
||||||
if self.values[option] > opt["max"]:
|
if self.values[option] > opt["max"]:
|
||||||
self.limits[option]['scale'].get_style_context().add_class("option_slider_max")
|
self.limits[option]['scale'].get_style_context().add_class("option_slider_max")
|
||||||
|
# Infinite scale
|
||||||
|
self.limits[option]['adjustment'].set_upper(self.values[option] * 1.5)
|
||||||
else:
|
else:
|
||||||
self.limits[option]['scale'].get_style_context().remove_class("option_slider_max")
|
self.limits[option]['scale'].get_style_context().remove_class("option_slider_max")
|
||||||
# Infinite scale
|
self.limits[option]['adjustment'].set_upper(opt["max"] * 1.5)
|
||||||
self.limits[option]['adjustment'].set_upper(self.values[option] * 1.5)
|
|
||||||
self.limits[option]['scale'].connect("button-release-event", self.set_opt_value, option)
|
self.limits[option]['scale'].connect("button-release-event", self.set_opt_value, option)
|
||||||
|
|
||||||
def add_option(self, option, optname, units, value):
|
def add_option(self, option, optname, units, value):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user