mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-25 15:47:25 +08:00
Merge branch 'master' of https://github.com/Prusa3d/PrusaSlicer
This commit is contained in:
commit
59d9f35439
@ -298,6 +298,11 @@ AboutDialog::AboutDialog()
|
|||||||
buttons->Insert(0, copy_rights_btn, 0, wxLEFT, 5);
|
buttons->Insert(0, copy_rights_btn, 0, wxLEFT, 5);
|
||||||
copy_rights_btn->Bind(wxEVT_BUTTON, &AboutDialog::onCopyrightBtn, this);
|
copy_rights_btn->Bind(wxEVT_BUTTON, &AboutDialog::onCopyrightBtn, this);
|
||||||
|
|
||||||
|
m_copy_version_btn_id = NewControlId();
|
||||||
|
auto copy_version_btn = new wxButton(this, m_copy_version_btn_id, _L("Copy Version Info"));
|
||||||
|
buttons->Insert(1, copy_version_btn, 0, wxLEFT, 5);
|
||||||
|
copy_version_btn->Bind(wxEVT_BUTTON, &AboutDialog::onCopyToClipboard, this);
|
||||||
|
|
||||||
this->SetEscapeId(wxID_CLOSE);
|
this->SetEscapeId(wxID_CLOSE);
|
||||||
this->Bind(wxEVT_BUTTON, &AboutDialog::onCloseDialog, this, wxID_CLOSE);
|
this->Bind(wxEVT_BUTTON, &AboutDialog::onCloseDialog, this, wxID_CLOSE);
|
||||||
vsizer->Add(buttons, 0, wxEXPAND | wxRIGHT | wxBOTTOM, 3);
|
vsizer->Add(buttons, 0, wxEXPAND | wxRIGHT | wxBOTTOM, 3);
|
||||||
@ -348,5 +353,12 @@ void AboutDialog::onCopyrightBtn(wxEvent &)
|
|||||||
dlg.ShowModal();
|
dlg.ShowModal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AboutDialog::onCopyToClipboard(wxEvent&)
|
||||||
|
{
|
||||||
|
wxTheClipboard->Open();
|
||||||
|
wxTheClipboard->SetData(new wxTextDataObject(_L("Version") + " " + std::string(SLIC3R_VERSION)));
|
||||||
|
wxTheClipboard->Close();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace GUI
|
} // namespace GUI
|
||||||
} // namespace Slic3r
|
} // namespace Slic3r
|
||||||
|
@ -60,6 +60,7 @@ class AboutDialog : public DPIDialog
|
|||||||
wxHtmlWindow* m_html;
|
wxHtmlWindow* m_html;
|
||||||
wxStaticBitmap* m_logo;
|
wxStaticBitmap* m_logo;
|
||||||
int m_copy_rights_btn_id { wxID_ANY };
|
int m_copy_rights_btn_id { wxID_ANY };
|
||||||
|
int m_copy_version_btn_id { wxID_ANY };
|
||||||
public:
|
public:
|
||||||
AboutDialog();
|
AboutDialog();
|
||||||
|
|
||||||
@ -70,6 +71,7 @@ private:
|
|||||||
void onLinkClicked(wxHtmlLinkEvent &event);
|
void onLinkClicked(wxHtmlLinkEvent &event);
|
||||||
void onCloseDialog(wxEvent &);
|
void onCloseDialog(wxEvent &);
|
||||||
void onCopyrightBtn(wxEvent &);
|
void onCopyrightBtn(wxEvent &);
|
||||||
|
void onCopyToClipboard(wxEvent&);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace GUI
|
} // namespace GUI
|
||||||
|
@ -196,7 +196,7 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
|
|||||||
assert(it_pattern != fill_pattern_def->enum_values.end());
|
assert(it_pattern != fill_pattern_def->enum_values.end());
|
||||||
if (it_pattern != fill_pattern_def->enum_values.end()) {
|
if (it_pattern != fill_pattern_def->enum_values.end()) {
|
||||||
wxString msg_text = GUI::format_wxstr(_L("The %1% infill pattern is not supposed to work at 100%% density."),
|
wxString msg_text = GUI::format_wxstr(_L("The %1% infill pattern is not supposed to work at 100%% density."),
|
||||||
fill_pattern_def->enum_labels[it_pattern - fill_pattern_def->enum_values.begin()]);
|
_(fill_pattern_def->enum_labels[it_pattern - fill_pattern_def->enum_values.begin()]));
|
||||||
if (is_global_config)
|
if (is_global_config)
|
||||||
msg_text += "\n\n" + _L("Shall I switch to rectilinear fill pattern?");
|
msg_text += "\n\n" + _L("Shall I switch to rectilinear fill pattern?");
|
||||||
wxMessageDialog dialog(nullptr, msg_text, _L("Infill"),
|
wxMessageDialog dialog(nullptr, msg_text, _L("Infill"),
|
||||||
|
@ -2399,6 +2399,7 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
|
|||||||
wxGetApp().sidebar().update_ui_from_settings();
|
wxGetApp().sidebar().update_ui_from_settings();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!is_project_file) {
|
||||||
if (imperial_units)
|
if (imperial_units)
|
||||||
convert_from_imperial_units(model);
|
convert_from_imperial_units(model);
|
||||||
else if (model.looks_like_imperial_units()) {
|
else if (model.looks_like_imperial_units()) {
|
||||||
@ -2410,7 +2411,6 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
|
|||||||
convert_from_imperial_units(model);
|
convert_from_imperial_units(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! is_project_file) {
|
|
||||||
if (model.looks_like_multipart_object()) {
|
if (model.looks_like_multipart_object()) {
|
||||||
wxMessageDialog msg_dlg(q, _L(
|
wxMessageDialog msg_dlg(q, _L(
|
||||||
"This file contains several objects positioned at multiple heights.\n"
|
"This file contains several objects positioned at multiple heights.\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user