fixing issue with disappearing tabs

src/slic3r/GUI/Tab.cpp:
        When switch to previously created tabs they were not being
        restored

The fix is better only used on Linux (lukasmatena)
This commit is contained in:
Dylan "smellyfis" Thies 2019-01-01 16:08:46 -05:00 committed by Lukas Matena
parent d88f3adce9
commit 6e2ea18b9c

View File

@ -2321,7 +2321,13 @@ void Tab::load_current_preset()
if (tab->type() == Preset::TYPE_PRINTER) // Printer tab is shown every time
continue;
if (tab->supports_printer_technology(printer_technology))
{
wxGetApp().tab_panel()->InsertPage(wxGetApp().tab_panel()->FindPage(this), tab, tab->title());
#ifdef __linux__ // the tabs apparently need to be explicitly shown on Linux (pull request #1563)
int page_id = wxGetApp().tab_panel()->FindPage(tab);
wxGetApp().tab_panel()->GetPage(page_id)->Show(true);
#endif // __linux__
}
else {
int page_id = wxGetApp().tab_panel()->FindPage(tab);
wxGetApp().tab_panel()->GetPage(page_id)->Show(false);