mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-10 00:07:52 -06:00
ENH: do not show the functions if it is not supported
Change-Id: Iaee9c756f40fd26c376160e9cda305bee88d713b Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
parent
eaf7f87abb
commit
55b6bc5563
5 changed files with 69 additions and 4 deletions
|
@ -200,6 +200,11 @@ void AMSSetting::create()
|
|||
m_panel_img->Layout();
|
||||
m_sizer_img->Fit(m_panel_img);
|
||||
|
||||
m_sizer_remain_block = new wxBoxSizer(wxVERTICAL);
|
||||
m_sizer_remain_block->Add(m_sizer_remain, 0, wxEXPAND | wxTOP, FromDIP(8));
|
||||
m_sizer_remain_block->Add(0, 0, 0, wxTOP, 8);
|
||||
m_sizer_remain_block->Add(m_sizer_remain_tip, 0, wxLEFT, 18);
|
||||
m_sizer_remain_block->Add(0, 0, 0, wxTOP, 15);
|
||||
|
||||
m_sizerl_body->Add(m_sizer_Insert_material, 0, wxEXPAND, 0);
|
||||
m_sizerl_body->Add(0, 0, 0, wxTOP, 8);
|
||||
|
@ -209,10 +214,7 @@ void AMSSetting::create()
|
|||
m_sizerl_body->Add(0, 0, 0, wxTOP, 8);
|
||||
m_sizerl_body->Add(m_sizer_starting_tip, 0, wxLEFT, 18);
|
||||
m_sizerl_body->Add(0, 0, 0, wxTOP, 15);
|
||||
m_sizerl_body->Add(m_sizer_remain, 0, wxEXPAND | wxTOP, FromDIP(8));
|
||||
m_sizerl_body->Add(0, 0, 0, wxTOP, 8);
|
||||
m_sizerl_body->Add(m_sizer_remain_tip, 0, wxLEFT, 18);
|
||||
m_sizerl_body->Add(0, 0, 0, wxTOP, 15);
|
||||
m_sizerl_body->Add(m_sizer_remain_block, 0, wxEXPAND, 0);
|
||||
m_sizerl_body->Add(m_sizer_switch_filament, 0, wxEXPAND | wxTOP, FromDIP(8));
|
||||
m_sizerl_body->Add(0, 0, 0, wxTOP, 8);
|
||||
m_sizerl_body->Add(m_sizer_switch_filament_tip, 0, wxLEFT, 18);
|
||||
|
@ -231,6 +233,17 @@ void AMSSetting::create()
|
|||
|
||||
this->Centre(wxBOTH);
|
||||
wxGetApp().UpdateDlgDarkUI(this);
|
||||
|
||||
Bind(wxEVT_SHOW, [this](auto& e) {
|
||||
if (this->IsShown()) {
|
||||
if (ams_support_remain) {
|
||||
m_sizer_remain_block->Show(true);
|
||||
}
|
||||
else {
|
||||
m_sizer_remain_block->Show(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void AMSSetting::update_insert_material_read_mode(bool selected)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue