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