mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-24 01:01:15 -06:00
Merge branch 'master' into vb_wold_object_manipulation
This commit is contained in:
commit
31e724abac
15 changed files with 1288 additions and 1207 deletions
|
|
@ -28,6 +28,7 @@
|
|||
#include <boost/filesystem.hpp>
|
||||
#include <boost/log/trivial.hpp>
|
||||
#include <boost/nowide/cstdio.hpp>
|
||||
#include "I18N.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
|
|
@ -81,13 +82,14 @@ void BackgroundSlicingProcess::process_fff()
|
|||
std::string export_path = m_fff_print->print_statistics().finalize_output_path(m_export_path);
|
||||
if (copy_file(m_temp_output_path, export_path) != 0)
|
||||
throw std::runtime_error("Copying of the temporary G-code to the output G-code failed");
|
||||
m_print->set_status(95, "Running post-processing scripts");
|
||||
m_print->set_status(95, L("Running post-processing scripts"));
|
||||
run_post_process_scripts(export_path, m_fff_print->config());
|
||||
m_print->set_status(100, "G-code file exported to " + export_path);
|
||||
// #ys_FIXME_localization
|
||||
m_print->set_status(100, L("G-code file exported to ") + export_path);
|
||||
} else if (! m_upload_job.empty()) {
|
||||
prepare_upload();
|
||||
} else {
|
||||
m_print->set_status(100, "Slicing complete");
|
||||
m_print->set_status(100, L("Slicing complete"));
|
||||
}
|
||||
this->set_step_done(bspsGCodeFinalize);
|
||||
}
|
||||
|
|
@ -101,11 +103,12 @@ void BackgroundSlicingProcess::process_sla()
|
|||
if (! m_export_path.empty()) {
|
||||
const std::string export_path = m_sla_print->print_statistics().finalize_output_path(m_export_path);
|
||||
m_sla_print->export_raster(export_path);
|
||||
m_print->set_status(100, "Masked SLA file exported to " + export_path);
|
||||
// #ys_FIXME_localization
|
||||
m_print->set_status(100, L("Masked SLA file exported to ") + export_path);
|
||||
} else if (! m_upload_job.empty()) {
|
||||
prepare_upload();
|
||||
} else {
|
||||
m_print->set_status(100, "Slicing complete");
|
||||
m_print->set_status(100, L("Slicing complete"));
|
||||
}
|
||||
this->set_step_done(bspsGCodeFinalize);
|
||||
}
|
||||
|
|
@ -394,7 +397,7 @@ void BackgroundSlicingProcess::prepare_upload()
|
|||
/ boost::filesystem::unique_path("." SLIC3R_APP_KEY ".upload.%%%%-%%%%-%%%%-%%%%");
|
||||
|
||||
if (m_print == m_fff_print) {
|
||||
m_print->set_status(95, "Running post-processing scripts");
|
||||
m_print->set_status(95, L("Running post-processing scripts"));
|
||||
if (copy_file(m_temp_output_path, source_path.string()) != 0) {
|
||||
throw std::runtime_error("Copying of the temporary G-code to the output G-code failed");
|
||||
}
|
||||
|
|
@ -405,7 +408,8 @@ void BackgroundSlicingProcess::prepare_upload()
|
|||
m_sla_print->export_raster(source_path.string(), m_upload_job.upload_data.upload_path.string());
|
||||
}
|
||||
|
||||
m_print->set_status(100, (boost::format("Scheduling upload to `%1%`. See Window -> Print Host Upload Queue") % m_upload_job.printhost->get_host()).str());
|
||||
// #ys_FIXME_localization
|
||||
m_print->set_status(100, (boost::format(L("Scheduling upload to `%1%`. See Window -> Print Host Upload Queue")) % m_upload_job.printhost->get_host()).str());
|
||||
|
||||
m_upload_job.upload_data.source_path = std::move(source_path);
|
||||
|
||||
|
|
|
|||
|
|
@ -795,7 +795,7 @@ bool GLCanvas3D::WarningTexture::_generate(const std::string& msg_utf8, const GL
|
|||
if (msg_utf8.empty())
|
||||
return false;
|
||||
|
||||
wxString msg = GUI::from_u8(msg_utf8);
|
||||
wxString msg = _(msg_utf8);//GUI::from_u8(msg_utf8);
|
||||
|
||||
wxMemoryDC memDC;
|
||||
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ void ObjectSettings::update_settings_list()
|
|||
if (cat.second.size() == 1 && cat.second[0] == "extruder")
|
||||
continue;
|
||||
|
||||
auto optgroup = std::make_shared<ConfigOptionsGroup>(m_og->ctrl_parent(), cat.first, config, false, extra_column);
|
||||
auto optgroup = std::make_shared<ConfigOptionsGroup>(m_og->ctrl_parent(), _(cat.first), config, false, extra_column);
|
||||
optgroup->label_width = 15;
|
||||
optgroup->sidetext_width = 5.5;
|
||||
|
||||
|
|
|
|||
|
|
@ -923,7 +923,7 @@ RENDER_AGAIN:
|
|||
// Following is rendered in both editing and non-editing mode:
|
||||
m_imgui->text("");
|
||||
if (m_clipping_plane_distance == 0.f)
|
||||
m_imgui->text("Clipping of view: ");
|
||||
m_imgui->text(_(L("Clipping of view:"))+ " ");
|
||||
else {
|
||||
if (m_imgui->button(_(L("Reset direction")))) {
|
||||
wxGetApp().CallAfter([this](){
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@ KBShortcutsDialog::KBShortcutsDialog()
|
|||
m_head_bitmaps.reserve(m_full_shortcuts.size());
|
||||
const wxSize topic_size = wxSize(10 * wxGetApp().em_unit(), -1);
|
||||
|
||||
for (auto& sc : m_full_shortcuts)
|
||||
for (auto& shortcut : m_full_shortcuts)
|
||||
{
|
||||
auto sizer = sc.second.second == szLeft ? l_sizer : r_sizer;
|
||||
auto sizer = shortcut.second.second == szLeft ? l_sizer : r_sizer;
|
||||
wxBoxSizer* hsizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
sizer->Add(hsizer, 0, wxEXPAND | wxTOP | wxBOTTOM, 10);
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ KBShortcutsDialog::KBShortcutsDialog()
|
|||
hsizer->Add(m_head_bitmaps.back(), 0, wxEXPAND | wxLEFT | wxRIGHT, 15);
|
||||
|
||||
// head
|
||||
wxStaticText* head = new wxStaticText(panel, wxID_ANY, sc.first, wxDefaultPosition, topic_size);
|
||||
wxStaticText* head = new wxStaticText(panel, wxID_ANY, shortcut.first, wxDefaultPosition, topic_size);
|
||||
head->SetFont(head_font);
|
||||
hsizer->Add(head, 0, wxALIGN_CENTER_VERTICAL);
|
||||
|
||||
|
|
@ -68,7 +68,7 @@ KBShortcutsDialog::KBShortcutsDialog()
|
|||
auto grid_sizer = new wxFlexGridSizer(2, 5, 15);
|
||||
sizer->Add(grid_sizer, 0, wxEXPAND | wxLEFT| wxRIGHT, 15);
|
||||
|
||||
for (auto pair : sc.second.first)
|
||||
for (auto pair : shortcut.second.first)
|
||||
{
|
||||
auto shortcut = new wxStaticText(panel, wxID_ANY, _(pair.first));
|
||||
shortcut->SetFont(bold_font);
|
||||
|
|
@ -124,7 +124,7 @@ void KBShortcutsDialog::fill_shortcuts()
|
|||
main_shortcuts.push_back(Shortcut("+" ,L("Add Instance to selected object ")));
|
||||
main_shortcuts.push_back(Shortcut("-" ,L("Remove Instance from selected object")));
|
||||
main_shortcuts.push_back(Shortcut("?" ,L("Show keyboard shortcuts list")));
|
||||
main_shortcuts.push_back(Shortcut(ctrl+"LeftMouse" ,L("Select multiple object/Move multiple object")));
|
||||
main_shortcuts.push_back(Shortcut(ctrl/*+"LeftMouse"*/,L("Press to select multiple object or move multiple object with mouse")));
|
||||
|
||||
m_full_shortcuts.push_back(std::make_pair(_(L("Main Shortcuts")), std::make_pair(main_shortcuts, szLeft)));
|
||||
|
||||
|
|
|
|||
|
|
@ -518,7 +518,9 @@ void MainFrame::init_menubar()
|
|||
// The camera control accelerators are captured by GLCanvas3D::on_char().
|
||||
wxMenuItem* item_iso = append_menu_item(viewMenu, wxID_ANY, _(L("Iso")) + sep + "&0", _(L("Iso View")), [this](wxCommandEvent&) { select_view("iso"); });
|
||||
viewMenu->AppendSeparator();
|
||||
//TRN To be shown in the main menu View->Top
|
||||
wxMenuItem* item_top = append_menu_item(viewMenu, wxID_ANY, _(L("Top")) + sep + "&1", _(L("Top View")), [this](wxCommandEvent&) { select_view("top"); });
|
||||
//TRN To be shown in the main menu View->Bottom
|
||||
wxMenuItem* item_bottom = append_menu_item(viewMenu, wxID_ANY, _(L("Bottom")) + sep + "&2", _(L("Bottom View")), [this](wxCommandEvent&) { select_view("bottom"); });
|
||||
wxMenuItem* item_front = append_menu_item(viewMenu, wxID_ANY, _(L("Front")) + sep + "&3", _(L("Front View")), [this](wxCommandEvent&) { select_view("front"); });
|
||||
wxMenuItem* item_rear = append_menu_item(viewMenu, wxID_ANY, _(L("Rear")) + sep + "&4", _(L("Rear View")), [this](wxCommandEvent&) { select_view("rear"); });
|
||||
|
|
|
|||
|
|
@ -996,7 +996,7 @@ void Sidebar::show_info_sizer()
|
|||
p->object_info->manifold_warning_icon->SetToolTip(tooltip);
|
||||
}
|
||||
else {
|
||||
p->object_info->info_manifold->SetLabel(L("Yes"));
|
||||
p->object_info->info_manifold->SetLabel(_(L("Yes")));
|
||||
p->object_info->showing_manifold_warning_icon = false;
|
||||
p->object_info->info_manifold->SetToolTip("");
|
||||
p->object_info->manifold_warning_icon->SetToolTip("");
|
||||
|
|
@ -2410,7 +2410,7 @@ unsigned int Plater::priv::update_background_process(bool force_validation)
|
|||
// Background data is valid.
|
||||
if ((return_state & UPDATE_BACKGROUND_PROCESS_RESTART) != 0 ||
|
||||
(return_state & UPDATE_BACKGROUND_PROCESS_REFRESH_SCENE) != 0 )
|
||||
this->statusbar()->set_status_text(L("Ready to slice"));
|
||||
this->statusbar()->set_status_text(_(L("Ready to slice")));
|
||||
|
||||
sidebar->set_btn_label(ActionButtonType::abExport, _(label_btn_export));
|
||||
sidebar->set_btn_label(ActionButtonType::abSendGCode, _(label_btn_send));
|
||||
|
|
@ -2448,7 +2448,7 @@ bool Plater::priv::restart_background_process(unsigned int state)
|
|||
// The print is valid and it can be started.
|
||||
if (this->background_process.start()) {
|
||||
this->statusbar()->set_cancel_callback([this]() {
|
||||
this->statusbar()->set_status_text(L("Cancelling"));
|
||||
this->statusbar()->set_status_text(_(L("Cancelling")));
|
||||
this->background_process.stop();
|
||||
});
|
||||
return true;
|
||||
|
|
@ -2672,7 +2672,7 @@ void Plater::priv::on_slicing_update(SlicingStatusEvent &evt)
|
|||
}
|
||||
|
||||
this->statusbar()->set_progress(evt.status.percent);
|
||||
this->statusbar()->set_status_text(_(L(evt.status.text)) + wxString::FromUTF8("…"));
|
||||
this->statusbar()->set_status_text(_(evt.status.text) + wxString::FromUTF8("…"));
|
||||
}
|
||||
if (evt.status.flags & (PrintBase::SlicingStatus::RELOAD_SCENE || PrintBase::SlicingStatus::RELOAD_SLA_SUPPORT_POINTS)) {
|
||||
switch (this->printer_technology) {
|
||||
|
|
@ -2731,7 +2731,7 @@ void Plater::priv::on_process_completed(wxCommandEvent &evt)
|
|||
this->statusbar()->set_status_text(message);
|
||||
}
|
||||
if (canceled)
|
||||
this->statusbar()->set_status_text(L("Cancelled"));
|
||||
this->statusbar()->set_status_text(_(L("Cancelled")));
|
||||
|
||||
this->sidebar->show_sliced_info_sizer(success);
|
||||
|
||||
|
|
|
|||
|
|
@ -1678,7 +1678,7 @@ void TabPrinter::build_printhost(ConfigOptionsGroup *optgroup)
|
|||
}
|
||||
|
||||
auto printhost_browse = [=](wxWindow* parent) {
|
||||
add_scaled_button(parent, &m_printhost_browse_btn, "browse", _(L(" Browse ")) + dots, wxBU_LEFT | wxBU_EXACTFIT);
|
||||
add_scaled_button(parent, &m_printhost_browse_btn, "browse", _(L("Browse")) + " "+ dots, wxBU_LEFT | wxBU_EXACTFIT);
|
||||
ScalableButton* btn = m_printhost_browse_btn;
|
||||
btn->SetFont(Slic3r::GUI::wxGetApp().normal_font());
|
||||
|
||||
|
|
@ -2057,7 +2057,7 @@ void TabPrinter::build_sla()
|
|||
optgroup->append_single_option_line("area_fill");
|
||||
|
||||
optgroup = page->new_optgroup(_(L("Corrections")));
|
||||
line = Line{ m_config->def()->get("relative_correction")->full_label, "" };
|
||||
line = Line{ _(m_config->def()->get("relative_correction")->full_label), "" };
|
||||
// std::vector<std::string> axes{ "X", "Y", "Z" };
|
||||
std::vector<std::string> axes{ "XY", "Z" };
|
||||
int id = 0;
|
||||
|
|
@ -3313,7 +3313,7 @@ void TabSLAMaterial::build()
|
|||
// std::vector<std::string> axes{ "X", "Y", "Z" };
|
||||
std::vector<std::string> axes{ "XY", "Z" };
|
||||
for (auto& opt_key : corrections) {
|
||||
auto line = Line{ m_config->def()->get(opt_key)->full_label, "" };
|
||||
auto line = Line{ _(m_config->def()->get(opt_key)->full_label), "" };
|
||||
int id = 0;
|
||||
for (auto& axis : axes) {
|
||||
auto opt = optgroup->get_option(opt_key, id);
|
||||
|
|
|
|||
|
|
@ -346,6 +346,28 @@ wxBitmap create_scaled_bitmap(wxWindow *win, const std::string& bmp_name_in, con
|
|||
// ObjectDataViewModelNode
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
ObjectDataViewModelNode::ObjectDataViewModelNode(ObjectDataViewModelNode* parent, const ItemType type) :
|
||||
m_parent(parent),
|
||||
m_type(type),
|
||||
m_extruder(wxEmptyString)
|
||||
{
|
||||
if (type == itSettings) {
|
||||
m_name = "Settings to modified";
|
||||
}
|
||||
else if (type == itInstanceRoot) {
|
||||
m_name = _(L("Instances"));
|
||||
#ifdef __WXGTK__
|
||||
m_container = true;
|
||||
#endif //__WXGTK__
|
||||
}
|
||||
else if (type == itInstance) {
|
||||
m_idx = parent->GetChildCount();
|
||||
m_name = wxString::Format(_(L("Instance_%d")), m_idx + 1);
|
||||
|
||||
set_action_icon();
|
||||
}
|
||||
}
|
||||
|
||||
void ObjectDataViewModelNode::set_action_icon()
|
||||
{
|
||||
m_action_icon_name = m_type == itObject ? "advanced_plus" :
|
||||
|
|
@ -384,7 +406,7 @@ bool ObjectDataViewModelNode::update_settings_digest(const std::vector<std::stri
|
|||
m_name = wxEmptyString;
|
||||
|
||||
for (auto& cat : m_opt_categories)
|
||||
m_name += cat + "; ";
|
||||
m_name += _(cat) + "; ";
|
||||
if (!m_name.IsEmpty())
|
||||
m_name.erase(m_name.Length()-2, 2); // Delete last "; "
|
||||
|
||||
|
|
|
|||
|
|
@ -219,28 +219,7 @@ public:
|
|||
set_action_icon();
|
||||
}
|
||||
|
||||
ObjectDataViewModelNode(ObjectDataViewModelNode* parent,
|
||||
const ItemType type) :
|
||||
m_parent(parent),
|
||||
m_type(type),
|
||||
m_extruder(wxEmptyString)
|
||||
{
|
||||
if (type == itSettings) {
|
||||
m_name = "Settings to modified";
|
||||
}
|
||||
else if (type == itInstanceRoot) {
|
||||
m_name = "Instances";
|
||||
#ifdef __WXGTK__
|
||||
m_container = true;
|
||||
#endif //__WXGTK__
|
||||
}
|
||||
else if (type == itInstance) {
|
||||
m_idx = parent->GetChildCount();
|
||||
m_name = wxString::Format("Instance_%d", m_idx+1);
|
||||
|
||||
set_action_icon();
|
||||
}
|
||||
}
|
||||
ObjectDataViewModelNode(ObjectDataViewModelNode* parent, const ItemType type);
|
||||
|
||||
~ObjectDataViewModelNode()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue