From c5367e9de89155942ab5428eab5de44b1481e9d6 Mon Sep 17 00:00:00 2001 From: Pavel Kulik Date: Thu, 5 Oct 2023 14:50:03 -0700 Subject: [PATCH] Fix PathParameter updateView() --- Source/Processors/Parameter/ParameterEditor.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/Processors/Parameter/ParameterEditor.cpp b/Source/Processors/Parameter/ParameterEditor.cpp index f69db03ad..2f6acf247 100755 --- a/Source/Processors/Parameter/ParameterEditor.cpp +++ b/Source/Processors/Parameter/ParameterEditor.cpp @@ -940,7 +940,7 @@ void PathParameterEditor::buttonClicked(Button* button_) { File file = chooser.getResult(); param->setNextValue(file.getFullPathName()); - button->setTooltip(file.getFullPathName()); + updateView(); } } @@ -952,8 +952,12 @@ void PathParameterEditor::updateView() button->setEnabled(true); if (param) + { button->setButtonText(param->getValueAsString()); - //button->setButtonText(File(param->getValueAsString()).getFileName()); + //Alternatively: + //button->setButtonText(File(param->getValueAsString()).getFileName()); + button->setTooltip(param->getValueAsString()); + } } void PathParameterEditor::resized()