mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-10 00:48:23 -06:00
update display name on argument change
This commit is contained in:
parent
2b086cbdf3
commit
d682ded898
@ -421,25 +421,21 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
}
|
||||
}
|
||||
});
|
||||
if (_IsNewCommand)
|
||||
{
|
||||
// for new commands, make sure we generate a new ID every time any arg value changes
|
||||
actionArgsVM.WrapperValueChanged([weakThis = get_weak()](const IInspectable& /*sender*/, const IInspectable& /*args*/) {
|
||||
if (auto weak = weakThis.get())
|
||||
actionArgsVM.WrapperValueChanged([weakThis = get_weak()](const IInspectable& /*sender*/, const IInspectable& /*args*/) {
|
||||
if (auto weak = weakThis.get())
|
||||
{
|
||||
// for new commands, make sure we generate a new ID every time any arg value changes
|
||||
if (weak->_IsNewCommand)
|
||||
{
|
||||
weak->_command.GenerateID();
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (!IsUserAction())
|
||||
{
|
||||
actionArgsVM.WrapperValueChanged([weakThis = get_weak()](const IInspectable& /*sender*/, const IInspectable& /*args*/) {
|
||||
if (auto weak = weakThis.get())
|
||||
else if (!weak->IsUserAction())
|
||||
{
|
||||
weak->_ReplaceCommandWithUserCopy(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
weak->_NotifyChanges(L"DisplayName");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void CommandViewModel::_ReplaceCommandWithUserCopy(bool reinitialize)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user