Fixed redundant call of Tab::select_active_page(),

when printer technologist is changed

 + Some code cleaning:The code commented as experimental and unused is deleted
This commit is contained in:
YuSanka 2020-10-07 11:52:37 +02:00
parent 8d3b4275ca
commit bab808941e
3 changed files with 50 additions and 331 deletions

View file

@ -110,13 +110,6 @@ OptionsGroup::OptionsGroup( wxWindow* _parent, const wxString& title,
m_show_modified_btns(is_tab_opt),
staticbox(title!=""), extra_column(extra_clmn)
{
/*if (staticbox) {
stb = new wxStaticBox(_parent, wxID_ANY, _(title));
if (!wxOSX) stb->SetBackgroundStyle(wxBG_STYLE_PAINT);
stb->SetFont(wxOSX ? wxGetApp().normal_font() : wxGetApp().bold_font());
} else
stb = nullptr;
sizer = (staticbox ? new wxStaticBoxSizer(stb, wxVERTICAL) : new wxBoxSizer(wxVERTICAL));*/
}
void OptionsGroup::add_undo_buttons_to_sizer(wxSizer* sizer, const t_field& field)
@ -414,17 +407,10 @@ bool OptionsGroup::activate(std::function<void()> throw_if_canceled)
// delete all controls from the option group
void OptionsGroup::clear()
{
if (!sizer)//(sizer->IsEmpty())
if (!sizer)
return;
// m_grid_sizer->Clear(true);
m_grid_sizer = nullptr;
// sizer->Clear(true);
//if (stb) {
// stb->SetContainingSizer(NULL);
// stb->Destroy();
//}
sizer = nullptr;
for (Line& line : m_lines)