get_wraped_wxString(): Wrapping on '\' on Windows.

Deleting all G-code substitutions: Added a Cancel button.
This commit is contained in:
Vojtech Bubnik 2022-02-21 09:59:51 +01:00
parent 945bebd224
commit 6937b34fdc
2 changed files with 6 additions and 2 deletions

View File

@ -310,7 +310,11 @@ wxString get_wraped_wxString(const wxString& in, size_t line_len /*=80*/)
overwrite = true; overwrite = true;
if (newline) if (newline)
break; break;
} else if (in[j] == '/') { } else if (in[j] == '/'
#ifdef _WIN32
|| in[j] == '\\'
#endif // _WIN32
) {
// Insert after the slash. // Insert after the slash.
ibreak = ++ j; ibreak = ++ j;
overwrite = false; overwrite = false;

View File

@ -4141,7 +4141,7 @@ wxSizer* TabPrint::create_manage_substitution_widget(wxWindow* parent)
create_btn(&m_del_all_substitutions_btn, _L("Delete all"), "cross"); create_btn(&m_del_all_substitutions_btn, _L("Delete all"), "cross");
m_del_all_substitutions_btn->Bind(wxEVT_BUTTON, [this, parent](wxCommandEvent e) { m_del_all_substitutions_btn->Bind(wxEVT_BUTTON, [this, parent](wxCommandEvent e) {
if (MessageDialog(parent, _L("Are you sure you want to delete all substitutions?"), SLIC3R_APP_NAME, wxYES_NO | wxICON_QUESTION). if (MessageDialog(parent, _L("Are you sure you want to delete all substitutions?"), SLIC3R_APP_NAME, wxYES_NO | wxCANCEL | wxICON_QUESTION).
ShowModal() != wxID_YES) ShowModal() != wxID_YES)
return; return;
m_subst_manager.delete_all(); m_subst_manager.delete_all();