mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 12:11:15 -06:00 
			
		
		
		
	Merge branch 'lm_bnavigator-fix-wxtypes'
Contains encoding fixes. Uncovered after disabling unsafe wxString conversions in wxWidgets.
This commit is contained in:
		
						commit
						0486e412f4
					
				
					 6 changed files with 12 additions and 12 deletions
				
			
		|  | @ -219,7 +219,7 @@ void BackgroundSlicingProcess::thread_proc() | ||||||
|             wxString errmsg = wxString::Format(_(L("%s has encountered an error. It was likely caused by running out of memory. " |             wxString errmsg = wxString::Format(_(L("%s has encountered an error. It was likely caused by running out of memory. " | ||||||
|                                   "If you are sure you have enough RAM on your system, this may also be a bug and we would " |                                   "If you are sure you have enough RAM on your system, this may also be a bug and we would " | ||||||
|                                   "be glad if you reported it.")), SLIC3R_APP_NAME); |                                   "be glad if you reported it.")), SLIC3R_APP_NAME); | ||||||
|             error = errmsg.ToStdString() + "\n\n" + std::string(ex.what()); |             error = std::string(errmsg.ToUTF8()) + "\n\n" + std::string(ex.what()); | ||||||
|         } catch (std::exception &ex) { |         } catch (std::exception &ex) { | ||||||
| 			error = ex.what(); | 			error = ex.what(); | ||||||
| 		} catch (...) { | 		} catch (...) { | ||||||
|  |  | ||||||
|  | @ -162,7 +162,7 @@ void ConfigSnapshotDialog::on_dpi_changed(const wxRect &suggested_rect) | ||||||
| 
 | 
 | ||||||
| void ConfigSnapshotDialog::onLinkClicked(wxHtmlLinkEvent &event) | void ConfigSnapshotDialog::onLinkClicked(wxHtmlLinkEvent &event) | ||||||
| { | { | ||||||
|     m_snapshot_to_activate = event.GetLinkInfo().GetHref(); |     m_snapshot_to_activate = event.GetLinkInfo().GetHref().ToUTF8(); | ||||||
|     this->EndModal(wxID_CLOSE); |     this->EndModal(wxID_CLOSE); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -274,7 +274,7 @@ void GLCanvas3D::LayersEditing::render_overlay(const GLCanvas3D& canvas) const | ||||||
|     if (ImGui::IsItemHovered()) |     if (ImGui::IsItemHovered()) | ||||||
|     { |     { | ||||||
|         ImGui::BeginTooltip(); |         ImGui::BeginTooltip(); | ||||||
|         ImGui::TextUnformatted(_(L("Higher print quality versus higher print speed."))); |         ImGui::TextUnformatted(_(L("Higher print quality versus higher print speed.")).ToUTF8()); | ||||||
|         ImGui::EndTooltip(); |         ImGui::EndTooltip(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | @ -1302,7 +1302,7 @@ void GLCanvas3D::Labels::render(const std::vector<const ModelInstance*>& sorted_ | ||||||
|                 return owner.model_instance_id == id; |                 return owner.model_instance_id == id; | ||||||
|                 }); |                 }); | ||||||
|             if (it != owners.end()) |             if (it != owners.end()) | ||||||
|                 it->print_order = _(L("Seq.")) + "#: " + std::to_string(i + 1); |                 it->print_order = std::string((_(L("Seq."))).ToUTF8()) + "#: " + std::to_string(i + 1); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -322,7 +322,7 @@ PresetBitmapComboBox(parent, wxSize(15 * wxGetApp().em_unit(), -1)), | ||||||
|             dialog.CenterOnParent(); |             dialog.CenterOnParent(); | ||||||
|             if (dialog.ShowModal() == wxID_OK) |             if (dialog.ShowModal() == wxID_OK) | ||||||
|             { |             { | ||||||
|                 colors->values[extruder_idx] = dialog.GetColourData().GetColour().GetAsString(wxC2S_HTML_SYNTAX); |                 colors->values[extruder_idx] = dialog.GetColourData().GetColour().GetAsString(wxC2S_HTML_SYNTAX).ToStdString(); | ||||||
| 
 | 
 | ||||||
|                 DynamicPrintConfig cfg_new = *cfg; |                 DynamicPrintConfig cfg_new = *cfg; | ||||||
|                 cfg_new.set_key_value("extruder_colour", colors); |                 cfg_new.set_key_value("extruder_colour", colors); | ||||||
|  | @ -3077,7 +3077,7 @@ unsigned int Plater::priv::update_background_process(bool force_validation, bool | ||||||
|                 GUI::show_error(this->q, _(err)); |                 GUI::show_error(this->q, _(err)); | ||||||
|             } else { |             } else { | ||||||
|                 // Show the error message once the main window gets activated.
 |                 // Show the error message once the main window gets activated.
 | ||||||
|                 this->delayed_error_message = _(err); |                 this->delayed_error_message = _(err).ToUTF8(); | ||||||
|             } |             } | ||||||
|             return_state |= UPDATE_BACKGROUND_PROCESS_INVALID; |             return_state |= UPDATE_BACKGROUND_PROCESS_INVALID; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  | @ -49,14 +49,14 @@ Tab::Tab(wxNotebook* parent, const wxString& title, Preset::Type type) : | ||||||
|     m_compatible_printers.type			= Preset::TYPE_PRINTER; |     m_compatible_printers.type			= Preset::TYPE_PRINTER; | ||||||
|     m_compatible_printers.key_list		= "compatible_printers"; |     m_compatible_printers.key_list		= "compatible_printers"; | ||||||
|     m_compatible_printers.key_condition	= "compatible_printers_condition"; |     m_compatible_printers.key_condition	= "compatible_printers_condition"; | ||||||
|     m_compatible_printers.dialog_title 	= _(L("Compatible printers")); |     m_compatible_printers.dialog_title 	= _(L("Compatible printers")).ToUTF8(); | ||||||
|     m_compatible_printers.dialog_label 	= _(L("Select the printers this profile is compatible with.")); |     m_compatible_printers.dialog_label 	= _(L("Select the printers this profile is compatible with.")).ToUTF8(); | ||||||
| 
 | 
 | ||||||
|     m_compatible_prints.type			= Preset::TYPE_PRINT; |     m_compatible_prints.type			= Preset::TYPE_PRINT; | ||||||
|     m_compatible_prints.key_list 		= "compatible_prints"; |     m_compatible_prints.key_list 		= "compatible_prints"; | ||||||
|     m_compatible_prints.key_condition	= "compatible_prints_condition"; |     m_compatible_prints.key_condition	= "compatible_prints_condition"; | ||||||
|     m_compatible_prints.dialog_title 	= _(L("Compatible print profiles")); |     m_compatible_prints.dialog_title 	= _(L("Compatible print profiles")).ToUTF8(); | ||||||
|     m_compatible_prints.dialog_label 	= _(L("Select the print profiles this profile is compatible with.")); |     m_compatible_prints.dialog_label 	= _(L("Select the print profiles this profile is compatible with.")).ToUTF8(); | ||||||
| 
 | 
 | ||||||
|     wxGetApp().tabs_list.push_back(this); |     wxGetApp().tabs_list.push_back(this); | ||||||
| 
 | 
 | ||||||
|  | @ -3032,7 +3032,7 @@ void Tab::save_preset(std::string name /*= ""*/) | ||||||
|         const Preset &preset = m_presets->get_selected_preset(); |         const Preset &preset = m_presets->get_selected_preset(); | ||||||
|         auto default_name = preset.is_default ? "Untitled" : |         auto default_name = preset.is_default ? "Untitled" : | ||||||
| //                            preset.is_system ? (boost::format(_utf8(L("%1% - Copy"))) % preset.name).str() :
 | //                            preset.is_system ? (boost::format(_utf8(L("%1% - Copy"))) % preset.name).str() :
 | ||||||
|                             preset.is_system ? (boost::format(_CTX_utf8(L_CONTEXT("%1% - Copy", "PresetName"), "PresetName")) % preset.name).str() : |                             preset.is_system ? (boost::format(_CTX_utf8(L_CONTEXT("%1% - Copy", "PresetName"), "PresetName").ToUTF8()) % preset.name).str() : | ||||||
|                             preset.name; |                             preset.name; | ||||||
| 
 | 
 | ||||||
|         bool have_extention = boost::iends_with(default_name, ".ini"); |         bool have_extention = boost::iends_with(default_name, ".ini"); | ||||||
|  |  | ||||||
|  | @ -603,7 +603,7 @@ void apply_extruder_selector(wxBitmapComboBox** ctrl, | ||||||
|             ++i; |             ++i; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         (*ctrl)->Append(use_full_item_name ? wxString::Format("%s %d", str, i) : std::to_string(i), *bmp); |         (*ctrl)->Append(use_full_item_name ? wxString::Format("%s %d", str, i) : wxString::Format("%d", i), *bmp); | ||||||
|         ++i; |         ++i; | ||||||
|     } |     } | ||||||
|     (*ctrl)->SetSelection(0); |     (*ctrl)->SetSelection(0); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lukas Matena
						Lukas Matena