]> git.pld-linux.org Git - packages/Carla.git/blob - param_update.patch
a bugfix from upstream
[packages/Carla.git] / param_update.patch
1 From afed293c3ea13ea68dc4bb3368021b43be8f3e32 Mon Sep 17 00:00:00 2001
2 From: falkTX <falktx@gmail.com>
3 Date: Sun, 25 Feb 2018 23:42:43 +0100
4 Subject: [PATCH] Fix for built-in parameter widgets not always updating
5
6 ---
7  source/carla_skin.py           | 2 +-
8  source/carla_widgets.py        | 2 +-
9  source/widgets/paramspinbox.py | 8 ++++----
10  3 files changed, 6 insertions(+), 6 deletions(-)
11
12 diff --git a/source/carla_skin.py b/source/carla_skin.py
13 index 49eec8061..696690c92 100755
14 --- a/source/carla_skin.py
15 +++ b/source/carla_skin.py
16 @@ -1227,7 +1227,7 @@ def slot_knobCustomMenu(self):
17          else:
18              return
19  
20 -        self.sender().setValue(value)
21 +        sender.setValue(value, True)
22  
23      #------------------------------------------------------------------
24  
25 diff --git a/source/carla_widgets.py b/source/carla_widgets.py
26 index 4e43083c5..6013a1dcc 100755
27 --- a/source/carla_widgets.py
28 +++ b/source/carla_widgets.py
29 @@ -1409,7 +1409,7 @@ def slot_knobCustomMenu(self):
30          else:
31              return
32  
33 -        self.sender().setValue(value)
34 +        sender.setValue(value, True)
35  
36      #------------------------------------------------------------------
37  
38 diff --git a/source/widgets/paramspinbox.py b/source/widgets/paramspinbox.py
39 index ad89641c4..e7495923d 100644
40 --- a/source/widgets/paramspinbox.py
41 +++ b/source/widgets/paramspinbox.py
42 @@ -160,6 +160,9 @@ def setValue(self, value):
43          else:
44              vper = float(value - self.fMinimum) / div
45  
46 +        if self.fValueCall is not None:
47 +            self.fValueCall(value)
48 +
49          QProgressBar.setValue(self, int(vper * 10000))
50  
51      def setLabel(self, label):
52 @@ -192,10 +195,7 @@ def handleMouseEventPos(self, pos):
53          elif value > self.fMaximum:
54              value = self.fMaximum
55  
56 -        if self.fValueCall is not None:
57 -            self.fValueCall(value)
58 -
59 -        self.valueChanged.emit(value)
60 +        self.setValue(value)
61  
62      def mousePressEvent(self, event):
63          if event.button() == Qt.LeftButton:
This page took 0.066489 seconds and 3 git commands to generate.