mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
GCodeViewer -> Toggle extrusion role visibility by clicking on legend
This commit is contained in:
parent
eac4b3c15a
commit
2a4d011817
10 changed files with 152 additions and 31 deletions
|
@ -301,21 +301,33 @@ void create_combochecklist(wxComboCtrl* comboCtrl, const std::string& text, cons
|
|||
}
|
||||
}
|
||||
|
||||
int combochecklist_get_flags(wxComboCtrl* comboCtrl)
|
||||
unsigned int combochecklist_get_flags(wxComboCtrl* comboCtrl)
|
||||
{
|
||||
int flags = 0;
|
||||
unsigned int flags = 0;
|
||||
|
||||
wxCheckListBoxComboPopup* popup = wxDynamicCast(comboCtrl->GetPopupControl(), wxCheckListBoxComboPopup);
|
||||
if (popup != nullptr)
|
||||
{
|
||||
for (unsigned int i = 0; i < popup->GetCount(); ++i)
|
||||
{
|
||||
if (popup->IsChecked(i))
|
||||
flags |= 1 << i;
|
||||
}
|
||||
}
|
||||
wxCheckListBoxComboPopup* popup = wxDynamicCast(comboCtrl->GetPopupControl(), wxCheckListBoxComboPopup);
|
||||
if (popup != nullptr)
|
||||
{
|
||||
for (unsigned int i = 0; i < popup->GetCount(); ++i)
|
||||
{
|
||||
if (popup->IsChecked(i))
|
||||
flags |= 1 << i;
|
||||
}
|
||||
}
|
||||
|
||||
return flags;
|
||||
return flags;
|
||||
}
|
||||
|
||||
void combochecklist_set_flags(wxComboCtrl* comboCtrl, unsigned int flags)
|
||||
{
|
||||
wxCheckListBoxComboPopup* popup = wxDynamicCast(comboCtrl->GetPopupControl(), wxCheckListBoxComboPopup);
|
||||
if (popup != nullptr)
|
||||
{
|
||||
for (unsigned int i = 0; i < popup->GetCount(); ++i)
|
||||
{
|
||||
popup->Check(i, (flags & (1 << i)) != 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AppConfig* get_app_config()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue