Deleted on more EVT_NOTEBOOK_PAGE_CHANGE hangling of TabPanel
This commit is contained in:
parent
6bff67a865
commit
407f50a66f
@ -195,12 +195,12 @@ void create_preset_tabs(PresetBundle *preset_bundle, AppConfig *app_config,
|
||||
add_created_tab(new TabFilament (g_wxTabPanel, no_controller), preset_bundle, app_config);
|
||||
add_created_tab(new TabPrinter (g_wxTabPanel, no_controller, is_disabled_button_browse, is_user_agent),
|
||||
preset_bundle, app_config);
|
||||
g_wxTabPanel->Bind(wxEVT_NOTEBOOK_PAGE_CHANGED, ([](wxCommandEvent e){
|
||||
Tab* panel = (Tab*)g_wxTabPanel->GetCurrentPage();
|
||||
if (panel->GetName().compare("Print Settings")==0 ||
|
||||
panel->GetName().compare("Filament Settings") == 0)
|
||||
panel->OnActivate();
|
||||
}), g_wxTabPanel->GetId() );
|
||||
// g_wxTabPanel->Bind(wxEVT_NOTEBOOK_PAGE_CHANGED, ([](wxCommandEvent e){
|
||||
// Tab* panel = (Tab*)g_wxTabPanel->GetCurrentPage();
|
||||
// if (panel->GetName().compare("Print Settings")==0 ||
|
||||
// panel->GetName().compare("Filament Settings") == 0)
|
||||
// panel->OnActivate();
|
||||
// }), g_wxTabPanel->GetId() );
|
||||
for (size_t i = 0; i < g_wxTabPanel->GetPageCount(); ++ i) {
|
||||
Tab *tab = dynamic_cast<Tab*>(g_wxTabPanel->GetPage(i));
|
||||
if (! tab)
|
||||
|
@ -11,6 +11,7 @@ char* TabIface::title() { return (char*)m_tab->title().ToStdString().data();
|
||||
void TabIface::load_config(DynamicPrintConfig* config) { m_tab->load_config(*config);}
|
||||
void TabIface::load_key_value(char* opt_key, char* value){ m_tab->load_key_value(opt_key, static_cast<std::string>(value)); }
|
||||
bool TabIface::current_preset_is_dirty() { return m_tab->current_preset_is_dirty();}
|
||||
void TabIface::OnActivate() { return m_tab->OnActivate();}
|
||||
DynamicPrintConfig* TabIface::get_config() { return m_tab->get_config(); }
|
||||
PresetCollection* TabIface::get_presets() { return m_tab->get_presets(); }
|
||||
std::vector<std::string> TabIface::get_dependent_tabs() { return m_tab->get_dependent_tabs(); }
|
||||
|
@ -23,6 +23,7 @@ public:
|
||||
void load_config(DynamicPrintConfig* config);
|
||||
void load_key_value(char* opt_key, char* value);
|
||||
bool current_preset_is_dirty();
|
||||
void OnActivate();
|
||||
DynamicPrintConfig* get_config();
|
||||
PresetCollection* get_presets();
|
||||
std::vector<std::string> get_dependent_tabs();
|
||||
|
@ -15,7 +15,8 @@
|
||||
void load_config(DynamicPrintConfig* config);
|
||||
bool current_preset_is_dirty();
|
||||
void load_key_value(char* opt_key, char* value);
|
||||
char* title();
|
||||
char* title();
|
||||
void OnActivate();
|
||||
Ref<DynamicPrintConfig> get_config();
|
||||
Ref<PresetCollection> get_presets();
|
||||
std::vector<std::string> get_dependent_tabs();
|
||||
|
Loading…
Reference in New Issue
Block a user