Commit 37de99d5 authored by Jonathan Wilkes's avatar Jonathan Wilkes

fix #295: sliders can become unresponse at patch load time

parent 29a751f2
......@@ -2637,13 +2637,18 @@ function gui_slider_new(cid, tag, color, p1, p2, p3, p4, basex, basey) {
}
function gui_slider_update(cid, tag, p1, p2, p3, p4, basex, basey) {
var indicator = get_item(cid, tag + "indicator");
configure_item(indicator, {
x1: p1 - basex,
y1: p2 - basey,
x2: p3 - basex,
y2: p4 - basey
});
var indicator;
if (patchwin[cid]) {
indicator = get_item(cid, tag + "indicator");
if (indicator) {
configure_item(indicator, {
x1: p1 - basex,
y1: p2 - basey,
x2: p3 - basex,
y2: p4 - basey
});
}
}
}
function gui_slider_indicator_color(cid, tag, color) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment