Skip to content

Commit

Permalink
Fix index parameter of ElementTabSet::SetPanel and ElementTabSet::Set…
Browse files Browse the repository at this point in the history
…Tab not doing anything. (#246)
  • Loading branch information
nimble0 authored Oct 18, 2021
1 parent 1a18c2a commit 536c24b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Core/Elements/ElementTabSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void ElementTabSet::SetTab(int tab_index, ElementPtr element)
Element* tabs = GetChildByTag("tabs");
if (tab_index >= 0 &&
tab_index < tabs->GetNumChildren())
tabs->ReplaceChild(std::move(element), GetChild(tab_index));
tabs->ReplaceChild(std::move(element), tabs->GetChild(tab_index));
else
tabs->AppendChild(std::move(element));
}
Expand All @@ -75,7 +75,7 @@ void ElementTabSet::SetPanel(int tab_index, ElementPtr element)
Element* windows = GetChildByTag("panels");
if (tab_index >= 0 &&
tab_index < windows->GetNumChildren())
windows->ReplaceChild(std::move(element), GetChild(tab_index));
windows->ReplaceChild(std::move(element), windows->GetChild(tab_index));
else
windows->AppendChild(std::move(element));
}
Expand Down

0 comments on commit 536c24b

Please sign in to comment.