From bf35da6b91bb9bbf4a8b2744082f49a00fc3d3a3 Mon Sep 17 00:00:00 2001 From: Rafostar <40623528+Rafostar@users.noreply.github.com> Date: Mon, 31 Aug 2020 23:11:34 +0200 Subject: [PATCH] Recycle old position scale adjustment --- clapper_src/interface.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/clapper_src/interface.js b/clapper_src/interface.js index 17ed7633..23e192f9 100644 --- a/clapper_src/interface.js +++ b/clapper_src/interface.js @@ -68,11 +68,10 @@ class ClapperInterface extends Gtk.Grid ? 1 : duration / 100; - let adjustment = new Gtk.Adjustment({ - upper: duration, - step_increment: increment, - page_increment: increment - }); + let adjustment = this.controls.positionScale.get_adjustment(); + adjustment.set_upper(duration); + adjustment.set_step_increment(increment); + adjustment.set_page_increment(increment); this.controls.positionScale.set_adjustment(adjustment); }