Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_preview_layout

This commit is contained in:
enricoturri1966 2021-11-12 14:04:52 +01:00
commit a08f8305b3
26 changed files with 2568 additions and 2442 deletions

View File

@ -72,12 +72,12 @@ hypertext_settings_category = Layers and perimeters
disabled_tags = SLA
[hint:Shapes gallery]
text = Shapes gallery\nDid you know that PrusaSlicer has a Shapes Gallery? You can use the included models as modifiers, negative volumes or as printable objects. Right-click the platter and select<a>Add Shape - Gallery.</a>
text = Shapes gallery\nDid you know that PrusaSlicer has a Shapes Gallery? You can use the included models as modifiers, negative volumes or as printable objects. Right-click the platter and select<a>Add Shape - Gallery</a>.
hypertext_type = gallery
disable_modes = simple
[hint:Auto-arrange settings]
text = Auto-arrange settings\nDid you know that you can right-click the<a>auto-arrange icon</a>to adjust the size of the gap between objects and to allow automatic rotations?
[hint:Arrange settings]
text = Arrange settings\nDid you know that you can right-click the<a>Arrange icon</a>to adjust the size of the gap between objects and to allow automatic rotations?
hypertext_type = plater
hypertext_plater_item = arrange
@ -95,7 +95,7 @@ text = Reload from disk\nDid you know that if you created a newer version of you
documentation_link = https://help.prusa3d.com/en/article/reload-from-disk_120427
[hint:Hiding sidebar]
text = Hiding sidebar\nDid you know that you can hide the right sidebar using the shortcut <b>Shift+Tab</b>? You can also enable the icon for this from the<a>Preferences.</a>
text = Hiding sidebar\nDid you know that you can hide the right sidebar using the shortcut <b>Shift+Tab</b>? You can also enable the icon for this from the<a>Preferences</a>.
hypertext_type = preferences
hypertext_preferences_page = 2
hypertext_preferences_item = show_collapse_button
@ -115,7 +115,7 @@ hypertext_gizmo_item = place
text = Set number of instances\nDid you know that you can right-click a model and set an exact number of instances instead of copy-pasting it several times?
[hint:Combine infill]
text = Combine infill\nDid you know that you can print the infill with a higher layer height compared to perimeters to save print time using the setting<a>Combine infill every.</a>
text = Combine infill\nDid you know that you can print the infill with a higher layer height compared to perimeters to save print time using the setting<a>Combine infill every</a>.
hypertext_type = settings
hypertext_settings_opt = infill_every_layers
hypertext_settings_type = 1
@ -139,7 +139,7 @@ documentation_link= https://help.prusa3d.com/en/article/per-model-settings_1674
disabled_tags = SLA
[hint:Solid infill threshold area]
text = Solid infill threshold area\nDid you know that you can make parts of your model with a small cross-section be filled with solid infill automatically? Set the<a>Solid infill threshold area.</a>(Expert mode only.)
text = Solid infill threshold area\nDid you know that you can make parts of your model with a small cross-section be filled with solid infill automatically? Set the<a>Solid infill threshold area</a>.(Expert mode only.)
hypertext_type = settings
hypertext_settings_opt = solid_infill_below_area
hypertext_settings_type = 1
@ -167,7 +167,7 @@ text = Mirror\nDid you know that you can mirror the selected model to create a r
text = PageUp / PageDown quick rotation by 45 degrees\nDid you know that you can quickly rotate selected models by 45 degrees around the Z-axis clockwise or counter-clockwise by pressing <b>Page Up</b> or <b>Page Down</b> respectively?
[hint:Load config from G-code]
text = Load config from G-code\nDid you know that you can use File-Import Config to load print, filament and printer profiles from an existing G-code file? Similarly, you can use File-Import SL1 archive, which also lets you reconstruct 3D models from the voxel data.
text = Load config from G-code\nDid you know that you can use File-Import-Import Config to load print, filament and printer profiles from an existing G-code file? Similarly, you can use File-Import-Import SL1 / SL1S archive, which also lets you reconstruct 3D models from the voxel data.
[hint:Ironing]
text = Ironing\nDid you know that you can smooth top surfaces of prints using Ironing? The nozzle will run a special second infill phase at the same layer to fill in holes and flatten any lifted plastic. Read more in the documentation. (Requires Advanced or Expert mode.)

View File

@ -4,7 +4,7 @@
viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<g id="hex_x5F_X">
<g>
<polygon fill="#808080" points="8,1 2,5 2,7 2,11 8,15 14,11 14,7 14,5 "/>
<polygon fill="#818181" points="8,1 2,5 2,7 2,11 8,15 14,11 14,7 14,5 "/>
</g>
<g id="plus_2_">

