mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-10 18:43:54 -06:00
name fixes
This commit is contained in:
parent
c24293cd89
commit
ad0f79dbb8
@ -266,9 +266,11 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
|
||||
void CommandViewModel::Name(const winrt::hstring& newName)
|
||||
{
|
||||
if (!newName.empty())
|
||||
_command.Name(newName);
|
||||
if (newName.empty())
|
||||
{
|
||||
_command.Name(newName);
|
||||
// if the name was cleared, refresh the DisplayName
|
||||
_NotifyChanges(L"DisplayName");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -157,7 +157,14 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
|
||||
{
|
||||
if (!_name.has_value() || _name.value() != value)
|
||||
{
|
||||
_name = value;
|
||||
if (value.empty())
|
||||
{
|
||||
_name = std::nullopt;
|
||||
}
|
||||
else
|
||||
{
|
||||
_name = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user