ENH: [STUDIO-2647] Optimize the interface for selecting part types

Change-Id: Ia277a37ce102708c1c8d535bf323fd58bbd0d230
This commit is contained in:
maosheng.wei 2023-05-15 19:10:36 +08:00 committed by Lane.Wei
parent 33ae019a95
commit 238080e0ab
4 changed files with 103 additions and 1 deletions

View file

@ -21,6 +21,7 @@
#include "NotificationManager.hpp"
#include "MsgDialog.hpp"
#include "Widgets/ProgressDialog.hpp"
#include "SingleChoiceDialog.hpp"
#include <boost/algorithm/string.hpp>
#include <wx/progdlg.h>
@ -4940,7 +4941,8 @@ void ObjectList::change_part_type()
}
const wxString names[] = { _L("Part"), _L("Negative Part"), _L("Modifier"), _L("Support Blocker"), _L("Support Enforcer") };
auto new_type = ModelVolumeType(wxGetApp().GetSingleChoiceIndex(_L("Type:"), _L("Choose part type"), wxArrayString(5, names), int(type)));
SingleChoiceDialog dlg(_L("Type:"), _L("Choose part type"), wxArrayString(5, names), int(type));
auto new_type = ModelVolumeType(dlg.GetSingleChoiceIndex());
if (new_type == type || new_type == ModelVolumeType::INVALID)
return;