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

This commit is contained in:
enricoturri1966 2020-12-01 08:45:50 +01:00
commit 67d42c7053
13 changed files with 134 additions and 14 deletions

View File

@ -529,6 +529,7 @@ first_layer_bed_temperature = 60
filament_cost = 23.63
filament_density = 1.3
filament_colour = #3C4547
filament_spool_weight = 256
[filament:Real Filament PLA @CREALITY]
inherits = *PLA*
@ -562,6 +563,7 @@ first_layer_bed_temperature = 60
filament_cost = 21.99
filament_density = 1.24
filament_colour = #125467
filament_spool_weight = 238
[filament:123-3D Jupiter PLA @CREALITY]
inherits = *PLA*
@ -667,7 +669,7 @@ retract_before_wipe = 70%
default_print_profile = 0.16mm OPTIMAL @CREALITY
default_filament_profile = Creality PLA @CREALITY
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 ; home all\nG1 Z2 F240\nG1 X2 Y10 F3000\nG1 Z0.28 F240\nG92 E0\nG1 Y190 E15 F1500 ; intro line\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E15 F1200 ; intro line\nG92 E0
end_gcode = M104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n{if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+5, max_print_height)} F600{endif} ; Move print head up\nG1 X5 Y170 F3000 ; present print\n{if layer_z < max_print_height-10}G1 Z{z_offset+min(layer_z+70, max_print_height-10)} F600{endif} ; Move print head up\nM84 X Y E ; disable motors
end_gcode = {if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+2, max_print_height)} F600{endif} ; Move print head up\nG1 X5 Y170 F{travel_speed*60} ; present print\n{if layer_z < max_print_height-10}G1 Z{z_offset+min(layer_z+70, max_print_height-10)} F600{endif} ; Move print head further up\nM140 S0 ; turn off heatbed\nM104 S0 ; turn off temperature\nM107 ; turn off fan\nM84 X Y E ; disable motors
[printer:*fastabl*]
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S150 ; set extruder temp for auto bed leveling\nM140 S[first_layer_bed_temperature] ; set bed temp\nG28 ; home all\nG29 ; auto bed levelling\nG1 Z50 F240\nG1 X2 Y10 F3000\nM104 S[first_layer_temperature] ; set extruder temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG1 Z0.28 F240\nG92 E0\nG1 Y190 E15 F1500 ; intro line\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E15 F1200 ; intro line\nG92 E0
@ -676,7 +678,7 @@ start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S150 ; set extruder temp for auto bed leveling\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nG28 ; home all\nG29 ; auto bed levelling\nG1 Z50 F240\nG1 X2 Y10 F3000\nM104 S[first_layer_temperature] ; set extruder temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG1 Z0.28 F240\nG92 E0\nG1 Y190 E15 F1500 ; intro line\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E15 F1200 ; intro line\nG92 E0
[printer:*invertedz*]
end_gcode = M104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n{if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+5, max_print_height)} F600{endif} ; Move print bed down\nG1 X50 Y50 F3000 ; present print\n{if layer_z < max_print_height-10}G1 Z{z_offset+max_print_height-10} F600{endif} ; Move print bed down\nM84 X Y E ; disable motors
end_gcode = {if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+2, max_print_height)} F600{endif} ; Move print bed down\nG1 X50 Y50 F{travel_speed*60} ; present print\n{if layer_z < max_print_height-10}G1 Z{z_offset+max_print_height-10)} F600{endif} ; Move print bed down further down\nM140 S0 ; turn off heatbed\nM104 S0 ; turn off temperature\nM107 ; turn off fan\nM84 X Y E ; disable motors
[printer:Creality Ender-3 BLTouch]
inherits = Creality Ender-3; *fastabl*
@ -707,7 +709,7 @@ printer_model = ENDER2
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_CREALITY\nPRINTER_MODEL_ENDER2\nPRINTER_HAS_BOWDEN
max_print_height = 200
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 ; home all\nG1 Z2 F240\nG1 X2 Y10 F3000\nG1 Z0.28 F240\nG92 E0\nG1 X15 Y135 E15 F1500 ; intro line\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E15 F1200 ; intro line\nG92 E0
end_gcode = M104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n{if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+5, max_print_height)} F600{endif} ; Move print head up\nG1 X5 Y140 F3000 ; present print\n{if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+30, max_print_height)} F600{endif} ; Move print head up\nM84 X Y E ; disable motors
end_gcode = {if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+2, max_print_height)} F600{endif} ; Move print head up\nG1 X5 Y140 F{travel_speed*60} ; present print\n{if layer_z < max_print_height-10}G1 Z{z_offset+min(layer_z+30, max_print_height-10)} F600{endif} ; Move print head further up\nM140 S0 ; turn off heatbed\nM104 S0 ; turn off temperature\nM107 ; turn off fan\nM84 X Y E ; disable motors
[printer:Creality CR-10 Mini]
inherits = Creality Ender-3

