FIX:the checkbox in MsgDislog displays error on linux
GITHUB: #2711 Change-Id: Ie0bb6325aa064d7ed05e25240a6e1b351712fb0b
This commit is contained in:
parent
7697eb3dc8
commit
ec8d3ebaf9
|
@ -2345,6 +2345,8 @@ void GUI_App::init_app_config()
|
|||
std::string error = app_config->load();
|
||||
if (!error.empty()) {
|
||||
// Error while parsing config file. We'll customize the error message and rethrow to be displayed.
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__
|
||||
<< "Configuration file may be corrupted and is not able to be parsed.Please delete the file and try again.";
|
||||
throw Slic3r::RuntimeError(
|
||||
_u8L("BambuStudio configuration file may be corrupted and is not able to be parsed."
|
||||
"Please delete the file and try again.") +
|
||||
|
|
|
@ -297,10 +297,12 @@ static void add_msg_content(wxWindow* parent, wxBoxSizer* content_sizer, wxStrin
|
|||
page_size = wxSize(68 * em, page_height);
|
||||
}
|
||||
else {
|
||||
#ifdef __WINDOWS__
|
||||
Label* wrapped_text = new Label(html, msg);
|
||||
wrapped_text->Wrap(68 * em);
|
||||
msg = wrapped_text->GetLabel();
|
||||
wrapped_text->Destroy();
|
||||
#endif //__WINDOWS__
|
||||
wxClientDC dc(parent);
|
||||
wxSize msg_sz = dc.GetMultiLineTextExtent(msg);
|
||||
|
||||
|
@ -375,25 +377,28 @@ RichMessageDialog::RichMessageDialog(wxWindow* parent,
|
|||
{
|
||||
add_msg_content(this, content_sizer, message);
|
||||
|
||||
m_checkBox = new wxCheckBox(this, wxID_ANY, m_checkBoxText);
|
||||
wxGetApp().UpdateDarkUI(m_checkBox);
|
||||
m_checkBox->Bind(wxEVT_CHECKBOX, [this](wxCommandEvent&) { m_checkBoxValue = m_checkBox->GetValue(); });
|
||||
|
||||
btn_sizer->Insert(0, m_checkBox, wxALIGN_CENTER_VERTICAL);
|
||||
|
||||
finalize();
|
||||
}
|
||||
|
||||
int RichMessageDialog::ShowModal()
|
||||
{
|
||||
if (m_checkBoxText.IsEmpty())
|
||||
m_checkBox->Hide();
|
||||
else
|
||||
m_checkBox->SetLabelText(m_checkBoxText);
|
||||
if (!m_checkBoxText.IsEmpty()) {
|
||||
show_dsa_button(m_checkBoxText);
|
||||
m_checkbox_dsa->SetValue(m_checkBoxValue);
|
||||
}
|
||||
Layout();
|
||||
|
||||
return wxDialog::ShowModal();
|
||||
}
|
||||
|
||||
bool RichMessageDialog::IsCheckBoxChecked() const
|
||||
{
|
||||
if (m_checkbox_dsa)
|
||||
return m_checkbox_dsa->GetValue();
|
||||
|
||||
return m_checkBoxValue;
|
||||
}
|
||||
#endif
|
||||
|
||||
// InfoDialog
|
||||
|
|
|
@ -190,7 +190,7 @@ public:
|
|||
}
|
||||
|
||||
wxString GetCheckBoxText() const { return m_checkBoxText; }
|
||||
bool IsCheckBoxChecked() const { return m_checkBoxValue; }
|
||||
bool IsCheckBoxChecked() const;
|
||||
|
||||
// This part o fcode isported from the "wx\msgdlg.h"
|
||||
using wxMD = wxMessageDialogBase;
|
||||
|
|
|
@ -68,8 +68,8 @@ struct CurlGlobalInit
|
|||
else
|
||||
message = (boost::format("use system SSL certificate: %1%") % bundle).str();
|
||||
|
||||
message += "\n" + (boost::format("To manually specify the system certificate store, "
|
||||
"set the %1% environment variable to the correct CA and restart the application") % SSL_CA_FILE).str();
|
||||
message += "\n" + (boost::format("To manually specify the system certificate store, "
|
||||
"set the %1% environment variable to the correct CA and restart the application.") % SSL_CA_FILE).str();
|
||||
}
|
||||
#endif // OPENSSL_CERT_OVERRIDE
|
||||
|
||||
|
|
Loading…
Reference in New Issue