Skip to content

Commit 7373fdd

Browse files
committed
Set PathParameter default to "None" when not required
1 parent f066eea commit 7373fdd

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

Source/Processors/Parameter/Parameter.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,9 @@ PathParameter::PathParameter (ParameterOwner* owner,
11981198
isDirectory (isDirectory_),
11991199
isRequired (isRequired_)
12001200
{
1201-
currentValue = defaultValue;
1201+
currentValue = "None";
1202+
if (isRequired)
1203+
currentValue = defaultValue;
12021204
}
12031205

12041206
void PathParameter::setNextValue (var newValue_, bool undoable)
@@ -1248,7 +1250,10 @@ bool PathParameter::isValid()
12481250
{
12491251
if (currentValue.toString() == "default")
12501252
{
1251-
currentValue = defaultValue;
1253+
if (isRequired)
1254+
currentValue = defaultValue;
1255+
else
1256+
currentValue = "None";
12521257
return true;
12531258
}
12541259
else if (! isDirectory && File (currentValue.toString()).existsAsFile())

0 commit comments

Comments
 (0)