mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-04-06 00:32:05 +02:00
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:
@@ -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 */
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user