View File

@ -360,6 +360,7 @@ namespace Slic3r {
// Otherwise, leave control to the user completely.
std::string toolchange_gcode_str;
const std::string& toolchange_gcode = gcodegen.config().toolchange_gcode.value;
// m_max_layer_z = std::max(m_max_layer_z, tcr.print_z);
if (! toolchange_gcode.empty()) {
DynamicConfig config;
int previous_extruder_id = gcodegen.writer().extruder() ? (int)gcodegen.writer().extruder()->id() : -1;
@ -367,6 +368,7 @@ namespace Slic3r {
config.set_key_value("next_extruder", new ConfigOptionInt((int)new_extruder_id));
config.set_key_value("layer_num", new ConfigOptionInt(gcodegen.m_layer_index));
config.set_key_value("layer_z", new ConfigOptionFloat(tcr.print_z));
// config.set_key_value("max_layer_z", new ConfigOptionFloat(m_max_layer_z));
toolchange_gcode_str = gcodegen.placeholder_parser_process("toolchange_gcode", toolchange_gcode, new_extruder_id, &config);
check_add_eol(toolchange_gcode_str);
}
@ -1011,11 +1013,12 @@ void GCode::_do_export(Print& print, FILE* file, ThumbnailsGeneratorCallback thu
DoExport::init_gcode_processor(print.config(), m_processor, m_silent_time_estimator_enabled);
// resets analyzer's tracking data
m_last_height = 0.0f;
m_last_layer_z = 0.0f;
m_last_height = 0.f;
m_last_layer_z = 0.f;
m_max_layer_z = 0.f;
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
m_last_mm3_per_mm = 0.0;
m_last_width = 0.0f;
m_last_mm3_per_mm = 0.;
m_last_width = 0.f;
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING
// How many times will be change_layer() called?
@ -1376,6 +1379,7 @@ void GCode::_do_export(Print& print, FILE* file, ThumbnailsGeneratorCallback thu
DynamicConfig config;
config.set_key_value("layer_num", new ConfigOptionInt(m_layer_index));
config.set_key_value("layer_z", new ConfigOptionFloat(m_writer.get_position()(2) - m_config.z_offset.value));
config.set_key_value("max_layer_z", new ConfigOptionFloat(m_max_layer_z));
if (print.config().single_extruder_multi_material) {
// Process the end_filament_gcode for the active filament only.
int extruder_id = m_writer.extruder()->id();
@ -1877,13 +1881,15 @@ void GCode::process_layer(
gcode += buf;
// update caches
m_last_layer_z = static_cast<float>(print_z);
m_max_layer_z = std::max(m_max_layer_z, m_last_layer_z);
m_last_height = height;
// Set new layer - this will change Z and force a retraction if retract_layer_change is enabled.
if (! print.config().before_layer_gcode.value.empty()) {
DynamicConfig config;
config.set_key_value("layer_num", new ConfigOptionInt(m_layer_index + 1));
config.set_key_value("layer_z", new ConfigOptionFloat(print_z));
config.set_key_value("layer_num", new ConfigOptionInt(m_layer_index + 1));
config.set_key_value("layer_z", new ConfigOptionFloat(print_z));
config.set_key_value("max_layer_z", new ConfigOptionFloat(m_max_layer_z));
gcode += this->placeholder_parser_process("before_layer_gcode",
print.config().before_layer_gcode.value, m_writer.extruder()->id(), &config)
+ "\n";
@ -1897,6 +1903,7 @@ void GCode::process_layer(
gcode += this->placeholder_parser_process("layer_gcode",
print.config().layer_gcode.value, m_writer.extruder()->id(), &config)
+ "\n";
config.set_key_value("max_layer_z", new ConfigOptionFloat(m_max_layer_z));
}
if (! first_layer && ! m_second_layer_things_done) {
@ -2898,6 +2905,7 @@ std::string GCode::set_extruder(unsigned int extruder_id, double print_z)
config.set_key_value("next_extruder", new ConfigOptionInt((int)extruder_id));
config.set_key_value("layer_num", new ConfigOptionInt(m_layer_index));
config.set_key_value("layer_z", new ConfigOptionFloat(print_z));
config.set_key_value("max_layer_z", new ConfigOptionFloat(m_max_layer_z));
toolchange_gcode_parsed = placeholder_parser_process("toolchange_gcode", toolchange_gcode, extruder_id, &config);
gcode += toolchange_gcode_parsed;
check_add_eol(gcode);

View File

@ -351,6 +351,7 @@ private:
// Support for G-Code Processor
float m_last_height{ 0.0f };
float m_last_layer_z{ 0.0f };
float m_max_layer_z{ 0.0f };
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
double m_last_mm3_per_mm;
float m_last_width{ 0.0f };

View File

@ -83,4 +83,12 @@
#define ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN (1 && ENABLE_2_3_0_BETA1)
//===================
// 2.3.0.beta2 techs
//===================
#define ENABLE_2_3_0_BETA2 1
#define ENABLE_ARROW_KEYS_WITH_SLIDERS (1 && ENABLE_2_3_0_BETA2)
#endif // _prusaslicer_technologies_h_

View File

@ -1519,6 +1519,10 @@ void Control::move_current_thumb(const bool condition)
if (accelerator > 0)
delta *= accelerator;
#if ENABLE_ARROW_KEYS_WITH_SLIDERS
if (m_selection == ssUndef) m_selection = ssHigher;
#endif // ENABLE_ARROW_KEYS_WITH_SLIDERS
if (m_selection == ssLower) {
m_lower_value -= delta;
correct_lower_value();
@ -1579,13 +1583,26 @@ void Control::OnKeyDown(wxKeyEvent &event)
if (key == WXK_LEFT || key == WXK_RIGHT)
move_current_thumb(key == WXK_LEFT);
else if (key == WXK_UP || key == WXK_DOWN) {
#if ENABLE_ARROW_KEYS_WITH_SLIDERS
if (key == WXK_DOWN)
m_selection = ssHigher;
else if (key == WXK_UP && is_lower_thumb_editable())
m_selection = ssLower;
#else
if (key == WXK_UP)
m_selection = ssHigher;
else if (key == WXK_DOWN && is_lower_thumb_editable())
m_selection = ssLower;
#endif // ENABLE_ARROW_KEYS_WITH_SLIDERS
Refresh();
}
}
#if ENABLE_ARROW_KEYS_WITH_SLIDERS
else {
if (key == WXK_LEFT || key == WXK_RIGHT)
move_current_thumb(key == WXK_LEFT);
}
#endif // ENABLE_ARROW_KEYS_WITH_SLIDERS
}
else {
if (m_is_focused) {
@ -1599,6 +1616,12 @@ void Control::OnKeyDown(wxKeyEvent &event)
else if (key == WXK_UP || key == WXK_DOWN)
move_current_thumb(key == WXK_UP);
}
#if ENABLE_ARROW_KEYS_WITH_SLIDERS
else {
if (key == WXK_UP || key == WXK_DOWN)
move_current_thumb(key == WXK_UP);
}
#endif // ENABLE_ARROW_KEYS_WITH_SLIDERS
}
event.Skip(); // !Needed to have EVT_CHAR generated as well

View File

@ -128,7 +128,7 @@ void Field::PostInitialize()
}
// Values of width to alignments of fields
int Field::def_width() { return wxOSX ? 8 : 7; }
int Field::def_width() { return 8; }
int Field::def_width_wider() { return 16; }
int Field::def_width_thinner() { return 4; }

View File

@ -1078,7 +1078,11 @@ wxDEFINE_EVENT(EVT_GLCANVAS_MOUSE_DRAGGING_FINISHED, SimpleEvent);
wxDEFINE_EVENT(EVT_GLCANVAS_UPDATE_BED_SHAPE, SimpleEvent);
wxDEFINE_EVENT(EVT_GLCANVAS_TAB, SimpleEvent);
wxDEFINE_EVENT(EVT_GLCANVAS_RESETGIZMOS, SimpleEvent);
#if ENABLE_ARROW_KEYS_WITH_SLIDERS
wxDEFINE_EVENT(EVT_GLCANVAS_MOVE_SLIDERS, wxKeyEvent);
#else
wxDEFINE_EVENT(EVT_GLCANVAS_MOVE_LAYERS_SLIDER, wxKeyEvent);
#endif // ENABLE_ARROW_KEYS_WITH_SLIDERS
wxDEFINE_EVENT(EVT_GLCANVAS_EDIT_COLOR_CHANGE, wxKeyEvent);
wxDEFINE_EVENT(EVT_GLCANVAS_JUMP_TO, wxKeyEvent);
wxDEFINE_EVENT(EVT_GLCANVAS_UNDO, SimpleEvent);
@ -2817,7 +2821,11 @@ void GLCanvas3D::on_key(wxKeyEvent& evt)
keyCode == WXK_UP ||
keyCode == WXK_DOWN) {
if (dynamic_cast<Preview*>(m_canvas->GetParent()) != nullptr)
#if ENABLE_ARROW_KEYS_WITH_SLIDERS
post_event(wxKeyEvent(EVT_GLCANVAS_MOVE_SLIDERS, evt));
#else
post_event(wxKeyEvent(EVT_GLCANVAS_MOVE_LAYERS_SLIDER, evt));
#endif // ENABLE_ARROW_KEYS_WITH_SLIDERS
}
}
}
@ -3892,11 +3900,14 @@ bool GLCanvas3D::_render_arrange_menu(float pos_x)
bool settings_changed = false;
if (imgui->slider_float(_L("Gap size"), &settings.distance, 0.f, 100.f)) {
if (ImGui::DragFloat(_L("Gal size").ToUTF8().data(), &settings.distance, .01f, 0.0f, 100.0f, "%5.2f")) {
m_arrange_settings.distance = settings.distance;
settings_changed = true;
}
if (ImGui::IsItemHovered())
ImGui::SetTooltip("%s", _L("Use CTRL+Left mouse button to enter text edit mode.\nUse SHIFT key to increase stepping.").ToUTF8().data());
if (imgui->checkbox(_L("Enable rotations (slow)"), settings.enable_rotation)) {
m_arrange_settings.enable_rotation = settings.enable_rotation;
settings_changed = true;

View File

@ -103,7 +103,11 @@ wxDECLARE_EVENT(EVT_GLCANVAS_MOUSE_DRAGGING_FINISHED, SimpleEvent);
wxDECLARE_EVENT(EVT_GLCANVAS_UPDATE_BED_SHAPE, SimpleEvent);
wxDECLARE_EVENT(EVT_GLCANVAS_TAB, SimpleEvent);
wxDECLARE_EVENT(EVT_GLCANVAS_RESETGIZMOS, SimpleEvent);
#if ENABLE_ARROW_KEYS_WITH_SLIDERS
wxDECLARE_EVENT(EVT_GLCANVAS_MOVE_SLIDERS, wxKeyEvent);
#else
wxDECLARE_EVENT(EVT_GLCANVAS_MOVE_LAYERS_SLIDER, wxKeyEvent);
#endif // ENABLE_ARROW_KEYS_WITH_SLIDERS
wxDECLARE_EVENT(EVT_GLCANVAS_EDIT_COLOR_CHANGE, wxKeyEvent);
wxDECLARE_EVENT(EVT_GLCANVAS_JUMP_TO, wxKeyEvent);
wxDECLARE_EVENT(EVT_GLCANVAS_UNDO, SimpleEvent);

View File

@ -460,6 +460,13 @@ void Preview::unbind_event_handlers()
m_moves_slider->Unbind(wxEVT_SCROLL_CHANGED, &Preview::on_moves_slider_scroll_changed, this);
}
#if ENABLE_ARROW_KEYS_WITH_SLIDERS
void Preview::move_moves_slider(wxKeyEvent& evt)
{
if (m_moves_slider != nullptr) m_moves_slider->OnKeyDown(evt);
}
#endif // ENABLE_ARROW_KEYS_WITH_SLIDERS
void Preview::hide_layers_slider()
{
m_layers_slider_sizer->Hide((size_t)0);
@ -765,12 +772,26 @@ void Preview::update_layers_slider_from_canvas(wxKeyEvent& event)
const auto key = event.GetKeyCode();
#if ENABLE_ARROW_KEYS_WITH_SLIDERS
if (key == 'S' || key == 'W') {
const int new_pos = key == 'W' ? m_layers_slider->GetHigherValue() + 1 : m_layers_slider->GetHigherValue() - 1;
#else
if (key == 'U' || key == 'D') {
const int new_pos = key == 'U' ? m_layers_slider->GetHigherValue() + 1 : m_layers_slider->GetHigherValue() - 1;
#endif // ENABLE_ARROW_KEYS_WITH_SLIDERS
m_layers_slider->SetHigherValue(new_pos);
if (event.ShiftDown() || m_layers_slider->is_one_layer()) m_layers_slider->SetLowerValue(m_layers_slider->GetHigherValue());
}
#if ENABLE_ARROW_KEYS_WITH_SLIDERS
else if (key == 'A' || key == 'D') {
const int new_pos = key == 'D' ? m_moves_slider->GetHigherValue() + 1 : m_moves_slider->GetHigherValue() - 1;
m_moves_slider->SetHigherValue(new_pos);
if (event.ShiftDown() || m_moves_slider->is_one_layer()) m_moves_slider->SetLowerValue(m_moves_slider->GetHigherValue());
}
else if (key == 'X')
#else
else if (key == 'S')
#endif // ENABLE_ARROW_KEYS_WITH_SLIDERS
m_layers_slider->ChangeOneLayerLock();
else if (key == WXK_SHIFT)
m_layers_slider->UseDefaultColors(false);

View File

@ -157,6 +157,9 @@ public:
void update_bottom_toolbar();
void update_moves_slider();
void enable_moves_slider(bool enable);
#if ENABLE_ARROW_KEYS_WITH_SLIDERS
void move_moves_slider(wxKeyEvent& evt);
#endif // ENABLE_ARROW_KEYS_WITH_SLIDERS
void hide_layers_slider();
private:

View File

@ -203,22 +203,48 @@ void KBShortcutsDialog::fill_shortcuts()
}
Shortcuts preview_shortcuts = {
{ L("Arrow Up"), L("Upper Layer") },
{ L("Arrow Down"), L("Lower Layer") },
#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") },
{ "O", L("Toggle vertical slider one layer mode ON/OFF") },
{ "L", L("Show/Hide Legend and Estimated printing time") },
#else
{ L("Arrow Up"), L("Upper layer") },
{ L("Arrow Down"), L("Lower layer") },
{ "U", L("Upper Layer") },
{ "D", L("Lower Layer") },
{ "L", L("Show/Hide Legend & Estimated printing time") },
#endif // ENABLE_ARROW_KEYS_WITH_SLIDERS
};
m_full_shortcuts.push_back(std::make_pair(_L("Preview"), preview_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("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") },
#else
{ L("Arrow Up"), L("Move current slider thumb Up") },
{ L("Arrow Down"), L("Move current slider thumb Down") },
{ L("Arrow Left"), L("Set upper thumb to current slider thumb") },
{ L("Arrow Right"), L("Set lower thumb to current slider thumb") },
{ "+", L("Add color change marker for current layer") },
{ "-", L("Delete color change marker for current layer") },
#endif // ENABLE_ARROW_KEYS_WITH_SLIDERS
{ "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") },
};

View File

@ -2055,7 +2055,14 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
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) {
preview->move_layers_slider(evt);
preview->move_moves_slider(evt);
});
#else
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_MOVE_LAYERS_SLIDER, [this](wxKeyEvent& evt) { preview->move_layers_slider(evt); });
#endif // ENABLE_ARROW_KEYS_WITH_SLIDERS
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_EDIT_COLOR_CHANGE, [this](wxKeyEvent& evt) { preview->edit_layers_slider(evt); });
if (wxGetApp().is_editor()) {

View File

@ -24,6 +24,12 @@
using boost::optional;
#ifdef __Linux__
#define wxLinux true
#else
#define wxLinux false
#endif
namespace Slic3r {
namespace GUI {
@ -586,7 +592,7 @@ void UnsavedChangesDialog::build(Preset::Type type, PresetCollection* dependent_
m_tree->AssociateModel(m_tree_model);
m_tree_model->SetAssociatedControl(m_tree);
m_tree->AppendToggleColumn(L"\u2714", UnsavedChangesModel::colToggle, wxDATAVIEW_CELL_ACTIVATABLE, 6 * em);//2610,11,12 //2714
m_tree->AppendToggleColumn(L"\u2714", UnsavedChangesModel::colToggle, wxDATAVIEW_CELL_ACTIVATABLE, (wxLinux ? 8 : 6) * em);
auto append_bmp_text_column = [this](const wxString& label, unsigned model_column, int width, bool set_expander = false)
{