[silmarillion] Fix moving a tab with panes. Now, the non-first panes don't rebuild themselves on move

This commit is contained in:
Mike Griese
2023-02-13 17:13:59 -06:00
parent 4eba01f919
commit 7d903dea4a
3 changed files with 4 additions and 3 deletions

View File

@@ -35,7 +35,8 @@ namespace winrt::TerminalApp::implementation
{
auto content = ControlInteractivity{ settings, unfocusedAppearance, connection };
content.Closed({ this, &ContentManager::_closedHandler });
_content.Insert(content.Id(), content);
const auto& contentGuid{ content.Id() };
_content.Insert(contentGuid, content);
return content;
}

View File

@@ -180,7 +180,7 @@ NewTerminalArgs Pane::GetTerminalArgsForPane(const bool asContent) const
Pane::BuildStartupState Pane::BuildStartupActions(uint32_t currentId, uint32_t nextId, const bool asContent)
{
// if we are a leaf then all there is to do is defer to the parent.
if (!asContent && _IsLeaf())
if (_IsLeaf())
{
if (_lastActive)
{

View File

@@ -442,7 +442,7 @@ namespace winrt::TerminalApp::implementation
{
// Give initial ids (0 for the child created with this tab,
// 1 for the child after the first split.
auto state = _rootPane->BuildStartupActions(0, 1);
auto state = _rootPane->BuildStartupActions(0, 1, asContent);
{
ActionAndArgs newTabAction{};