Skip to content

Commit

Permalink
refs #7541. Fix problem with early exit.
Browse files Browse the repository at this point in the history
This handler loops through the property dialogs looking for other property dialogs that correspond to input workspaces. If the loop finds an input workspace, then it immediately assumes that the workspace is suitable and exits the loop. The code block then may find that the workspace name returned is empty, but it's too late the loop has been exited, so there's no opportunity to inspect the rest of the properties. Fix is to apply the check for an empty workspace name within the loop.
  • Loading branch information
OwenArnold committed Aug 6, 2013
1 parent 9d5189a commit 01c88ca
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Code/Mantid/MantidQt/API/src/AlgorithmPropertiesWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,14 +328,19 @@ namespace API
if (prop->direction() == Direction::Input)
{
// Input workspace property. Get the text typed in.
const std::string propName = otherWidget->getProperty()->name();
const std::string WSNAME = otherWidget->getValue().toStdString();
wsName = otherWidget->getValue();
break;
if (!wsName.isEmpty())
{
propWidget->setValue(wsName);
break;
}
}
}
}

if (!wsName.isEmpty())
propWidget->setValue(wsName);

}
}

Expand Down

0 comments on commit 01c88ca

Please sign in to comment.