From ad342916323cfd53f3be53d3899b88034bfd3d21 Mon Sep 17 00:00:00 2001 From: PankajBhojwani Date: Wed, 21 Apr 2021 03:53:41 -0700 Subject: [PATCH] Fix for configuring starting directory in SUI when defaults sets it to null (#9862) ## Summary of the Pull Request Remove an unnecessary check in `Profiles.cpp` that was preventing us from enabling the text box and browse button when the user unchecks 'use parent process directory' ## PR Checklist * [x] Closes #9847 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [ ] Schema updated. * [x] I work here ## Validation Steps Performed Played around with it and it works. --- src/cascadia/TerminalSettingsEditor/Profiles.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cascadia/TerminalSettingsEditor/Profiles.cpp b/src/cascadia/TerminalSettingsEditor/Profiles.cpp index 08475235578..c1c83e3dc60 100644 --- a/src/cascadia/TerminalSettingsEditor/Profiles.cpp +++ b/src/cascadia/TerminalSettingsEditor/Profiles.cpp @@ -362,7 +362,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation } BackgroundImagePath(L"desktopWallpaper"); } - else if (HasBackgroundImagePath()) + else { // Restore the path we had previously cached. This might be the // empty string. @@ -399,7 +399,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation } StartingDirectory(L""); } - else if (HasStartingDirectory()) + else { // Restore the path we had previously cached as long as it wasn't empty // If it was empty, set the starting directory to %USERPROFILE%