From c4a0ab8d64a4babe680b348860e0b658b7c1cf60 Mon Sep 17 00:00:00 2001 From: Christoph Hart Date: Tue, 8 Oct 2024 15:12:35 +0200 Subject: [PATCH] - scriptnode: disable double click when outside slider range --- currentGitHash.txt | 2 +- hi_backend/backend/currentGit.h | 2 +- hi_scripting/scripting/scriptnode/ui/ParameterSlider.cpp | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/currentGitHash.txt b/currentGitHash.txt index 74fda82a2f..670d357fd5 100644 --- a/currentGitHash.txt +++ b/currentGitHash.txt @@ -1 +1 @@ -614a12b424c7244b7e830bbbfecade9e7f37133e +c687c7c2afc089f0019e59ac072036fbe2750c37 diff --git a/hi_backend/backend/currentGit.h b/hi_backend/backend/currentGit.h index 2b063c248a..c9196fac14 100644 --- a/hi_backend/backend/currentGit.h +++ b/hi_backend/backend/currentGit.h @@ -1 +1 @@ -#define PREVIOUS_HISE_COMMIT "614a12b424c7244b7e830bbbfecade9e7f37133e" +#define PREVIOUS_HISE_COMMIT "c687c7c2afc089f0019e59ac072036fbe2750c37" diff --git a/hi_scripting/scripting/scriptnode/ui/ParameterSlider.cpp b/hi_scripting/scripting/scriptnode/ui/ParameterSlider.cpp index 380bad0331..4c329bfbf3 100644 --- a/hi_scripting/scripting/scriptnode/ui/ParameterSlider.cpp +++ b/hi_scripting/scripting/scriptnode/ui/ParameterSlider.cpp @@ -1039,8 +1039,14 @@ void ParameterSlider::updateRange(Identifier, var) setRange(range.rng.getRange(), range.rng.interval); setSkewFactor(range.rng.skew); - + if(pTree.hasProperty(PropertyIds::DefaultValue)) + { + auto dv = pTree[PropertyIds::DefaultValue]; + if(!(getRange().contains(dv) || getRange().getEnd() == dv)) + setDoubleClickReturnValue(false, getRange().getStart()); + } + repaint(); }