Browse Source

ParamProgressBar: fix drawing of initial value if it is 0.0

tags/v1.9.11
falkTX 6 years ago
parent
commit
82607ea956
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      source/frontend/widgets/paramspinbox.py

+ 3
- 1
source/frontend/widgets/paramspinbox.py View File

@@ -127,6 +127,7 @@ class ParamProgressBar(QProgressBar):

self.fMinimum = 0.0
self.fMaximum = 1.0
self.fInitiated = False
self.fRealValue = 0.0

self.fLastPaintedValue = None
@@ -152,9 +153,10 @@ class ParamProgressBar(QProgressBar):
self.fMaximum = value

def setValue(self, value):
if self.fRealValue == value:
if self.fRealValue == value and self.fInitiated:
return False

self.fInitiated = True
self.fRealValue = value
div = float(self.fMaximum - self.fMinimum)



Loading…
Cancel
Save