Skip to content

Commit

Permalink
Fixed: honor the "Show close button on tabs" settings on restart
Browse files Browse the repository at this point in the history
  • Loading branch information
eranif committed Jul 19, 2024
1 parent f0a9c3e commit d1ff88d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions LiteEditor/editorsettingsdockingwidows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ EditorSettingsDockingWindows::EditorSettingsDockingWindows(wxWindow* parent, Opt
{
AddHeader(_("Tabs"));

#if 1
const std::unordered_map<wxString, int> tab_height_map = { { "TALL", OptionsConfig::nbTabHt_Tall },
{ "MEDIUM", OptionsConfig::nbTabHt_Medium },
{ "SHORT", OptionsConfig::nbTabHt_Short },
Expand All @@ -52,7 +51,6 @@ EditorSettingsDockingWindows::EditorSettingsDockingWindows(wxWindow* parent, Opt
m_options->SetNotebookTabHeight(tab_height_map.find(value_str)->second);
}
});
#endif

std::unordered_map<wxString, wxDirection> orientation_map = {
{ "UP", wxUP }, { "DOWN", wxDOWN }, { "LEFT", wxLEFT }, { "RIGHT", wxRIGHT }, { "VERTICAL", wxLEFT }
Expand Down
3 changes: 3 additions & 0 deletions LiteEditor/mainbook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ void MainBook::CreateGuiControls()
#else
long style = kNotebook_NewButton | kNotebook_AllowDnD | kNotebook_CloseButtonOnActiveTab |
kNotebook_ShowFileListButton | kNotebook_EnableNavigationEvent | kNotebook_MouseMiddleClickClosesTab;
if (!EditorConfigST::Get()->GetOptions()->IsTabHasXButton()) {
style &= ~kNotebook_CloseButtonOnActiveTab;
}
#endif

// load the notebook style from the configuration settings
Expand Down

0 comments on commit d1ff88d

Please sign in to comment.