Before

Width:  |  Height:  |  Size: 782 B

After

Width:  |  Height:  |  Size: 782 B

View File

@ -4,7 +4,7 @@
viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<g id="hex_x5F_X">
<g>
<polygon fill="#808080" points="8,1 2,5 2,7 2,11 8,15 14,11 14,7 14,5 "/>
<polygon fill="#818181" points="8,1 2,5 2,7 2,11 8,15 14,11 14,7 14,5 "/>
</g>
<g id="plus_2_">

Before

Width:  |  Height:  |  Size: 786 B

After

Width:  |  Height:  |  Size: 786 B

File diff suppressed because it is too large Load Diff

View File

@ -732,7 +732,7 @@ void GCode::do_export(Print* print, const char* path, GCodeProcessor::Result* re
reports += source + ": \"" + keyword + "\"\n";
}
print->active_step_add_warning(PrintStateBase::WarningLevel::NON_CRITICAL,
_(L("Found reserved keyword(s) into custom g-code:")) + "\n" +
_(L("In the custom G-code were found reserved keywords:")) + "\n" +
reports +
_(L("This may cause problems in g-code visualization and printing time estimation.")));
}

View File

@ -481,7 +481,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("brim_width", coFloat);
def->label = L("Brim width");
def->category = L("Skirt and brim");
def->tooltip = L("Horizontal width of the brim that will be printed around each object on the first layer."
def->tooltip = L("The horizontal width of the brim that will be printed around each object on the first layer. "
"When raft is used, no brim is generated (use raft_first_layer_expansion).");
def->sidetext = L("mm");
def->min = 0;
@ -1252,7 +1252,8 @@ void PrintConfigDef::init_fff_params()
def = this->add("fuzzy_skin_thickness", coFloat);
def->label = L("Fuzzy skin thickness");
def->category = L("Fuzzy Skin");
def->tooltip = "";
def->tooltip = L("The maximum distance that each skin point can be offset (both ways), "
"measured perpendicular to the perimeter wall.");
def->sidetext = L("mm");
def->min = 0;
def->mode = comAdvanced;
@ -1261,7 +1262,8 @@ void PrintConfigDef::init_fff_params()
def = this->add("fuzzy_skin_point_dist", coFloat);
def->label = L("Fuzzy skin point distance");
def->category = L("Fuzzy Skin");
def->tooltip = "";
def->tooltip = L("Perimeters will be split into multiple segments by inserting Fuzzy skin points. "
"Lowering the Fuzzy skin point distance will increase the number of randomly offset points on the perimeter wall.");
def->sidetext = L("mm");
def->min = 0;
def->mode = comAdvanced;
@ -2745,7 +2747,8 @@ void PrintConfigDef::init_fff_params()
def = this->add("thick_bridges", coBool);
def->label = L("Thick bridges");
def->category = L("Layers and Perimeters");
def->tooltip = L("Print bridges with round extrusions.");
def->tooltip = L("If enabled, bridges are more reliable, can bridge longer distances, but may look worse. "
"If disabled, bridges look better but are reliable just for shorter bridged distances.");
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionBool(true));
@ -4268,7 +4271,7 @@ CLIMiscConfigDef::CLIMiscConfigDef()
def = this->add("config_compatibility", coEnum);
def->label = L("Forward-compatibility rule when loading configurations from config files and project files (3MF, AMF).");
def->tooltip = L("This version of PrusaSlicer may not understand configurations produced by newest PrusaSlicer versions. "
def->tooltip = L("This version of PrusaSlicer may not understand configurations produced by the newest PrusaSlicer versions. "
"For example, newer PrusaSlicer may extend the list of supported firmware flavors. One may decide to "
"bail out or to substitute an unknown value with a default silently or verbosely.");
def->enum_keys_map = &ConfigOptionEnum<ForwardCompatibilitySubstitutionRule>::get_enum_values();

View File

@ -772,7 +772,9 @@ void PageMaterials::set_compatible_printers_html_window(const std::vector<std::s
, second_line
);
} else {
wxString second_line = printer_names.empty() ? "" : format_wxstr(_L("Only the following installed printers are compatible with the selected %1%:"), materials->technology == T_FFF ? _L("filament") : _L("SLA material"));
wxString second_line = printer_names.empty() ? "" : format_wxstr(_L("Only the following installed printers are compatible with the selected %1%:"),
materials->technology == T_FFF ? _CTX(L_CONTEXT("filaments", "WithSelected"), "WithSelected") :
_CTX(L_CONTEXT("SLA materials", "WithSelected"), "WithSelected"));
text = wxString::Format(
"<html>"
"<style>"
@ -2488,7 +2490,7 @@ static std::string get_first_added_preset(const std::map<std::string, std::strin
bool ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *preset_bundle, const PresetUpdater *updater, bool& apply_keeped_changes)
{
wxString header, caption = _L("Configuration is editing from ConfigWizard");
wxString header, caption = _L("Configuration is edited in ConfigWizard");
const auto enabled_vendors = appconfig_new.vendors();
bool suppress_sla_printer = model_has_multi_part_objects(wxGetApp().model());
@ -2590,7 +2592,7 @@ bool ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *prese
break;
}
if (snapshot && ! take_config_snapshot_cancel_on_error(*app_config, snapshot_reason, "", _u8L("Continue with applying configuration changes?")))
if (snapshot && ! take_config_snapshot_cancel_on_error(*app_config, snapshot_reason, "", _u8L("Do you want to continue changing the configuration?")))
return false;
if (check_unsaved_preset_changes &&

View File

@ -366,7 +366,7 @@ void DesktopIntegrationDialog::perform_desktop_integration()
}
} else {
// Desktop file not written - end desktop integration
BOOST_LOG_TRIVIAL(error) << "Performing desktop integration failed - could not find applications directory";
BOOST_LOG_TRIVIAL(error) << "Performing desktop integration failed because the application directory was not found.";
return;
}
}
@ -374,8 +374,8 @@ void DesktopIntegrationDialog::perform_desktop_integration()
}
if(target_dir_desktop.empty()) {
// Desktop file not written - end desktop integration
BOOST_LOG_TRIVIAL(error) << "Performing desktop integration failed - could not find applications directory";
show_error(nullptr, _L("Performing desktop integration failed - could not find applications directory."));
BOOST_LOG_TRIVIAL(error) << "Performing desktop integration failed because the application directory was not found.";
show_error(nullptr, _L("Performing desktop integration failed because the application directory was not found."));
return;
}
// save path to desktop file

