Fix wxArrayString ctor, wstring concat, and wxList::Node for wx 3.3

- Plater: use Add() instead of wxArrayString(size_t, wxString) ctor
- Search: change sep from std::wstring to wxString for concatenation
- SendMultiMachinePage: replace wxList::Node* with compatibility_iterator
  (Node type removed in wx 3.3 with wxUSE_STD_CONTAINERS=ON)
This commit is contained in:
SoftFever
2026-03-25 11:33:50 +08:00
parent 7cbd9bfb3c
commit 1765d296a8
3 changed files with 7 additions and 11 deletions

View File

@@ -12112,7 +12112,7 @@ void Plater::import_model_id(wxString download_info)
/* load project */
// Orca: If download is a zip file, treat it as if file has been drag and dropped on the plater
if (target_path.extension() == ".zip")
this->load_files(wxArrayString(1, wxString::FromUTF8(target_path.string())));
{ wxArrayString arr; arr.Add(wxString::FromUTF8(target_path.string())); this->load_files(arr); }
else
this->load_project(target_path.wstring());
/*BBS set project info after load project, project info is reset in load project */

View File

@@ -184,7 +184,7 @@ bool OptionsSearcher::search(const std::string &search, bool force /* = false*/,
found.clear();
bool full_list = search.empty();
std::wstring sep = L" : ";
wxString sep = L" : ";
auto get_label = [this, &sep](const Option &opt, bool marked = true) {
std::wstring out;

View File

@@ -449,12 +449,10 @@ PrintParams SendMultiMachinePage::request_params(MachineObject* obj)
bool timelapse = app_config->get("print", "timelapse") == "1" ? true : false;
auto use_ams = false;
AmsRadioSelectorList::Node* node = m_radio_group.GetFirst();
auto groupid = 0;
while (node) {
AmsRadioSelector* rs = node->GetData();
for (auto it = m_radio_group.begin(); it != m_radio_group.end(); ++it) {
AmsRadioSelector* rs = *it;
if (rs->m_param_name == "use_ams" && rs->m_radiobox->GetValue()) {
use_ams = true;
}
@@ -462,8 +460,6 @@ PrintParams SendMultiMachinePage::request_params(MachineObject* obj)
if (rs->m_param_name == "use_extra" && rs->m_radiobox->GetValue()) {
use_ams = false;
}
node = node->GetNext();
}
//use ams
@@ -938,7 +934,7 @@ wxBoxSizer* SendMultiMachinePage::create_item_radiobox(wxString title, wxWindow*
void SendMultiMachinePage::OnSelectRadio(wxMouseEvent& event)
{
AmsRadioSelectorList::Node* node = m_radio_group.GetFirst();
AmsRadioSelectorList::compatibility_iterator node = m_radio_group.GetFirst();
auto groupid = 0;
//while (node) {
@@ -975,7 +971,7 @@ void SendMultiMachinePage::OnSelectRadio(wxMouseEvent& event)
void SendMultiMachinePage::on_select_radio(std::string param)
{
AmsRadioSelectorList::Node* node = m_radio_group.GetFirst();
AmsRadioSelectorList::compatibility_iterator node = m_radio_group.GetFirst();
auto groupid = 0;
while (node) {
@@ -995,7 +991,7 @@ void SendMultiMachinePage::on_select_radio(std::string param)
bool SendMultiMachinePage::get_value_radio(std::string param)
{
AmsRadioSelectorList::Node* node = m_radio_group.GetFirst();
AmsRadioSelectorList::compatibility_iterator node = m_radio_group.GetFirst();
auto groupid = 0;
while (node) {
AmsRadioSelector* rs = node->GetData();