Skip to content

Commit

Permalink
refactor: Size factor configuration and display (#1738)
Browse files Browse the repository at this point in the history
  • Loading branch information
Danbr4d authored and rprospero committed Apr 8, 2024
1 parent 51d04d4 commit 7040697
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
5 changes: 4 additions & 1 deletion src/classes/configuration_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ bool Configuration::deserialise(LineParser &parser, const CoreData &coreData, do
*/
if (parser.getArgsDelim(LineParser::Defaults) != LineParser::Success)
return false;
appliedSizeFactor_ = parser.argd(3);
if (parser.argd(3) > 1.0)
appliedSizeFactor_ = parser.argd(3);
else
appliedSizeFactor_ = std::nullopt;
requestedSizeFactor_ = parser.argd(4);
auto nonPeriodic = parser.argb(5);
const auto lengths = parser.arg3d(0) / appliedSizeFactor_.value_or(defaultSizeFactor_);
Expand Down
7 changes: 0 additions & 7 deletions src/procedure/nodes/sizeFactor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ SizeFactorProcedureNode::SizeFactorProcedureNode()
keywords_.add<NodeValueKeyword>("SizeFactor", "Size factor scaling to apply to configuration", sizeFactor_, this);
}

/*
* Identity
*/

// Return whether a name for the node must be provided
bool SizeFactorProcedureNode::mustBeNamed() const { return true; }

/*
* Execute
*/
Expand Down
7 changes: 0 additions & 7 deletions src/procedure/nodes/sizeFactor.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@ class SizeFactorProcedureNode : public ProcedureNode
SizeFactorProcedureNode();
~SizeFactorProcedureNode() override = default;

/*
* Identity
*/
public:
// Return whether a name for the node must be provided
bool mustBeNamed() const override;

/*
* Node Data
*/
Expand Down

0 comments on commit 7040697

Please sign in to comment.