Browse Source

Stop repainting Info example if parameter has not really changed

Signed-off-by: falkTX <falktx@falktx.com>
pull/281/head
falkTX 4 years ago
parent
commit
294c2d2665
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      examples/Info/InfoExampleUI.cpp

+ 6
- 1
examples/Info/InfoExampleUI.cpp View File

@@ -61,6 +61,11 @@ protected:
*/
void parameterChanged(uint32_t index, float value) override
{
// some hosts send parameter change events for output parameters even when nothing changed
// we catch that here in order to prevent excessive repaints
if (d_isEqual(fParameters[index], value))
return;

fParameters[index] = value;
repaint();
}
@@ -128,7 +133,7 @@ protected:
y+=lineHeight;

// resizable
drawLeft(x, y, "UI resizable:", 20);
drawLeft(x, y, "Host resizable:", 20);
drawRight(x, y, fResizable ? "Yes" : "No", 40);
y+=lineHeight;



Loading…
Cancel
Save