-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change 4 more inputs to support variables in Variable action #1231
Change 4 more inputs to support variables in Variable action #1231
Conversation
64efbb9
to
c5ef9c1
Compare
lib/macro/macro-action-variable.cpp
Outdated
_segmentIdx->SetValue(_entryData->GetSegmentIndexValue() + 1); | ||
_segmentIdx->SetMacro(_entryData->GetMacro()); | ||
_segmentIdx->SetType( | ||
_entryData->_type == | ||
MacroActionVariable::Type::SET_CONDITION_VALUE | ||
? MacroSegmentSelection::Type::CONDITION | ||
: MacroSegmentSelection::Type::ACTION); | ||
_subStringStart->setValue(_entryData->_subStringStart + 1); | ||
_subStringSize->setValue(_entryData->_subStringSize); | ||
_subStringStart->SetFixedValue(_entryData->_subStringStart + 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SetValue()
needs to be used here if you want the variable selection to respected as well.
Otherwise the selection will always switch back to the non-variable selection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. There were some issues with implicit conversion here, but I'll recheck. I guess the whole index logic needs to switch to, well, be in proper function logic then? But that will break compatibility, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, correct.
To maintain forwards compatibility the settings need to be converted to the new format in the Load()
function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't know why it was done so weirdly in the 1st place, but should be fine now
c5ef9c1
to
91c4c98
Compare
@@ -105,16 +105,20 @@ MacroActionVariable::~MacroActionVariable() | |||
void MacroActionVariable::HandleIndexSubString(Variable *var) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decreased wrong var by accident, should be fine now
91c4c98
to
6dba8be
Compare
6dba8be
to
e24c171
Compare
I mainly needed the substring regex index one to set random number generated earlier there, but why not all 4
Also renamed a setter to indeed be named like a setter, as for some reason it randoml wasn't as the only thing