View File

@ -5256,7 +5256,7 @@ void GLCanvas3D::_render_objects(GLVolumeCollection::ERenderType type)
// visible when inside modifier meshes etc.
{
const GLGizmosManager& gm = get_gizmos_manager();
GLGizmosManager::EType type = gm.get_current_type();
// GLGizmosManager::EType type = gm.get_current_type();
if (dynamic_cast<GLGizmoPainterBase*>(gm.get_current())) {
shader->stop_using();
gm.render_painter_gizmo();

View File

@ -204,7 +204,7 @@ void change_opt_value(DynamicPrintConfig& config, const t_config_option_key& opt
}
catch (const std::exception &e)
{
wxLogError(format_wxstr(_L("Internal error when changing value for %1%: %2%"), opt_key, e.what()));
wxLogError(format_wxstr("Internal error when changing value for %1%: %2%", opt_key, e.what()));
}
}

View File

@ -2497,7 +2497,7 @@ bool GUI_App::can_load_project()
int saved_project = plater()->save_project_if_dirty(_L("Loading a new project while the current project is modified."));
if (saved_project == wxID_CANCEL ||
(plater()->is_project_dirty() && saved_project == wxID_NO &&
!check_and_save_current_preset_changes(_L("Project is loading"), _L("Loading a new project while some presets are modified."))))
!check_and_save_current_preset_changes(_L("Project is loading"), _L("Opening new project while some presets are unsaved."))))
return false;
return true;
}
@ -2921,7 +2921,7 @@ bool GUI_App::open_browser_with_warning_dialog(const wxString& url, int flags/*
bool launch = true;
if (get_app_config()->get("suppress_hyperlinks").empty()) {
RichMessageDialog dialog(nullptr, _L("Should we open this hyperlink in your default browser?"), _L("PrusaSlicer: Open hyperlink"), wxICON_QUESTION | wxYES_NO);
RichMessageDialog dialog(nullptr, _L("Open hyperlink in default browser?"), _L("PrusaSlicer: Open hyperlink"), wxICON_QUESTION | wxYES_NO);
dialog.ShowCheckBox(_L("Remember my choice"));
int answer = dialog.ShowModal();
launch = answer == wxID_YES;

View File

@ -422,7 +422,7 @@ MeshErrorsInfo ObjectList::get_mesh_errors_info(const int obj_idx, const int vol
tooltip += "\t" + format_wxstr(_L_PLURAL("%1$d backwards edge", "%1$d backwards edges", repaired.backwards_edges), repaired.backwards_edges) + "\n";
}
if (!stats.manifold()) {
remaining_info = format_wxstr(_L_PLURAL("Remaining %1$d open edge", "Remaining %1$d open edges", stats.open_edges), stats.open_edges);
remaining_info = format_wxstr(_L_PLURAL("%1$d open edge", "%1$d open edges", stats.open_edges), stats.open_edges);
tooltip += _L("Remaning errors") + ":\n";
tooltip += "\t" + format_wxstr(_L_PLURAL("%1$d open edge", "%1$d open edges", stats.open_edges), stats.open_edges) + "\n";

View File

@ -748,7 +748,7 @@ void Preview::update_layers_slider(const std::vector<double>& layers_z, bool kee
NotificationType::SignDetected, NotificationManager::NotificationLevel::PrintInfoNotificationLevel,
_u8L("NOTE:") + "\n" +
format(_u8L("Sliced object \"%1%\" looks like a logo or a sign"), object->model_object()->name) + "\n",
_u8L("Apply automatic color change"),
_u8L("Apply color change automatically"),
[this](wxEvtHandler*) {
m_layers_slider->auto_color_change();
return true;

View File

@ -286,7 +286,7 @@ void GLGizmoFdmSupports::on_render_input_window(float x, float y, float bottom_l
m_imgui->checkbox(m_desc["split_triangles"], m_triangle_splitting_enabled);
if (ImGui::IsItemHovered())
m_imgui->tooltip(_L("Split bigger facets into smaller ones while the object is painted."), max_tooltip_width);
m_imgui->tooltip(_L("Splits bigger facets into smaller ones while the object is painted."), max_tooltip_width);
m_imgui->disabled_end();
} else {

View File

@ -118,7 +118,7 @@ bool GLGizmoMmuSegmentation::on_init()
m_desc["second_color"] = _L("Second color");
m_desc["remove_caption"] = _L("Shift + Left mouse button") + ": ";
m_desc["remove"] = _L("Remove painted color");
m_desc["remove_all"] = _L("Remove all painted areas");
m_desc["remove_all"] = _L("Clear all");
m_desc["circle"] = _L("Circle");
m_desc["sphere"] = _L("Sphere");
m_desc["pointer"] = _L("Triangles");

View File

@ -7,6 +7,7 @@
#include "slic3r/GUI/3DScene.hpp"
#include "admesh/stl.h" // indexed_triangle_set
#include <mutex>
#include <thread>
namespace Slic3r {
class ModelVolume;

View File

@ -1194,9 +1194,9 @@ void MainFrame::init_menubar_as_editor()
[this](wxCommandEvent&) { save_project(); }, "save", nullptr,
[this](){return m_plater != nullptr && can_save(); }, this);
#ifdef __APPLE__
append_menu_item(fileMenu, wxID_ANY, _L("Save Project &as") + dots + "\tCtrl+Shift+S", _L("Save current project file as"),
append_menu_item(fileMenu, wxID_ANY, _L("Save project &as") + dots + "\tCtrl+Shift+S", _L("Save current project file as"),
#else
append_menu_item(fileMenu, wxID_ANY, _L("Save Project &as") + dots + "\tCtrl+Alt+S", _L("Save current project file as"),
append_menu_item(fileMenu, wxID_ANY, _L("Save project &as") + dots + "\tCtrl+Alt+S", _L("Save current project file as"),
#endif // __APPLE__
[this](wxCommandEvent&) { save_project_as(); }, "save", nullptr,
[this](){return m_plater != nullptr && can_save_as(); }, this);

View File

@ -772,11 +772,25 @@ bool OG_CustomCtrl::CtrlLine::launch_browser() const
bool launch = true;
if (get_app_config()->get("suppress_hyperlinks").empty()) {
RememberChoiceDialog dialog(nullptr, _L("Should we open this hyperlink in your default browser?"), _L("PrusaSlicer: Open hyperlink"));
RichMessageDialog dialog(nullptr, _L("Open hyperlink in default browser?"), _L("PrusaSlicer: Open hyperlink"), wxYES_NO);
dialog.ShowCheckBox(_L("Remember my choice"));
int answer = dialog.ShowModal();
launch = answer == wxID_YES;
get_app_config()->set("suppress_hyperlinks", dialog.remember_choice() ? (answer == wxID_NO ? "1" : "0") : "");
if (dialog.IsCheckBoxChecked()) {
wxString preferences_item = _L("Suppress to open hyperlink in browser");
wxString msg =
_L("PrusaSlicer will remember your choice.") + "\n\n" +
_L("You will not be asked about it again on label hovering.") + "\n\n" +
format_wxstr(_L("Visit \"Preferences\" and check \"%1%\"\nto changes your choice."), preferences_item);
MessageDialog msg_dlg(nullptr, msg, _L("PrusaSlicer: Don't ask me again"), wxOK | wxCANCEL | wxICON_INFORMATION);
if (msg_dlg.ShowModal() == wxID_CANCEL)
return false;
get_app_config()->set("suppress_hyperlinks", dialog.IsCheckBoxChecked() ? (answer == wxID_NO ? "1" : "0") : "");
}
launch = answer == wxID_YES;
}
if (launch)
launch = get_app_config()->get("suppress_hyperlinks") != "1";
@ -784,54 +798,5 @@ bool OG_CustomCtrl::CtrlLine::launch_browser() const
return launch && wxLaunchDefaultBrowser(get_url(og_line.label_path));
}
RememberChoiceDialog::RememberChoiceDialog(wxWindow* parent, const wxString& msg_text, const wxString& caption)
: wxDialog(parent, wxID_ANY, caption, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxICON_INFORMATION)
{
this->SetEscapeId(wxID_CLOSE);
wxBoxSizer* topSizer = new wxBoxSizer(wxVERTICAL);
m_remember_choice = new wxCheckBox(this, wxID_ANY, _L("Remember my choice"));
m_remember_choice->SetValue(false);
m_remember_choice->Bind(wxEVT_CHECKBOX, [this](wxCommandEvent& evt)
{
if (!evt.IsChecked())
return;
wxString preferences_item = _L("Suppress to open hyperlink in browser");
wxString msg =
_L("PrusaSlicer will remember your choice.") + "\n\n" +
_L("You will not be asked about it again on label hovering.") + "\n\n" +
format_wxstr(_L("Visit \"Preferences\" and check \"%1%\"\nto changes your choice."), preferences_item);
//wxMessageDialog dialog(nullptr, msg, _L("PrusaSlicer: Don't ask me again"), wxOK | wxCANCEL | wxICON_INFORMATION);
MessageDialog dialog(nullptr, msg, _L("PrusaSlicer: Don't ask me again"), wxOK | wxCANCEL | wxICON_INFORMATION);
if (dialog.ShowModal() == wxID_CANCEL)
m_remember_choice->SetValue(false);
});
// Add dialog's buttons
wxStdDialogButtonSizer* btns = this->CreateStdDialogButtonSizer(wxYES | wxNO);
wxButton* btnYES = static_cast<wxButton*>(this->FindWindowById(wxID_YES, this));
wxButton* btnNO = static_cast<wxButton*>(this->FindWindowById(wxID_NO, this));
btnYES->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { this->EndModal(wxID_YES); });
btnNO->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { this->EndModal(wxID_NO); });
topSizer->Add(new wxStaticText(this, wxID_ANY, msg_text), 0, wxEXPAND | wxALL, 10);
topSizer->Add(m_remember_choice, 0, wxEXPAND | wxALL, 10);
topSizer->Add(btns, 0, wxEXPAND | wxALL, 10);
#ifdef _WIN32
wxGetApp().UpdateDlgDarkUI(this);
#else
this->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
#endif
this->SetSizer(topSizer);
topSizer->SetSizeHints(this);
this->CenterOnScreen();
}
} // GUI
} // Slic3r

View File

@ -106,20 +106,6 @@ public:
};
//-----------------------------------------------
// RememberChoiceDialog
//-----------------------------------------------
class RememberChoiceDialog : public wxDialog
{
wxCheckBox* m_remember_choice;
public:
RememberChoiceDialog(wxWindow* parent, const wxString& msg_text, const wxString& caption);
~RememberChoiceDialog() {}
bool remember_choice() const { return m_remember_choice->GetValue(); }
};
}}
#endif /* slic3r_OG_CustomCtrl_hpp_ */

View File

@ -2532,7 +2532,7 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
MessageDialog msg_dlg(q, _L(
"This file contains several objects positioned at multiple heights.\n"
"Instead of considering them as multiple objects, should \n"
"should the file be loaded as a single object having multiple parts?") + "\n",
"the file be loaded as a single object having multiple parts?") + "\n",
_L("Multi-part object detected"), wxICON_WARNING | wxYES | wxNO);
if (msg_dlg.ShowModal() == wxID_YES) {
model.convert_multipart_object(nozzle_dmrs->values.size());
@ -3437,7 +3437,7 @@ void Plater::priv::replace_with_stl()
if (!volume->source.input_file.empty() && fs::exists(volume->source.input_file))
input_path = volume->source.input_file;
wxString title = _L("Please select the file to replace");
wxString title = _L("Select the new file");
title += ":";
wxFileDialog dialog(q, title, "", from_u8(input_path.filename().string()), file_wildcards(FT_MODEL), wxFD_OPEN | wxFD_FILE_MUST_EXIST);
if (dialog.ShowModal() != wxID_OK)
@ -5059,7 +5059,7 @@ void Plater::new_project()
int act_buttons = ab::KEEP;
if (saved_project == wxID_NO)
act_buttons |= ab::SAVE;
if (!wxGetApp().check_and_keep_current_preset_changes(_L("New Project is creating"), header, act_buttons))
if (!wxGetApp().check_and_keep_current_preset_changes(_L("Creating a new project"), header, act_buttons))
return;
}
@ -5891,7 +5891,7 @@ bool Plater::export_3mf(const boost::filesystem::path& output_path)
{
#if ENABLE_SAVE_COMMANDS_ALWAYS_ENABLED
if (p->model.objects.empty()) {
MessageDialog dialog(nullptr, _L("The plater is empty.\nConfirm you want to save the project ?"), _L("Save project"), wxYES_NO);
MessageDialog dialog(nullptr, _L("The plater is empty.\nDo you want to save the project?"), _L("Save project"), wxYES_NO);
if (dialog.ShowModal() != wxID_YES)
return false;
}

View File

@ -218,7 +218,7 @@ void PreferencesDialog::build(size_t selected_tab)
m_optgroup_general->append_separator();
def.label = L("Ask for unsaved changes when closing application or loading new project");
def.label = L("Ask to save unsaved changes when closing the application or when loading a new project.");
def.type = coBool;
def.tooltip = L("Always ask for unsaved changes, when: \n"
"- Closing PrusaSlicer while some presets are modified,\n"
@ -468,7 +468,7 @@ void PreferencesDialog::build(size_t selected_tab)
// Add "Dark Mode" tab
if (is_editor) {
// Add "Dark Mode" tab
m_optgroup_dark_mode = create_options_tab(_L("Dark mode (experimental)"), tabs);
m_optgroup_dark_mode = create_options_tab(_L("Dark mode IU (experimental)"), tabs);
m_optgroup_dark_mode->m_on_change = [this](t_config_option_key opt_key, boost::any value) {
m_values[opt_key] = boost::any_cast<bool>(value) ? "1" : "0";
};
@ -542,8 +542,8 @@ void PreferencesDialog::accept(wxEvent&)
wxString title = wxGetApp().is_editor() ? wxString(SLIC3R_APP_NAME) : wxString(GCODEVIEWER_APP_NAME);
title += " - " + _L("Changes for the critical options");
MessageDialog dialog(nullptr,
_L("Changing fo some options will trigger application restart.\n"
"You will lose content of the plater.") + "\n\n" +
_L("Changing some options will trigger application restart.\n"
"You will lose the content of the plater.") + "\n\n" +
_L("Do you want to proceed?"),
title,
wxICON_QUESTION | wxYES | wxNO);
@ -762,7 +762,7 @@ void PreferencesDialog::create_settings_text_color_widget()
{
wxWindow* parent = m_optgroup_gui->parent();
wxStaticBox* stb = new wxStaticBox(parent, wxID_ANY, _L("Text color Settings"));
wxStaticBox* stb = new wxStaticBox(parent, wxID_ANY, _L("Text colors"));
wxGetApp().UpdateDarkUI(stb);
if (!wxOSX) stb->SetBackgroundStyle(wxBG_STYLE_PAINT);

View File

@ -573,31 +573,7 @@ PlaterPresetComboBox::PlaterPresetComboBox(wxWindow *parent, Preset::Type preset
}
// Swallow the mouse click and open the color picker.
// get current color
DynamicPrintConfig* cfg = wxGetApp().get_tab(Preset::TYPE_PRINTER)->get_config();
auto colors = static_cast<ConfigOptionStrings*>(cfg->option("extruder_colour")->clone());
wxColour clr(colors->values[m_extruder_idx]);
if (!clr.IsOk())
clr = wxColour(0,0,0); // Don't set alfa to transparence
auto data = new wxColourData();
data->SetChooseFull(1);
data->SetColour(clr);
wxColourDialog dialog(this, data);
dialog.CenterOnParent();
if (dialog.ShowModal() == wxID_OK)
{
colors->values[m_extruder_idx] = dialog.GetColourData().GetColour().GetAsString(wxC2S_HTML_SYNTAX).ToStdString();
DynamicPrintConfig cfg_new = *cfg;
cfg_new.set_key_value("extruder_colour", colors);
wxGetApp().get_tab(Preset::TYPE_PRINTER)->load_config(cfg_new);
this->update();
wxGetApp().plater()->on_config_change(cfg_new);
}
change_extruder_color();
});
}
@ -607,28 +583,15 @@ PlaterPresetComboBox::PlaterPresetComboBox(wxWindow *parent, Preset::Type preset
edit_btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent)
{
// In a case of a physical printer, for its editing open PhysicalPrinterDialog
if (m_type == Preset::TYPE_PRINTER/* && this->is_selected_physical_printer()*/) {
this->show_edit_menu();
return;
}
if (!switch_to_tab())
return;
/* In a case of a multi-material printing, for editing another Filament Preset
* it's needed to select this preset for the "Filament settings" Tab
*/
if (m_type == Preset::TYPE_FILAMENT && wxGetApp().extruders_edited_cnt() > 1)
{
const std::string& selected_preset = GetString(GetSelection()).ToUTF8().data();
// Call select_preset() only if there is new preset and not just modified
if ( !boost::algorithm::ends_with(selected_preset, Preset::suffix_modified()) )
{
const std::string& preset_name = wxGetApp().preset_bundle->filaments.get_preset_name_by_alias(selected_preset);
wxGetApp().get_tab(m_type)->select_preset(preset_name);
}
}
if (m_type == Preset::TYPE_PRINTER
#ifdef __linux__
// To edit extruder color from the sidebar
|| m_type == Preset::TYPE_FILAMENT
#endif //__linux__
)
show_edit_menu();
else
switch_to_tab();
});
}
@ -672,20 +635,59 @@ void PlaterPresetComboBox::OnSelect(wxCommandEvent &evt)
evt.Skip();
}
bool PlaterPresetComboBox::switch_to_tab()
void PlaterPresetComboBox::switch_to_tab()
{
Tab* tab = wxGetApp().get_tab(m_type);
if (!tab)
return false;
int page_id = wxGetApp().tab_panel()->FindPage(tab);
if (page_id == wxNOT_FOUND)
return false;
return;
if (int page_id = wxGetApp().tab_panel()->FindPage(tab); page_id != wxNOT_FOUND)
{
wxGetApp().tab_panel()->SetSelection(page_id);
// Switch to Settings NotePad
wxGetApp().mainframe->select_tab();
return true;
//In a case of a multi-material printing, for editing another Filament Preset
//it's needed to select this preset for the "Filament settings" Tab
if (m_type == Preset::TYPE_FILAMENT && wxGetApp().extruders_edited_cnt() > 1)
{
const std::string& selected_preset = GetString(GetSelection()).ToUTF8().data();
// Call select_preset() only if there is new preset and not just modified
if (!boost::algorithm::ends_with(selected_preset, Preset::suffix_modified()))
{
const std::string& preset_name = wxGetApp().preset_bundle->filaments.get_preset_name_by_alias(selected_preset);
wxGetApp().get_tab(m_type)->select_preset(preset_name);
}
}
}
}
void PlaterPresetComboBox::change_extruder_color()
{
// get current color
DynamicPrintConfig* cfg = wxGetApp().get_tab(Preset::TYPE_PRINTER)->get_config();
auto colors = static_cast<ConfigOptionStrings*>(cfg->option("extruder_colour")->clone());
wxColour clr(colors->values[m_extruder_idx]);
if (!clr.IsOk())
clr = wxColour(0, 0, 0); // Don't set alfa to transparence
auto data = new wxColourData();
data->SetChooseFull(1);
data->SetColour(clr);
wxColourDialog dialog(this, data);
dialog.CenterOnParent();
if (dialog.ShowModal() == wxID_OK)
{
colors->values[m_extruder_idx] = dialog.GetColourData().GetColour().GetAsString(wxC2S_HTML_SYNTAX).ToStdString();
DynamicPrintConfig cfg_new = *cfg;
cfg_new.set_key_value("extruder_colour", colors);
wxGetApp().get_tab(Preset::TYPE_PRINTER)->load_config(cfg_new);
this->update();
wxGetApp().plater()->on_config_change(cfg_new);
}
}
void PlaterPresetComboBox::show_add_menu()
@ -714,6 +716,16 @@ void PlaterPresetComboBox::show_edit_menu()
append_menu_item(menu, wxID_ANY, _L("Edit preset"), "",
[this](wxCommandEvent&) { this->switch_to_tab(); }, "cog", menu, []() { return true; }, wxGetApp().plater());
#ifdef __linux__
// To edit extruder color from the sidebar
if (m_type == Preset::TYPE_FILAMENT) {
append_menu_item(menu, wxID_ANY, _L("Change extruder color"), "",
[this](wxCommandEvent&) { this->change_extruder_color(); }, "funnel", menu, []() { return true; }, wxGetApp().plater());
wxGetApp().plater()->PopupMenu(menu);
return;
}
#endif //__linux__
if (this->is_selected_physical_printer()) {
append_menu_item(menu, wxID_ANY, _L("Edit physical printer"), "",
[this](wxCommandEvent&) { this->edit_physical_printer(); }, "cog", menu, []() { return true; }, wxGetApp().plater());

View File

@ -147,7 +147,8 @@ public:
void set_extruder_idx(const int extr_idx) { m_extruder_idx = extr_idx; }
int get_extruder_idx() const { return m_extruder_idx; }
bool switch_to_tab();
void switch_to_tab();
void change_extruder_color();
void show_add_menu();
void show_edit_menu();

View File

@ -1481,11 +1481,10 @@ void TabPrint::build()
optgroup->append_single_option_line("gap_fill_enabled");
optgroup = page->new_optgroup(L("Fuzzy skin (experimental)"));
Option option = optgroup->get_option("fuzzy_skin");
// option.opt.width = 30;
optgroup->append_single_option_line(option);
optgroup->append_single_option_line(optgroup->get_option("fuzzy_skin_thickness"));
optgroup->append_single_option_line(optgroup->get_option("fuzzy_skin_point_dist"));
category_path = "fuzzy-skin_246186/#";
optgroup->append_single_option_line("fuzzy_skin", category_path + "fuzzy-skin-type");
optgroup->append_single_option_line("fuzzy_skin_thickness", category_path + "fuzzy-skin-thickness");
optgroup->append_single_option_line("fuzzy_skin_point_dist", category_path + "fuzzy-skin-point-distance");
page = add_options_page(L("Infill"), "infill");
category_path = "infill_42#";
@ -1666,7 +1665,7 @@ void TabPrint::build()
optgroup = page->new_optgroup(L("Output file"));
optgroup->append_single_option_line("gcode_comments");
optgroup->append_single_option_line("gcode_label_objects");
option = optgroup->get_option("output_filename_format");
Option option = optgroup->get_option("output_filename_format");
option.opt.full_width = true;
optgroup->append_single_option_line(option);
@ -3248,7 +3247,7 @@ void Tab::select_preset(std::string preset_name, bool delete_current /*=false*/,
const PresetWithVendorProfile new_printer_preset_with_vendor_profile = m_presets->get_preset_with_vendor_profile(new_printer_preset);
PrinterTechnology old_printer_technology = m_presets->get_edited_preset().printer_technology();
PrinterTechnology new_printer_technology = new_printer_preset.printer_technology();
if (new_printer_technology == ptSLA && old_printer_technology == ptFFF && !wxGetApp().may_switch_to_SLA_preset(_L("New printer preset is selecting")))
if (new_printer_technology == ptSLA && old_printer_technology == ptFFF && !wxGetApp().may_switch_to_SLA_preset(_L("New printer preset selected")))
canceled = true;
else {
struct PresetUpdate {

View File

@ -899,7 +899,7 @@ void UnsavedChangesDialog::build(Preset::Type type, PresetCollection* dependent_
_L("You will not be asked about the unsaved changes the next time you: \n"
"- close the application,\n"
"- load project,\n"
"- process Undo / Redo with change of print technologie,\n"
"- process Undo / Redo with a change of print technology,\n"
"- take/load snapshot,\n"
"- load config file/bundle,\n"
"- export config_bundle") ;
@ -1628,7 +1628,7 @@ void DiffPresetDialog::update_tree()
const DynamicPrintConfig& right_congig = right_preset->config;
if (left_pt != right_preset->printer_technology()) {
bottom_info = _L("Comparable printer presets has different printer technology");
bottom_info = _L("Compared presets has different printer technology");
preset_combos.equal_bmp->SetBitmap_(ScalableBitmap(this, "question"));
preset_combos.equal_bmp->SetToolTip(bottom_info);
continue;
@ -1651,7 +1651,7 @@ void DiffPresetDialog::update_tree()
show_tree = true;
preset_combos.equal_bmp->SetBitmap_(ScalableBitmap(this, "not_equal"));
preset_combos.equal_bmp->SetToolTip(_L("Presets are different.\n"
"Click this button to select the same as left preset for the right preset."));
"Click this button to select the same preset for the right and left preset."));
m_tree->model->AddPreset(type, "\"" + from_u8(left_preset->name) + "\" vs \"" + from_u8(right_preset->name) + "\"", left_pt);

View File

@ -776,7 +776,7 @@ static bool reload_configs_update_gui()
{
wxString header = _L("Configuration Updates causes a lost of preset modification.\n"
"So, check unsaved changes and save them if necessary.");
if (!GUI::wxGetApp().check_and_save_current_preset_changes(_L("Updater is processing"), header, false ))
if (!GUI::wxGetApp().check_and_save_current_preset_changes(_L("Updating"), header, false ))
return false;
// Reload global configuration