Skip to content

Commit

Permalink
Set PathParameter default to "None" when not required
Browse files Browse the repository at this point in the history
  • Loading branch information
medengineer committed Jan 10, 2025
1 parent f066eea commit 7373fdd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Source/Processors/Parameter/Parameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,9 @@ PathParameter::PathParameter (ParameterOwner* owner,
isDirectory (isDirectory_),
isRequired (isRequired_)
{
currentValue = defaultValue;
currentValue = "None";
if (isRequired)
currentValue = defaultValue;
}

void PathParameter::setNextValue (var newValue_, bool undoable)
Expand Down Expand Up @@ -1248,7 +1250,10 @@ bool PathParameter::isValid()
{
if (currentValue.toString() == "default")
{
currentValue = defaultValue;
if (isRequired)
currentValue = defaultValue;
else
currentValue = "None";
return true;
}
else if (! isDirectory && File (currentValue.toString()).existsAsFile())
Expand Down

0 comments on commit 7373fdd

Please sign in to comment.