mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 04:55:55 +08:00
Merge branch 'fs_fix_font_preview_offsets' into fs_dir_per_glyph_SPE-1597
This commit is contained in:
commit
52578e88a5
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -1378,7 +1378,7 @@ msgstr "Колер фону"
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:52
|
||||
msgid "Backspace"
|
||||
msgstr "<b>Backspace</b>"
|
||||
msgstr "Backspace"
|
||||
|
||||
#: ../src/common/fmapbase.cpp:160
|
||||
msgid "Baltic (ISO-8859-13)"
|
||||
@ -2741,7 +2741,7 @@ msgstr "Канец"
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:55
|
||||
msgid "Enter"
|
||||
msgstr "<b>Enter</b>"
|
||||
msgstr "Enter"
|
||||
|
||||
#: ../src/richtext/richtextstyledlg.cpp:934
|
||||
msgid "Enter a box style name"
|
||||
@ -2827,7 +2827,7 @@ msgstr "Памылка: "
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:69
|
||||
msgid "Esc"
|
||||
msgstr "<b>Esc</b>"
|
||||
msgstr "Esc"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:70
|
||||
@ -4004,7 +4004,7 @@ msgstr "Ініцыялізацыя не атрымалася ў post init, пе
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:54
|
||||
msgid "Ins"
|
||||
msgstr "<b>Ins</b>"
|
||||
msgstr "Ins"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/richtext/richtextsymboldlg.cpp:472 ../src/common/accelcmn.cpp:53
|
||||
@ -4699,7 +4699,7 @@ msgstr "&Згарнуць"
|
||||
#. TRANSLATORS: System cursor name
|
||||
#: ../src/propgrid/advprops.cpp:1763
|
||||
msgid "Middle Button"
|
||||
msgstr "<b>Сярэдняя кнопка</b>"
|
||||
msgstr "Сярэдняя кнопка"
|
||||
|
||||
#: ../src/richtext/richtextsizepage.cpp:409
|
||||
msgid "Min height:"
|
||||
@ -4933,117 +4933,117 @@ msgstr "Заўвага, 8 1/2 x 11 цалі"
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:105
|
||||
msgid "Num *"
|
||||
msgstr "<b>Num *</b>"
|
||||
msgstr "Num *"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:106
|
||||
msgid "Num +"
|
||||
msgstr "<b>Num +</b>"
|
||||
msgstr "Num +"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:107
|
||||
msgid "Num ,"
|
||||
msgstr "<b>Num ,</b>"
|
||||
msgstr "Num ,"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:108
|
||||
msgid "Num -"
|
||||
msgstr "<b>Num -</b>"
|
||||
msgstr "Num -"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:109
|
||||
msgid "Num ."
|
||||
msgstr "<b>Num .</b>"
|
||||
msgstr "Num ."
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:110
|
||||
msgid "Num /"
|
||||
msgstr "<b>Num /</b>"
|
||||
msgstr "Num /"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:104
|
||||
msgid "Num ="
|
||||
msgstr "<b>Num =</b>"
|
||||
msgstr "Num ="
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:101
|
||||
msgid "Num Begin"
|
||||
msgstr "<b>Num Begin</b>"
|
||||
msgstr "Num Begin"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:103
|
||||
msgid "Num Delete"
|
||||
msgstr "<b>Num Delete</b>"
|
||||
msgstr "Num Delete"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:95
|
||||
msgid "Num Down"
|
||||
msgstr "<b>Num Down</b>"
|
||||
msgstr "Num Down"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:100
|
||||
msgid "Num End"
|
||||
msgstr "<b>Num End</b>"
|
||||
msgstr "Num End"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:90
|
||||
msgid "Num Enter"
|
||||
msgstr "<b>Num Enter</b>"
|
||||
msgstr "Num Enter"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:91
|
||||
msgid "Num Home"
|
||||
msgstr "<b>Num Home</b>"
|
||||
msgstr "Num Home"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:102
|
||||
msgid "Num Insert"
|
||||
msgstr "<b>Num Insert</b>"
|
||||
msgstr "Num Insert"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:86
|
||||
msgid "Num Lock"
|
||||
msgstr "<b>Num Lock</b>"
|
||||
msgstr "Num Lock"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:97
|
||||
msgid "Num Page Down"
|
||||
msgstr "<b>Num Page Down</b>"
|
||||
msgstr "Num Page Down"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:96
|
||||
msgid "Num Page Up"
|
||||
msgstr "<b>Num Page Up</b>"
|
||||
msgstr "Num Page Up"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:94
|
||||
msgid "Num Right"
|
||||
msgstr "<b>Num Right</b>"
|
||||
msgstr "Num Right"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:88
|
||||
msgid "Num Space"
|
||||
msgstr "<b>Num Space</b>"
|
||||
msgstr "Num Space"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:89
|
||||
msgid "Num Tab"
|
||||
msgstr "<b>Num Tab</b>"
|
||||
msgstr "Num Tab"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:93
|
||||
msgid "Num Up"
|
||||
msgstr "<b>Num Up</b>"
|
||||
msgstr "Num Up"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:92
|
||||
msgid "Num left"
|
||||
msgstr "<b>Num left</b>"
|
||||
msgstr "Num left"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:86
|
||||
msgid "Num_lock"
|
||||
msgstr "<b>Num_lock</b>"
|
||||
msgstr "Num_lock"
|
||||
|
||||
#: ../src/richtext/richtextliststylepage.cpp:487
|
||||
#: ../src/richtext/richtextbulletspage.cpp:279
|
||||
@ -5317,12 +5317,12 @@ msgstr "Налады старонкі"
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:58
|
||||
msgid "PageDown"
|
||||
msgstr "<b>PageDown</b>"
|
||||
msgstr "PageDown"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:57
|
||||
msgid "PageUp"
|
||||
msgstr "<b>PageUp</b>"
|
||||
msgstr "PageUp"
|
||||
|
||||
#: ../src/generic/prntdlgg.cpp:216
|
||||
msgid "Pages"
|
||||
@ -5372,12 +5372,12 @@ msgstr "Дазволы"
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:60
|
||||
msgid "PgDn"
|
||||
msgstr "<b>PgDn</b>"
|
||||
msgstr "PgDn"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:59
|
||||
msgid "PgUp"
|
||||
msgstr "<b>PgUp</b>"
|
||||
msgstr "PgUp"
|
||||
|
||||
#: ../src/richtext/richtextbuffer.cpp:12868
|
||||
msgid "Picture Properties"
|
||||
@ -7448,17 +7448,17 @@ msgstr "Кірыліца Windows/DOS OEM (CP 866)"
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:111
|
||||
msgid "Windows_Left"
|
||||
msgstr "<b>Windows_Left</b>"
|
||||
msgstr "Windows_Left"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:113
|
||||
msgid "Windows_Menu"
|
||||
msgstr "<b>Windows_Menu</b>"
|
||||
msgstr "Windows_Menu"
|
||||
|
||||
#. TRANSLATORS: Name of keyboard key
|
||||
#: ../src/common/accelcmn.cpp:112
|
||||
msgid "Windows_Right"
|
||||
msgstr "<b>Windows_Right</b>"
|
||||
msgstr "Windows_Right"
|
||||
|
||||
#: ../src/common/ffile.cpp:150
|
||||
#, c-format
|
||||
@ -7520,7 +7520,7 @@ msgstr "Вы не можаце дадаць новы каталог у гэту
|
||||
|
||||
#: ../src/propgrid/propgrid.cpp:3299
|
||||
msgid "You have entered invalid value. Press ESC to cancel editing."
|
||||
msgstr "Вы ўвялі недапушчальнае значэнне. Націсніце <b>Esc</b>, каб адмяніць змены."
|
||||
msgstr "Вы ўвялі недапушчальнае значэнне. Націсніце Esc, каб адмяніць змены."
|
||||
|
||||
#: ../src/common/stockitem.cpp:209
|
||||
msgid "Zoom &In"
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -312,7 +312,7 @@ namespace Slic3r {
|
||||
std::string gcode_out;
|
||||
std::string line;
|
||||
Vec2f pos = tcr.start_pos;
|
||||
Vec2f transformed_pos = pos;
|
||||
Vec2f transformed_pos = Eigen::Rotation2Df(angle) * pos + translation;
|
||||
Vec2f old_pos(-1000.1f, -1000.1f);
|
||||
|
||||
while (gcode_str) {
|
||||
|
@ -3605,14 +3605,16 @@ void GCodeProcessor::post_process()
|
||||
auto rev_it = m_lines.rbegin() + rev_it_dist;
|
||||
auto start_rev_it = rev_it;
|
||||
|
||||
std::string curr_cmd = GCodeReader::GCodeLine::extract_cmd(rev_it->line);
|
||||
// backtrace into the cache to find the place where to insert the line
|
||||
while (rev_it != m_lines.rend() && rev_it->time > time_threshold_i && GCodeReader::GCodeLine::extract_cmd(rev_it->line) != cmd) {
|
||||
while (rev_it != m_lines.rend() && rev_it->time > time_threshold_i && curr_cmd != cmd && curr_cmd != "G28" && curr_cmd != "G29") {
|
||||
rev_it->line = line_replacer(rev_it->line);
|
||||
++rev_it;
|
||||
curr_cmd = GCodeReader::GCodeLine::extract_cmd(rev_it->line);
|
||||
}
|
||||
|
||||
// we met the previous evenience of cmd. stop inserting lines
|
||||
if (rev_it != m_lines.rend() && GCodeReader::GCodeLine::extract_cmd(rev_it->line) == cmd)
|
||||
// we met the previous evenience of cmd, or a G28/G29 command. stop inserting lines
|
||||
if (rev_it != m_lines.rend() && (curr_cmd == cmd || curr_cmd == "G28" || curr_cmd == "G29"))
|
||||
break;
|
||||
|
||||
// insert the line for the current step
|
||||
|
@ -656,12 +656,22 @@ void Layer::make_perimeters()
|
||||
layer_region_ids.push_back(region_id);
|
||||
for (LayerRegionPtrs::const_iterator it = layerm + 1; it != m_regions.end(); ++it)
|
||||
if (! (*it)->slices().empty()) {
|
||||
LayerRegion* other_layerm = *it;
|
||||
const PrintRegionConfig &other_config = other_layerm->region().config();
|
||||
if (config.perimeter_extruder == other_config.perimeter_extruder
|
||||
LayerRegion *other_layerm = *it;
|
||||
const PrintRegionConfig &other_config = other_layerm->region().config();
|
||||
bool dynamic_overhang_speed_compatibility = config.enable_dynamic_overhang_speeds ==
|
||||
other_config.enable_dynamic_overhang_speeds;
|
||||
if (dynamic_overhang_speed_compatibility && config.enable_dynamic_overhang_speeds) {
|
||||
dynamic_overhang_speed_compatibility = config.overhang_speed_0 == other_config.overhang_speed_0 &&
|
||||
config.overhang_speed_1 == other_config.overhang_speed_1 &&
|
||||
config.overhang_speed_2 == other_config.overhang_speed_2 &&
|
||||
config.overhang_speed_3 == other_config.overhang_speed_3;
|
||||
}
|
||||
|
||||
if (config.perimeter_extruder == other_config.perimeter_extruder
|
||||
&& config.perimeters == other_config.perimeters
|
||||
&& config.perimeter_speed == other_config.perimeter_speed
|
||||
&& config.external_perimeter_speed == other_config.external_perimeter_speed
|
||||
&& dynamic_overhang_speed_compatibility
|
||||
&& (config.gap_fill_enabled ? config.gap_fill_speed.value : 0.) ==
|
||||
(other_config.gap_fill_enabled ? other_config.gap_fill_speed.value : 0.)
|
||||
&& config.overhangs == other_config.overhangs
|
||||
|
@ -7493,8 +7493,9 @@ void GLCanvas3D::_set_warning_notification(EWarning warning, bool state)
|
||||
std::string objName2 = conflict_result->_objName2;
|
||||
double height = conflict_result->_height;
|
||||
int layer = conflict_result->layer;
|
||||
text = (boost::format(_u8L("Conflicts of gcode paths have been found at layer %d, z = %.2lf mm. Please separate the conflicted objects farther (%s <-> %s).")) % layer %
|
||||
height % objName1 % objName2).str();
|
||||
// TRN %3% is name of Object1, %4% is name of Object2
|
||||
text = format(_u8L("Conflicts in G-code paths have been detected at layer %1%, z=%2$.2f mm. Please reposition the conflicting objects (%3% <-> %4%) further apart."),
|
||||
layer, height, objName1, objName2);
|
||||
error = ErrorType::SLICING_ERROR;
|
||||
break;
|
||||
}
|
||||
|
@ -605,6 +605,7 @@ wxString sla_wildcards(const char *formatid)
|
||||
if (entry) {
|
||||
FileWildcards wc;
|
||||
std::string tr_title = I18N::translate_utf8(entry->desc);
|
||||
// TRN %s = type of file
|
||||
tr_title = GUI::format(_u8L("%s files"), tr_title);
|
||||
wc.title = tr_title;
|
||||
|
||||
|
@ -1019,6 +1019,8 @@ GLGizmoEmboss::GuiCfg GLGizmoEmboss::create_gui_configuration()
|
||||
int max_style_image_height = 1.5 * input_height;
|
||||
cfg.max_style_image_size = Vec2i(max_style_image_width, max_style_image_height);
|
||||
cfg.face_name_size.y() = line_height_with_spacing;
|
||||
cfg.face_name_size.x() = cfg.input_width;
|
||||
cfg.face_name_texture_offset_x = cfg.input_width + space;
|
||||
return cfg;
|
||||
}
|
||||
|
||||
@ -2195,7 +2197,7 @@ void GLGizmoEmboss::draw_font_list()
|
||||
}
|
||||
|
||||
if (!m_face_names.has_truncated_names)
|
||||
init_truncated_names(m_face_names, m_gui_cfg->face_name_max_width);
|
||||
init_truncated_names(m_face_names, m_gui_cfg->input_width);
|
||||
|
||||
if (m_face_names.texture_id == 0)
|
||||
init_font_name_texture();
|
||||
|
@ -197,8 +197,7 @@ private:
|
||||
|
||||
// maximal size of face name image
|
||||
Vec2i face_name_size = Vec2i(100, 0);
|
||||
float face_name_max_width = 100.f;
|
||||
float face_name_texture_offset_x = 105.f;
|
||||
float face_name_texture_offset_x = 0.f;
|
||||
|
||||
// maximal texture generate jobs running at once
|
||||
unsigned int max_count_opened_font_files = 10;
|
||||
|
@ -173,8 +173,7 @@ void GLGizmosManager::reset_all_states()
|
||||
const EType current = get_current_type();
|
||||
if (current != Undefined)
|
||||
// close any open gizmo
|
||||
if (!open_gizmo(current))
|
||||
return;
|
||||
open_gizmo(current);
|
||||
|
||||
activate_gizmo(Undefined);
|
||||
m_hover = Undefined;
|
||||
|
@ -166,14 +166,7 @@ static void update_arrangepoly_slaprint(arrangement::ArrangePolygon &ret,
|
||||
auto omesh = po.get_mesh_to_print();
|
||||
auto &smesh = po.support_mesh();
|
||||
|
||||
Vec3d rotation = inst.get_rotation();
|
||||
rotation.z() = 0.;
|
||||
Transform3f trafo_instance =
|
||||
Geometry::assemble_transform(inst.get_offset().z() * Vec3d::UnitZ(),
|
||||
rotation,
|
||||
inst.get_scaling_factor(),
|
||||
inst.get_mirror()).cast<float>();
|
||||
|
||||
Transform3f trafo_instance = inst.get_matrix().cast<float>();
|
||||
trafo_instance = trafo_instance * po.trafo().cast<float>().inverse();
|
||||
|
||||
Polygons polys;
|
||||
@ -182,8 +175,6 @@ static void update_arrangepoly_slaprint(arrangement::ArrangePolygon &ret,
|
||||
|
||||
if (omesh) {
|
||||
polys.emplace_back(its_convex_hull_2d_above(*omesh, trafo_instance, zlvl));
|
||||
ret.poly.contour = polys.back();
|
||||
ret.poly.holes = {};
|
||||
}
|
||||
|
||||
polys.emplace_back(its_convex_hull_2d_above(smesh.its, trafo_instance, zlvl));
|
||||
@ -236,7 +227,8 @@ coord_t get_skirt_offset(const Plater* plater) {
|
||||
|
||||
void ArrangeJob::prepare()
|
||||
{
|
||||
m_selection_only ? prepare_selected() : prepare_all();
|
||||
m_selection_only ? prepare_selected() :
|
||||
prepare_all();
|
||||
|
||||
coord_t min_offset = 0;
|
||||
for (auto &ap : m_selected) {
|
||||
@ -443,7 +435,6 @@ void assign_logical_beds(std::vector<arrangement::ArrangePolygon> &items,
|
||||
const arrangement::ArrangeBed &bed,
|
||||
double stride)
|
||||
{
|
||||
|
||||
// The strides have to be removed from the fixed items. For the
|
||||
// arrangeable (selected) items bed_idx is ignored and the
|
||||
// translation is irrelevant.
|
||||
|
@ -2108,9 +2108,9 @@ void NotificationManager::push_slicing_error_notification(const std::string& tex
|
||||
push_notification_data({ NotificationType::SlicingError, NotificationLevel::ErrorNotificationLevel, 0, _u8L("ERROR:") + "\n" + text }, 0);
|
||||
set_slicing_progress_hidden();
|
||||
}
|
||||
void NotificationManager::push_slicing_warning_notification(const std::string& text, bool gray, ObjectID oid, int warning_step)
|
||||
void NotificationManager::push_slicing_warning_notification(const std::string& text, bool gray, ObjectID oid, int warning_step, const std::string& hypertext, std::function<bool(wxEvtHandler*)> callback)
|
||||
{
|
||||
NotificationData data { NotificationType::SlicingWarning, NotificationLevel::WarningNotificationLevel, 0, _u8L("WARNING:") + "\n" + text };
|
||||
NotificationData data { NotificationType::SlicingWarning, NotificationLevel::WarningNotificationLevel, 0, _u8L("WARNING:") + "\n" + text , hypertext, callback};
|
||||
|
||||
auto notification = std::make_unique<NotificationManager::ObjectIDNotification>(data, m_id_provider, m_evt_handler);
|
||||
notification->object_id = oid;
|
||||
|
@ -172,7 +172,7 @@ public:
|
||||
// Creates Slicing Error notification with a custom text and no fade out.
|
||||
void push_slicing_error_notification(const std::string& text);
|
||||
// Creates Slicing Warning notification with a custom text and no fade out.
|
||||
void push_slicing_warning_notification(const std::string& text, bool gray, ObjectID oid, int warning_step);
|
||||
void push_slicing_warning_notification(const std::string& text, bool gray, ObjectID oid, int warning_step, const std::string& hypertext = "", std::function<bool(wxEvtHandler*)> callback = std::function<bool(wxEvtHandler*)>());
|
||||
// marks slicing errors as gray
|
||||
void set_all_slicing_errors_gray(bool g);
|
||||
// marks slicing warings as gray
|
||||
|
@ -4082,11 +4082,42 @@ void Plater::priv::on_slicing_update(SlicingStatusEvent &evt)
|
||||
// Avoid a race condition
|
||||
return;
|
||||
}
|
||||
|
||||
// this->statusbar()->set_progress(evt.status.percent);
|
||||
// this->statusbar()->set_status_text(_(evt.status.text) + wxString::FromUTF8("…"));
|
||||
notification_manager->set_slicing_progress_percentage(evt.status.text, (float)evt.status.percent / 100.0f);
|
||||
}
|
||||
|
||||
// Check template filaments and add warning
|
||||
// This is more convinient to do here than in slicing backend, so it happens on "Slicing complete".
|
||||
if (evt.status.percent >= 100 && this->printer_technology == ptFFF) {
|
||||
size_t templ_cnt = 0;
|
||||
const auto& preset_bundle = wxGetApp().preset_bundle;
|
||||
std::string names;
|
||||
for (const auto& extruder_filaments : preset_bundle->extruders_filaments) {
|
||||
const Preset* preset = extruder_filaments.get_selected_preset();
|
||||
if (preset && preset->vendor && preset->vendor->templates_profile) {
|
||||
names += "\n" + preset->name;
|
||||
templ_cnt++;
|
||||
}
|
||||
}
|
||||
if (templ_cnt > 0) {
|
||||
const std::string message_notif = GUI::format("%1%\n%2%\n%3%\n\n%4% "
|
||||
, _L_PLURAL("You are using template filament preset.", "You are using template filament presets.", templ_cnt)
|
||||
, _u8L("Please note that template presets are not customized for specific printer and should only be used as a starting point for creating your own user presets.")
|
||||
, names
|
||||
,_u8L("More info at"));
|
||||
// warning dialog proccessing cuts text at first '/n' - pass the text without new lines (and without filament names).
|
||||
const std::string message_dial = GUI::format("%1% %2% %3%"
|
||||
, _L_PLURAL("You are using template filament preset.", "You are using template filament presets.", templ_cnt)
|
||||
, _u8L("Please note that template presets are not customized for specific printer and should only be used as a starting point for creating your own user presets.")
|
||||
, "<a href=https://help.prusa3d.com/article/template-filaments_467599>https://help.prusa3d.com/</a>"
|
||||
);
|
||||
BOOST_LOG_TRIVIAL(warning) << message_notif;
|
||||
notification_manager->push_slicing_warning_notification(message_notif, false, 0, 0, "https://help.prusa3d.com/",
|
||||
[](wxEvtHandler* evnthndlr) { wxGetApp().open_browser_with_warning_dialog("https://help.prusa3d.com/article/template-filaments_467599"); return false; }
|
||||
);
|
||||
add_warning({ PrintStateBase::WarningLevel::CRITICAL, true, message_dial, 0}, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (evt.status.flags & (PrintBase::SlicingStatus::RELOAD_SCENE | PrintBase::SlicingStatus::RELOAD_SLA_SUPPORT_POINTS)) {
|
||||
switch (this->printer_technology) {
|
||||
case ptFFF:
|
||||
@ -4222,9 +4253,9 @@ bool Plater::priv::warnings_dialog()
|
||||
else
|
||||
text += it.first.message;
|
||||
}
|
||||
//text += "\n\nDo you still wish to export?";
|
||||
//wxMessageDialog msg_wingow(this->q, from_u8(text), wxString(SLIC3R_APP_NAME " ") + _L("generated warnings"), wxOK);
|
||||
MessageDialog msg_wingow(this->q, from_u8(text), wxString(SLIC3R_APP_NAME " ") + _L("generated warnings"), wxOK);
|
||||
//MessageDialog msg_wingow(this->q, from_u8(text), wxString(SLIC3R_APP_NAME " ") + _L("generated warnings"), wxOK);
|
||||
// Changed ti InfoDialog so it can show hyperlinks
|
||||
InfoDialog msg_wingow(this->q, wxString(SLIC3R_APP_NAME " ") + _L("generated warnings"), from_u8(text), wxOK);
|
||||
const auto res = msg_wingow.ShowModal();
|
||||
return res == wxID_OK;
|
||||
|
||||
@ -6647,7 +6678,7 @@ bool Plater::export_3mf(const boost::filesystem::path& output_path)
|
||||
else {
|
||||
// Failure
|
||||
// p->statusbar()->set_status_text(format_wxstr(_L("Error exporting 3MF file %s"), path));
|
||||
const wxString what = GUI::format_wxstr(_L("%1%: %2%"),_L("Unable to save file") , path_u8);
|
||||
const wxString what = GUI::format_wxstr("%1%: %2%", _L("Unable to save file") , path_u8);
|
||||
show_error(this, what);
|
||||
}
|
||||
return ret;
|
||||
|
@ -644,13 +644,7 @@ 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
|
||||
#ifdef __linux__
|
||||
// To edit extruder color from the sidebar
|
||||
|| m_type == Preset::TYPE_FILAMENT
|
||||
#endif //__linux__
|
||||
)
|
||||
if (m_type == Preset::TYPE_PRINTER || m_type == Preset::TYPE_FILAMENT)
|
||||
show_edit_menu();
|
||||
else
|
||||
switch_to_tab();
|
||||
@ -784,15 +778,18 @@ 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) {
|
||||
#ifdef __linux__
|
||||
// To edit extruder color from the sidebar
|
||||
append_menu_item(menu, wxID_ANY, _L("Change extruder color"), "",
|
||||
[this](wxCommandEvent&) { this->change_extruder_color(); }, "funnel", menu, []() { return true; }, wxGetApp().plater());
|
||||
#endif //__linux__
|
||||
append_menu_item(menu, wxID_ANY, _L("Show/Hide template presets"), "",
|
||||
[this](wxCommandEvent&) { wxGetApp().open_preferences("no_templates", "General"); }, "spool", 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"), "",
|
||||
|
@ -465,10 +465,19 @@ void Tab::OnActivate()
|
||||
if (m_presets_choice->IsShown())
|
||||
Refresh(); // Just refresh page, if m_presets_choice is already shown
|
||||
else {
|
||||
// on first OnActivate call show top sizer
|
||||
// From the tab creation whole top sizer is hidden to correct update of preset combobox's size
|
||||
// (see https://github.com/prusa3d/PrusaSlicer/issues/10746)
|
||||
|
||||
// On first OnActivate call show top sizer
|
||||
m_top_hsizer->ShowItems(true);
|
||||
// Size and layouts of all items are correct now,
|
||||
// but ALL items of top sizer are visible.
|
||||
// So, update visibility of each item according to the ui settings
|
||||
update_btns_enabling();
|
||||
m_btn_hide_incompatible_presets->Show(m_show_btn_incompatible_presets && m_type != Slic3r::Preset::TYPE_PRINTER);
|
||||
if (TabFilament* tab = dynamic_cast<TabFilament*>(this))
|
||||
tab->update_extruder_combobox();
|
||||
|
||||
Layout();
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
set(SLIC3R_APP_NAME "PrusaSlicer")
|
||||
set(SLIC3R_APP_KEY "PrusaSlicer")
|
||||
set(SLIC3R_VERSION "2.6.0-rc1")
|
||||
set(SLIC3R_VERSION "2.6.0-rc2")
|
||||
set(SLIC3R_BUILD_ID "PrusaSlicer-${SLIC3R_VERSION}+UNKNOWN")
|
||||
set(SLIC3R_RC_VERSION "2,6,0,0")
|
||||
set(SLIC3R_RC_VERSION_DOTS "2.6.0.0")
|
||||
|
Loading…
x
Reference in New Issue
Block a user