mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-24 09:11:23 -06:00
Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer
This commit is contained in:
commit
6c8b0276e6
27 changed files with 5508 additions and 3737 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include "GUI.hpp"
|
||||
#include "GUI_App.hpp"
|
||||
#include "MainFrame.hpp"
|
||||
#include "format.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
|
@ -150,9 +151,8 @@ wxString CopyrightsDialog::get_html_text()
|
|||
, entry.link, entry.lib_name);
|
||||
|
||||
if (!entry.copyright.empty())
|
||||
text += wxString::Format(
|
||||
"%s %s"
|
||||
"<br/><br/>"
|
||||
text += format_wxstr(
|
||||
"%1% %2%<br/><br/>"
|
||||
, copyright_str, entry.copyright);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2457,7 +2457,7 @@ void ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *prese
|
|||
page_temps->apply_custom_config(*custom_config);
|
||||
|
||||
const std::string profile_name = page_custom->profile_name();
|
||||
preset_bundle->load_config(profile_name, *custom_config);
|
||||
preset_bundle->load_config_from_wizard(profile_name, *custom_config);
|
||||
}
|
||||
|
||||
// Update the selections from the compatibilty.
|
||||
|
|
|
|||
|
|
@ -1217,9 +1217,11 @@ wxString Control::get_tooltip(int tick/*=-1*/)
|
|||
return _L("Jump to move") + " (Shift + G)";
|
||||
else
|
||||
return m_mode == MultiAsSingle ?
|
||||
GUI::from_u8((boost::format(_u8L("Jump to height %s Set ruler mode\n or "
|
||||
"Set extruder sequence for the entire print")) % " (Shift + G)\n").str()) :
|
||||
GUI::from_u8((boost::format(_u8L("Jump to height %s or Set ruler mode")) % " (Shift + G)\n").str());
|
||||
GUI::from_u8((boost::format(_u8L("Jump to height %s\n"
|
||||
"Set ruler mode\n"
|
||||
"or Set extruder sequence for the entire print")) % "(Shift + G)").str()) :
|
||||
GUI::from_u8((boost::format(_u8L("Jump to height %s\n"
|
||||
"or Set ruler mode")) % "(Shift + G)").str());
|
||||
}
|
||||
if (m_focus == fiColorBand)
|
||||
return m_mode != SingleExtruder ? "" :
|
||||
|
|
@ -1844,7 +1846,7 @@ void Control::show_cog_icon_context_menu()
|
|||
|
||||
wxMenu* ruler_mode_menu = new wxMenu();
|
||||
if (ruler_mode_menu) {
|
||||
append_menu_check_item(ruler_mode_menu, wxID_ANY, _L("None"), _L("Supprese show the ruler"),
|
||||
append_menu_check_item(ruler_mode_menu, wxID_ANY, _L("None"), _L("Hide ruler"),
|
||||
[this](wxCommandEvent&) { if (m_extra_style != 0) m_extra_style = 0; }, ruler_mode_menu,
|
||||
[]() { return true; }, [this]() { return m_extra_style == 0; }, GUI::wxGetApp().plater());
|
||||
|
||||
|
|
|
|||
|
|
@ -3996,7 +3996,7 @@ bool GLCanvas3D::_render_arrange_menu(float pos_x)
|
|||
|
||||
imgui->text(_L("Use CTRL+left mouse key to enter text edit mode:"));
|
||||
|
||||
if (imgui->slider_float(_L("Clearance size"), &settings.distance, dist_min, 100.0f, "%5.2f") || dist_min > settings.distance) {
|
||||
if (imgui->slider_float(_L("Spacing"), &settings.distance, dist_min, 100.0f, "%5.2f") || dist_min > settings.distance) {
|
||||
settings.distance = std::max(dist_min, settings.distance);
|
||||
settings_out.distance = settings.distance;
|
||||
appcfg->set("arrange", dist_key.c_str(), std::to_string(settings_out.distance));
|
||||
|
|
|
|||
|
|
@ -2189,8 +2189,8 @@ void ObjectList::load_generic_subobject(const std::string& type_name, const Mode
|
|||
wxGetApp().plater()->canvas3D()->update_instance_printable_state_for_object((size_t)obj_idx);
|
||||
|
||||
const auto object_item = m_objects_model->GetTopParent(GetSelection());
|
||||
select_item(m_objects_model->AddVolumeChild(object_item, name, type,
|
||||
new_volume->get_mesh_errors_count()>0));
|
||||
select_item([this, object_item, name, type, new_volume]() { return m_objects_model->AddVolumeChild(object_item, name, type,
|
||||
new_volume->get_mesh_errors_count() > 0); });
|
||||
//#ifndef __WXOSX__ //#ifdef __WXMSW__ // #ys_FIXME
|
||||
selection_changed();
|
||||
//#endif //no __WXOSX__ //__WXMSW__
|
||||
|
|
@ -2292,19 +2292,7 @@ void ObjectList::del_subobject_item(wxDataViewItem& item)
|
|||
if (type & itVolume && (*m_objects)[obj_idx]->get_mesh_errors_count() == 0)
|
||||
m_objects_model->DeleteWarningIcon(m_objects_model->GetParent(item));
|
||||
|
||||
// If last two Instances of object is selected, show the message about impossible action
|
||||
bool show_msg = false;
|
||||
if (type & itInstance) {
|
||||
wxDataViewItemArray instances;
|
||||
m_objects_model->GetChildren(m_objects_model->GetParent(item), instances);
|
||||
if (instances.Count() == 2 && IsSelected(instances[0]) && IsSelected(instances[1]))
|
||||
show_msg = true;
|
||||
}
|
||||
|
||||
m_objects_model->Delete(item);
|
||||
|
||||
if (show_msg)
|
||||
Slic3r::GUI::show_error(nullptr, _(L("Last instance of an object cannot be deleted.")));
|
||||
}
|
||||
|
||||
void ObjectList::del_settings_from_config(const wxDataViewItem& parent_item)
|
||||
|
|
@ -3055,24 +3043,24 @@ void ObjectList::delete_object_from_list()
|
|||
if (!item)
|
||||
return;
|
||||
if (m_objects_model->GetParent(item) == wxDataViewItem(nullptr))
|
||||
select_item(m_objects_model->Delete(item));
|
||||
select_item([this, item]() { return m_objects_model->Delete(item); });
|
||||
else
|
||||
select_item(m_objects_model->Delete(m_objects_model->GetParent(item)));
|
||||
select_item([this, item]() { return m_objects_model->Delete(m_objects_model->GetParent(item)); });
|
||||
}
|
||||
|
||||
void ObjectList::delete_object_from_list(const size_t obj_idx)
|
||||
{
|
||||
select_item(m_objects_model->Delete(m_objects_model->GetItemById(obj_idx)));
|
||||
select_item([this, obj_idx]() { return m_objects_model->Delete(m_objects_model->GetItemById(obj_idx)); });
|
||||
}
|
||||
|
||||
void ObjectList::delete_volume_from_list(const size_t obj_idx, const size_t vol_idx)
|
||||
{
|
||||
select_item(m_objects_model->Delete(m_objects_model->GetItemByVolumeId(obj_idx, vol_idx)));
|
||||
select_item([this, obj_idx, vol_idx]() { return m_objects_model->Delete(m_objects_model->GetItemByVolumeId(obj_idx, vol_idx)); });
|
||||
}
|
||||
|
||||
void ObjectList::delete_instance_from_list(const size_t obj_idx, const size_t inst_idx)
|
||||
{
|
||||
select_item(m_objects_model->Delete(m_objects_model->GetItemByInstanceId(obj_idx, inst_idx)));
|
||||
select_item([this, obj_idx, inst_idx]() { return m_objects_model->Delete(m_objects_model->GetItemByInstanceId(obj_idx, inst_idx)); });
|
||||
}
|
||||
|
||||
void ObjectList::delete_from_model_and_list(const ItemType type, const int obj_idx, const int sub_obj_idx)
|
||||
|
|
@ -3099,6 +3087,7 @@ void ObjectList::delete_from_model_and_list(const std::vector<ItemForDelete>& it
|
|||
if (items_for_delete.empty())
|
||||
return;
|
||||
|
||||
m_prevent_list_events = true;
|
||||
for (std::vector<ItemForDelete>::const_reverse_iterator item = items_for_delete.rbegin(); item != items_for_delete.rend(); ++item)
|
||||
{
|
||||
if (!(item->type&(itObject | itVolume | itInstance)))
|
||||
|
|
@ -3125,6 +3114,7 @@ void ObjectList::delete_from_model_and_list(const std::vector<ItemForDelete>& it
|
|||
m_objects_model->Delete(m_objects_model->GetItemByInstanceId(item->obj_idx, item->sub_obj_idx));
|
||||
}
|
||||
}
|
||||
m_prevent_list_events = true;
|
||||
part_selection_changed();
|
||||
}
|
||||
|
||||
|
|
@ -3139,13 +3129,13 @@ void ObjectList::delete_all_objects_from_list()
|
|||
|
||||
void ObjectList::increase_object_instances(const size_t obj_idx, const size_t num)
|
||||
{
|
||||
select_item(m_objects_model->AddInstanceChild(m_objects_model->GetItemById(obj_idx), num));
|
||||
select_item([this, obj_idx, num]() { return m_objects_model->AddInstanceChild(m_objects_model->GetItemById(obj_idx), num); });
|
||||
selection_changed();
|
||||
}
|
||||
|
||||
void ObjectList::decrease_object_instances(const size_t obj_idx, const size_t num)
|
||||
{
|
||||
select_item(m_objects_model->DeleteLastInstance(m_objects_model->GetItemById(obj_idx), num));
|
||||
select_item([this, obj_idx, num]() { return m_objects_model->DeleteLastInstance(m_objects_model->GetItemById(obj_idx), num); });
|
||||
}
|
||||
|
||||
void ObjectList::unselect_objects()
|
||||
|
|
@ -3183,6 +3173,50 @@ void ObjectList::select_current_volume(int idx, int vol_idx)
|
|||
m_prevent_list_events = false;
|
||||
}
|
||||
|
||||
static void update_selection(wxDataViewItemArray& sels, ObjectList::SELECTION_MODE mode, ObjectDataViewModel* model)
|
||||
{
|
||||
if (mode == ObjectList::smInstance)
|
||||
{
|
||||
for (auto& item : sels)
|
||||
{
|
||||
ItemType type = model->GetItemType(item);
|
||||
if (type == itObject)
|
||||
continue;
|
||||
if (type == itInstanceRoot) {
|
||||
wxDataViewItem obj_item = model->GetParent(item);
|
||||
sels.Remove(item);
|
||||
sels.Add(obj_item);
|
||||
update_selection(sels, mode, model);
|
||||
return;
|
||||
}
|
||||
if (type == itInstance)
|
||||
{
|
||||
wxDataViewItemArray instances;
|
||||
model->GetChildren(model->GetParent(item), instances);
|
||||
assert(instances.Count() > 0);
|
||||
size_t selected_instances_cnt = 0;
|
||||
for (auto& inst : instances) {
|
||||
if (sels.Index(inst) == wxNOT_FOUND)
|
||||
break;
|
||||
selected_instances_cnt++;
|
||||
}
|
||||
|
||||
if (selected_instances_cnt == instances.Count())
|
||||
{
|
||||
wxDataViewItem obj_item = model->GetTopParent(item);
|
||||
for (auto& inst : instances)
|
||||
sels.Remove(inst);
|
||||
sels.Add(obj_item);
|
||||
update_selection(sels, mode, model);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ObjectList::remove()
|
||||
{
|
||||
if (GetSelectedItemsCount() == 0)
|
||||
|
|
@ -3218,6 +3252,10 @@ void ObjectList::remove()
|
|||
parent = delete_item(GetSelection());
|
||||
else
|
||||
{
|
||||
SELECTION_MODE sels_mode = m_selection_mode;
|
||||
UnselectAll();
|
||||
update_selection(sels, sels_mode, m_objects_model);
|
||||
|
||||
Plater::TakeSnapshot snapshot = Plater::TakeSnapshot(wxGetApp().plater(), _(L("Delete Selected")));
|
||||
|
||||
for (auto& item : sels)
|
||||
|
|
@ -3780,6 +3818,23 @@ void ObjectList::select_item(const wxDataViewItem& item)
|
|||
m_prevent_list_events = false;
|
||||
}
|
||||
|
||||
void ObjectList::select_item(std::function<wxDataViewItem()> get_item)
|
||||
{
|
||||
if (!get_item)
|
||||
return;
|
||||
|
||||
m_prevent_list_events = true;
|
||||
|
||||
wxDataViewItem item = get_item();
|
||||
if (item.IsOk()) {
|
||||
UnselectAll();
|
||||
Select(item);
|
||||
part_selection_changed();
|
||||
}
|
||||
|
||||
m_prevent_list_events = false;
|
||||
}
|
||||
|
||||
void ObjectList::select_items(const wxDataViewItemArray& sels)
|
||||
{
|
||||
m_prevent_list_events = true;
|
||||
|
|
@ -4060,7 +4115,7 @@ void ObjectList::update_and_show_object_settings_item()
|
|||
if (!item) return;
|
||||
|
||||
const wxDataViewItem& obj_item = m_objects_model->IsSettingsItem(item) ? m_objects_model->GetParent(item) : item;
|
||||
select_item(add_settings_item(obj_item, &get_item_config(obj_item).get()));
|
||||
select_item([this, obj_item](){ return add_settings_item(obj_item, &get_item_config(obj_item).get()); });
|
||||
}
|
||||
|
||||
// Update settings item for item had it
|
||||
|
|
|
|||
|
|
@ -385,6 +385,7 @@ public:
|
|||
void update_selections();
|
||||
void update_selections_on_canvas();
|
||||
void select_item(const wxDataViewItem& item);
|
||||
void select_item(std::function<wxDataViewItem()> get_item);
|
||||
void select_items(const wxDataViewItemArray& sels);
|
||||
void select_all();
|
||||
void select_item_all_children();
|
||||
|
|
|
|||
|
|
@ -172,7 +172,9 @@ Preview::Preview(
|
|||
: m_config(config)
|
||||
, m_process(process)
|
||||
, m_gcode_result(gcode_result)
|
||||
#if !ENABLE_PREVIEW_TYPE_CHANGE
|
||||
, m_preferred_color_mode("feature")
|
||||
#endif // !ENABLE_PREVIEW_TYPE_CHANGE
|
||||
, m_schedule_background_process(schedule_background_process_func)
|
||||
{
|
||||
if (init(parent, model))
|
||||
|
|
@ -318,6 +320,7 @@ void Preview::set_as_dirty()
|
|||
m_canvas->set_as_dirty();
|
||||
}
|
||||
|
||||
#if !ENABLE_PREVIEW_TYPE_CHANGE
|
||||
void Preview::set_number_extruders(unsigned int number_extruders)
|
||||
{
|
||||
if (m_number_extruders != number_extruders) {
|
||||
|
|
@ -331,6 +334,7 @@ void Preview::set_number_extruders(unsigned int number_extruders)
|
|||
m_preferred_color_mode = (type == tool_idx) ? "tool_or_feature" : "feature";
|
||||
}
|
||||
}
|
||||
#endif // !ENABLE_PREVIEW_TYPE_CHANGE
|
||||
|
||||
void Preview::bed_shape_changed()
|
||||
{
|
||||
|
|
@ -465,10 +469,19 @@ void Preview::on_size(wxSizeEvent& evt)
|
|||
|
||||
void Preview::on_choice_view_type(wxCommandEvent& evt)
|
||||
{
|
||||
#if !ENABLE_PREVIEW_TYPE_CHANGE
|
||||
m_preferred_color_mode = (m_choice_view_type->GetStringSelection() == L("Tool")) ? "tool" : "feature";
|
||||
#endif // !ENABLE_PREVIEW_TYPE_CHANGE
|
||||
int selection = m_choice_view_type->GetCurrentSelection();
|
||||
#if ENABLE_PREVIEW_TYPE_CHANGE
|
||||
if (0 <= selection && selection < static_cast<int>(GCodeViewer::EViewType::Count)) {
|
||||
m_canvas->set_toolpath_view_type(static_cast<GCodeViewer::EViewType>(selection));
|
||||
m_keep_current_preview_type = true;
|
||||
}
|
||||
#else
|
||||
if (0 <= selection && selection < static_cast<int>(GCodeViewer::EViewType::Count))
|
||||
m_canvas->set_toolpath_view_type(static_cast<GCodeViewer::EViewType>(selection));
|
||||
#endif // ENABLE_PREVIEW_TYPE_CHANGE
|
||||
|
||||
refresh_print();
|
||||
}
|
||||
|
|
@ -505,6 +518,7 @@ void Preview::on_combochecklist_options(wxCommandEvent& evt)
|
|||
m_canvas->set_as_dirty();
|
||||
}
|
||||
|
||||
#if !ENABLE_PREVIEW_TYPE_CHANGE
|
||||
void Preview::update_view_type(bool keep_volumes)
|
||||
{
|
||||
const DynamicPrintConfig& config = wxGetApp().preset_bundle->project_config;
|
||||
|
|
@ -526,6 +540,7 @@ void Preview::update_view_type(bool keep_volumes)
|
|||
|
||||
reload_print(keep_volumes);
|
||||
}
|
||||
#endif // !ENABLE_PREVIEW_TYPE_CHANGE
|
||||
|
||||
void Preview::update_bottom_toolbar()
|
||||
{
|
||||
|
|
@ -582,7 +597,12 @@ wxBoxSizer* Preview::create_layers_slider_sizer()
|
|||
model.custom_gcode_per_print_z = m_layers_slider->GetTicksValues();
|
||||
m_schedule_background_process();
|
||||
|
||||
#if ENABLE_PREVIEW_TYPE_CHANGE
|
||||
m_keep_current_preview_type = false;
|
||||
reload_print(false);
|
||||
#else
|
||||
update_view_type(false);
|
||||
#endif // ENABLE_PREVIEW_TYPE_CHANGE
|
||||
});
|
||||
|
||||
return sizer;
|
||||
|
|
@ -848,6 +868,7 @@ void Preview::load_print_as_fff(bool keep_z_range)
|
|||
return;
|
||||
}
|
||||
|
||||
#if !ENABLE_PREVIEW_TYPE_CHANGE
|
||||
if (m_preferred_color_mode == "tool_or_feature") {
|
||||
// It is left to Slic3r to decide whether the print shall be colored by the tool or by the feature.
|
||||
// Color by feature if it is a single extruder print.
|
||||
|
|
@ -860,6 +881,7 @@ void Preview::load_print_as_fff(bool keep_z_range)
|
|||
// If the->SetSelection changed the following line, revert it to "decide yourself".
|
||||
m_preferred_color_mode = "tool_or_feature";
|
||||
}
|
||||
#endif // !ENABLE_PREVIEW_TYPE_CHANGE
|
||||
|
||||
GCodeViewer::EViewType gcode_view_type = m_canvas->get_gcode_view_preview_type();
|
||||
bool gcode_preview_data_valid = !m_gcode_result->moves.empty();
|
||||
|
|
@ -908,6 +930,24 @@ void Preview::load_print_as_fff(bool keep_z_range)
|
|||
} else
|
||||
update_layers_slider(zs, keep_z_range);
|
||||
}
|
||||
|
||||
#if ENABLE_PREVIEW_TYPE_CHANGE
|
||||
unsigned int number_extruders = (unsigned int)print->extruders().size();
|
||||
|
||||
if (!m_keep_current_preview_type) {
|
||||
const wxString choice = !wxGetApp().plater()->model().custom_gcode_per_print_z.gcodes.empty() ?
|
||||
_L("Color Print") :
|
||||
(number_extruders > 1) ? _L("Tool") : _L("Feature type");
|
||||
|
||||
int type = m_choice_view_type->FindString(choice);
|
||||
if (m_choice_view_type->GetSelection() != type) {
|
||||
if (0 <= type && type < static_cast<int>(GCodeViewer::EViewType::Count)) {
|
||||
m_choice_view_type->SetSelection(type);
|
||||
m_canvas->set_gcode_view_preview_type(static_cast<GCodeViewer::EViewType>(type));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // ENABLE_PREVIEW_TYPE_CHANGE
|
||||
}
|
||||
|
||||
void Preview::load_print_as_sla()
|
||||
|
|
|
|||
|
|
@ -102,7 +102,11 @@ class Preview : public wxPanel
|
|||
std::function<void()> m_schedule_background_process;
|
||||
|
||||
unsigned int m_number_extruders { 1 };
|
||||
#if ENABLE_PREVIEW_TYPE_CHANGE
|
||||
bool m_keep_current_preview_type{ false };
|
||||
#else
|
||||
std::string m_preferred_color_mode;
|
||||
#endif // ENABLE_PREVIEW_TYPE_CHANGE
|
||||
|
||||
bool m_loaded { false };
|
||||
|
||||
|
|
@ -136,7 +140,9 @@ public:
|
|||
|
||||
void set_as_dirty();
|
||||
|
||||
#if !ENABLE_PREVIEW_TYPE_CHANGE
|
||||
void set_number_extruders(unsigned int number_extruders);
|
||||
#endif // !ENABLE_PREVIEW_TYPE_CHANGE
|
||||
void bed_shape_changed();
|
||||
void select_view(const std::string& direction);
|
||||
void set_drop_target(wxDropTarget* target);
|
||||
|
|
@ -150,7 +156,9 @@ public:
|
|||
void move_layers_slider(wxKeyEvent& evt);
|
||||
void edit_layers_slider(wxKeyEvent& evt);
|
||||
|
||||
#if !ENABLE_PREVIEW_TYPE_CHANGE
|
||||
void update_view_type(bool keep_volumes);
|
||||
#endif // !ENABLE_PREVIEW_TYPE_CHANGE
|
||||
|
||||
bool is_loaded() const { return m_loaded; }
|
||||
|
||||
|
|
|
|||
|
|
@ -204,15 +204,15 @@ void KBShortcutsDialog::fill_shortcuts()
|
|||
|
||||
Shortcuts preview_shortcuts = {
|
||||
#if ENABLE_ARROW_KEYS_WITH_SLIDERS
|
||||
{ L("Arrow Up"), L("Move vertical slider current thumb Up") },
|
||||
{ L("Arrow Down"), L("Move vertical slider current thumb Down") },
|
||||
{ L("Arrow Left"), L("Move horizontal slider current thumb Left") },
|
||||
{ L("Arrow Right"), L("Move horizontal slider current thumb Right") },
|
||||
{ "W", L("Move vertical slider current thumb Up") },
|
||||
{ "S", L("Move vertical slider current thumb Down") },
|
||||
{ "A", L("Move horizontal slider current thumb Left") },
|
||||
{ "D", L("Move horizontal slider current thumb Right") },
|
||||
{ "X", L("Toggle vertical slider one layer mode ON/OFF") },
|
||||
{ L("Arrow Up"), L("Vertical slider - Move active thumb Up") },
|
||||
{ L("Arrow Down"), L("Vertical slider - Move active thumb Down") },
|
||||
{ L("Arrow Left"), L("Horizontal slider - Move active thumb Left") },
|
||||
{ L("Arrow Right"), L("Horizontal slider - Move active thumb Right") },
|
||||
{ "W", L("Vertical slider - Move active thumb Up") },
|
||||
{ "S", L("Vertical slider - Move active thumb Down") },
|
||||
{ "A", L("Horizontal slider - Move active thumb Left") },
|
||||
{ "D", L("Horizontal slider - Move active thumb Right") },
|
||||
{ "X", L("On/Off one layer mode of the vertical slider") },
|
||||
{ "L", L("Show/Hide Legend and Estimated printing time") },
|
||||
#else
|
||||
{ L("Arrow Up"), L("Upper layer") },
|
||||
|
|
@ -227,16 +227,16 @@ void KBShortcutsDialog::fill_shortcuts()
|
|||
|
||||
Shortcuts layers_slider_shortcuts = {
|
||||
#if ENABLE_ARROW_KEYS_WITH_SLIDERS
|
||||
{ L("Arrow Up"), L("Vertical slider - Move current thumb Up") },
|
||||
{ L("Arrow Down"), L("Vertical slider - Move current thumb Down") },
|
||||
{ L("Arrow Left"), L("Vertical slider - Set upper thumb to current thumb") },
|
||||
{ L("Arrow Right"), L("Vertical slider - Set lower thumb to current thumb") },
|
||||
{ L("Arrow Up"), L("Vertical slider - Move active thumb Up") },
|
||||
{ L("Arrow Down"), L("Vertical slider - Move active thumb Down") },
|
||||
{ L("Arrow Left"), L("Vertical slider - Set upper thumb as active") },
|
||||
{ L("Arrow Right"), L("Vertical slider - Set lower thumb as active") },
|
||||
{ "+", L("Vertical slider - Add color change marker for current layer") },
|
||||
{ "-", L("Vertical slider - Delete color change marker for current layer") },
|
||||
{ L("Arrow Up"), L("Horizontal slider - Set left thumb to current thumb") },
|
||||
{ L("Arrow Down"), L("Horizontal slider - Set right thumb to current thumb") },
|
||||
{ L("Arrow Left"), L("Horizontal slider - Move current thumb Left") },
|
||||
{ L("Arrow Right"), L("Horizontal slider - Move current thumb Right") },
|
||||
{ L("Arrow Up"), L("Horizontal slider - Set left thumb as active") },
|
||||
{ L("Arrow Down"), L("Horizontal slider - Set right thumb as active") },
|
||||
{ L("Arrow Left"), L("Horizontal slider - Move active thumb Left") },
|
||||
{ L("Arrow Right"), L("Horizontal slider - Move active thumb Right") },
|
||||
#else
|
||||
{ L("Arrow Up"), L("Move current slider thumb Up") },
|
||||
{ L("Arrow Down"), L("Move current slider thumb Down") },
|
||||
|
|
@ -252,8 +252,8 @@ void KBShortcutsDialog::fill_shortcuts()
|
|||
m_full_shortcuts.push_back(std::make_pair(_L("Layers Slider"), layers_slider_shortcuts));
|
||||
|
||||
Shortcuts sequential_slider_shortcuts = {
|
||||
{ L("Arrow Left"), L("Move current slider thumb Left") },
|
||||
{ L("Arrow Right"), L("Move current slider thumb Right") },
|
||||
{ L("Arrow Left"), L("Move active slider thumb Left") },
|
||||
{ L("Arrow Right"), L("Move active slider thumb Right") },
|
||||
{ "Shift+", L("Press to speed up 5 times while moving thumb\nwith arrow keys or mouse wheel") },
|
||||
{ ctrl, L("Press to speed up 5 times while moving thumb\nwith arrow keys or mouse wheel") },
|
||||
};
|
||||
|
|
|
|||
|
|
@ -623,7 +623,7 @@ void PhysicalPrinterDialog::DeletePreset(PresetForPrinter* preset_for_printer)
|
|||
{
|
||||
if (m_presets.size() == 1) {
|
||||
wxString msg_text = _L("It's not possible to delete the last related preset for the printer.");
|
||||
wxMessageDialog dialog(nullptr, msg_text, _L("Infornation"), wxICON_INFORMATION | wxOK);
|
||||
wxMessageDialog dialog(nullptr, msg_text, _L("Information"), wxICON_INFORMATION | wxOK);
|
||||
dialog.ShowModal();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1192,7 +1192,7 @@ void Sidebar::update_sliced_info_sizer()
|
|||
|
||||
double spool_weight = filament_preset->config.opt_float("filament_spool_weight", 0);
|
||||
if (spool_weight != 0.0) {
|
||||
new_label += "\n " + _L("(weight with spool)");
|
||||
new_label += "\n " + _L("(including spool)");
|
||||
info_text += wxString::Format(" (%.2f)\n", filament_weight + spool_weight);
|
||||
}
|
||||
}
|
||||
|
|
@ -2056,8 +2056,10 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
|||
// Preview events:
|
||||
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_QUESTION_MARK, [this](SimpleEvent&) { wxGetApp().keyboard_shortcuts(); });
|
||||
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_UPDATE_BED_SHAPE, [q](SimpleEvent&) { q->set_bed_shape(); });
|
||||
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_TAB, [this](SimpleEvent&) { select_next_view_3D(); });
|
||||
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_COLLAPSE_SIDEBAR, [this](SimpleEvent&) { this->q->collapse_sidebar(!this->q->is_sidebar_collapsed()); });
|
||||
if (wxGetApp().is_editor()) {
|
||||
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_TAB, [this](SimpleEvent&) { select_next_view_3D(); });
|
||||
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_COLLAPSE_SIDEBAR, [this](SimpleEvent&) { this->q->collapse_sidebar(!this->q->is_sidebar_collapsed()); });
|
||||
}
|
||||
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_JUMP_TO, [this](wxKeyEvent& evt) { preview->jump_layers_slider(evt); });
|
||||
#if ENABLE_ARROW_KEYS_WITH_SLIDERS
|
||||
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_MOVE_SLIDERS, [this](wxKeyEvent& evt) {
|
||||
|
|
@ -5533,8 +5535,12 @@ void Plater::reslice()
|
|||
if (clean_gcode_toolpaths)
|
||||
reset_gcode_toolpaths();
|
||||
|
||||
#if ENABLE_PREVIEW_TYPE_CHANGE
|
||||
p->preview->reload_print(!clean_gcode_toolpaths);
|
||||
#else
|
||||
// update type of preview
|
||||
p->preview->update_view_type(!clean_gcode_toolpaths);
|
||||
#endif // ENABLE_PREVIEW_TYPE_CHANGE
|
||||
}
|
||||
|
||||
void Plater::reslice_SLA_supports(const ModelObject &object, bool postpone_error_messages)
|
||||
|
|
@ -5773,7 +5779,9 @@ void Plater::on_config_change(const DynamicPrintConfig &config)
|
|||
}
|
||||
else if(opt_key == "extruder_colour") {
|
||||
update_scheduled = true;
|
||||
#if !ENABLE_PREVIEW_TYPE_CHANGE
|
||||
p->preview->set_number_extruders(p->config->option<ConfigOptionStrings>(opt_key)->values.size());
|
||||
#endif // !ENABLE_PREVIEW_TYPE_CHANGE
|
||||
p->sidebar->obj_list()->update_extruder_colors();
|
||||
} else if(opt_key == "max_print_height") {
|
||||
update_scheduled = true;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include <wx/intl.h>
|
||||
|
||||
#include "GUI.hpp"
|
||||
#include "format.hpp"
|
||||
#include "I18N.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
|
@ -18,40 +19,43 @@ std::string PresetHints::cooling_description(const Preset &preset)
|
|||
{
|
||||
std::string out;
|
||||
|
||||
if (preset.config.opt_bool("cooling", 0)) {
|
||||
bool cooling = preset.config.opt_bool("cooling", 0);
|
||||
int fan_below_layer_time = preset.config.opt_int("fan_below_layer_time", 0);
|
||||
int full_fan_speed_layer = preset.config.opt_int("full_fan_speed_layer", 0);
|
||||
|
||||
if (cooling) {
|
||||
int slowdown_below_layer_time = preset.config.opt_int("slowdown_below_layer_time", 0);
|
||||
int min_fan_speed = preset.config.opt_int("min_fan_speed", 0);
|
||||
int max_fan_speed = preset.config.opt_int("max_fan_speed", 0);
|
||||
int min_print_speed = int(preset.config.opt_float("min_print_speed", 0) + 0.5);
|
||||
int fan_below_layer_time = preset.config.opt_int("fan_below_layer_time", 0);
|
||||
|
||||
out += (boost::format(_utf8(L("If estimated layer time is below ~%1%s, "
|
||||
"fan will run at %2%%% and print speed will be reduced "
|
||||
"so that no less than %3%s are spent on that layer "
|
||||
"(however, speed will never be reduced below %4%mm/s).")))
|
||||
% slowdown_below_layer_time % max_fan_speed % slowdown_below_layer_time % min_print_speed).str();
|
||||
|
||||
if (fan_below_layer_time > slowdown_below_layer_time) {
|
||||
out += "\n" + (boost::format(_utf8(L("If estimated layer time is greater, but still below ~%1%s, "
|
||||
"fan will run at a proportionally decreasing speed between %2%%% and %3%%%.")))
|
||||
% fan_below_layer_time % max_fan_speed % min_fan_speed).str();
|
||||
}
|
||||
out += "\n" + _utf8(L("During the other layers, fan")) + " ";
|
||||
} else {
|
||||
out = _utf8(L("Fan")) + " ";
|
||||
out += GUI::format(_L("If estimated layer time is below ~%1%s, "
|
||||
"fan will run at %2%%% and print speed will be reduced "
|
||||
"so that no less than %3%s are spent on that layer "
|
||||
"(however, speed will never be reduced below %4%mm/s)."),
|
||||
slowdown_below_layer_time, max_fan_speed, slowdown_below_layer_time, min_print_speed);
|
||||
if (fan_below_layer_time > slowdown_below_layer_time)
|
||||
out += "\n" +
|
||||
GUI::format(_L("If estimated layer time is greater, but still below ~%1%s, "
|
||||
"fan will run at a proportionally decreasing speed between %2%%% and %3%%%."),
|
||||
fan_below_layer_time, max_fan_speed, min_fan_speed);
|
||||
out += "\n";
|
||||
}
|
||||
if (preset.config.opt_bool("fan_always_on", 0)) {
|
||||
int disable_fan_first_layers = preset.config.opt_int("disable_fan_first_layers", 0);
|
||||
int min_fan_speed = preset.config.opt_int("min_fan_speed", 0);
|
||||
|
||||
out += (boost::format(_utf8(L("will always run at %1%%%"))) % min_fan_speed).str() + " ";
|
||||
|
||||
if (disable_fan_first_layers > 1)
|
||||
out += (boost::format(_utf8(L("except for the first %1% layers."))) % disable_fan_first_layers).str();
|
||||
else if (disable_fan_first_layers == 1)
|
||||
out += _utf8(L("except for the first layer."));
|
||||
if (full_fan_speed_layer > disable_fan_first_layers + 1)
|
||||
out += GUI::format(_L("Fan speed will be ramped from zero at layer %1% to %2%%% at layer %3%."), disable_fan_first_layers, min_fan_speed, full_fan_speed_layer);
|
||||
else {
|
||||
out += GUI::format(cooling ? _L("During the other layers, fan will always run at %1%%%") : _L("Fan will always run at %1%%%"), min_fan_speed) + " ";
|
||||
if (disable_fan_first_layers > 1)
|
||||
out += GUI::format(_L("except for the first %1% layers."), disable_fan_first_layers);
|
||||
else if (disable_fan_first_layers == 1)
|
||||
out += GUI::format(_L("except for the first layer."));
|
||||
}
|
||||
} else
|
||||
out += _utf8(L("will be turned off."));
|
||||
out += cooling ? _u8L("During the other layers, fan will be turned off.") : _u8L("Fan will be turned off.");
|
||||
|
||||
return out;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#include "I18N.hpp"
|
||||
#include "../Utils/PrintHost.hpp"
|
||||
#include "wxExtensions.hpp"
|
||||
#include "MainFrame.hpp"
|
||||
#include "libslic3r/AppConfig.hpp"
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
|
@ -31,7 +32,7 @@ static const char *CONFIG_KEY_PRINT = "printhost_print";
|
|||
static const char *CONFIG_KEY_GROUP = "printhost_group";
|
||||
|
||||
PrintHostSendDialog::PrintHostSendDialog(const fs::path &path, bool can_start_print, const wxArrayString &groups)
|
||||
: MsgDialog(nullptr, _L("Send G-Code to printer host"), _L("Upload to Printer Host with the following filename:"), wxID_NONE)
|
||||
: MsgDialog(static_cast<wxWindow*>(wxGetApp().mainframe), _L("Send G-Code to printer host"), _L("Upload to Printer Host with the following filename:"), wxID_NONE)
|
||||
, txt_filename(new wxTextCtrl(this, wxID_ANY))
|
||||
, box_print(can_start_print ? new wxCheckBox(this, wxID_ANY, _L("Start printing after upload")) : nullptr)
|
||||
, combo_groups(!groups.IsEmpty() ? new wxComboBox(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, groups, wxCB_READONLY) : nullptr)
|
||||
|
|
@ -77,6 +78,7 @@ PrintHostSendDialog::PrintHostSendDialog(const fs::path &path, bool can_start_pr
|
|||
txt_filename->SetFocus();
|
||||
|
||||
Fit();
|
||||
CenterOnParent();
|
||||
|
||||
Bind(wxEVT_SHOW, [=](const wxShowEvent &) {
|
||||
// Another similar case where the function only works with EVT_SHOW + CallAfter,
|
||||
|
|
|
|||
|
|
@ -1586,7 +1586,7 @@ void TabPrint::build()
|
|||
page = add_options_page(L("Output options"), "output+page_white");
|
||||
optgroup = page->new_optgroup(L("Sequential printing"));
|
||||
optgroup->append_single_option_line("complete_objects", "sequential-printing_124589");
|
||||
line = { L("Extruder clearance (mm)"), "" };
|
||||
line = { L("Extruder clearance"), "" };
|
||||
line.append_option(optgroup->get_option("extruder_clearance_radius"));
|
||||
line.append_option(optgroup->get_option("extruder_clearance_height"));
|
||||
optgroup->append_line(line);
|
||||
|
|
@ -1847,6 +1847,7 @@ void TabFilament::build()
|
|||
|
||||
optgroup->append_single_option_line("bridge_fan_speed", category_path + "fan-settings");
|
||||
optgroup->append_single_option_line("disable_fan_first_layers", category_path + "fan-settings");
|
||||
optgroup->append_single_option_line("full_fan_speed_layer", category_path + "fan-settings");
|
||||
|
||||
optgroup = page->new_optgroup(L("Cooling thresholds"), 25);
|
||||
optgroup->append_single_option_line("fan_below_layer_time", category_path + "cooling-thresholds");
|
||||
|
|
@ -1999,7 +2000,7 @@ void TabFilament::toggle_options()
|
|||
for (auto el : { "max_fan_speed", "fan_below_layer_time", "slowdown_below_layer_time", "min_print_speed" })
|
||||
toggle_option(el, cooling);
|
||||
|
||||
for (auto el : { "min_fan_speed", "disable_fan_first_layers" })
|
||||
for (auto el : { "min_fan_speed", "disable_fan_first_layers", "full_fan_speed_layer" })
|
||||
toggle_option(el, fan_always_on);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue