mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 09:47:58 -06:00
FIX: fix problems of preview-slider under ByObject
1.layer number display in disorder under ByObject case 2.disable unworkable functions in ByObject case:add pause, add custom Gcode, change filaments Change-Id: Ib0413e047db1daf1ca582e1369c70b6b93c1bd64
This commit is contained in:
parent
c832a03616
commit
3190283929
2 changed files with 18 additions and 15 deletions
|
@ -483,10 +483,9 @@ void Preview::update_layers_slider_mode()
|
||||||
can_change_color = false;
|
can_change_color = false;
|
||||||
}
|
}
|
||||||
// check if whole model uses just only one extruder
|
// check if whole model uses just only one extruder
|
||||||
if (!plate_extruders.empty()) {
|
if (plate_extruders.size() > 1) {
|
||||||
//const int extruder = objects[0]->config.has("extruder") ? objects[0]->config.option("extruder")->getInt() : 0;
|
//const int extruder = objects[0]->config.has("extruder") ? objects[0]->config.option("extruder")->getInt() : 0;
|
||||||
const int extruder = plate_extruders[0];
|
only_extruder = plate_extruders[0];
|
||||||
only_extruder = extruder;
|
|
||||||
// auto is_one_extruder_printed_model = [objects, extruder]() {
|
// auto is_one_extruder_printed_model = [objects, extruder]() {
|
||||||
// for (ModelObject *object : objects) {
|
// for (ModelObject *object : objects) {
|
||||||
// if (object->config.has("extruder") && object->config.option("extruder")->getInt() != extruder) /*return false*/;
|
// if (object->config.has("extruder") && object->config.option("extruder")->getInt() != extruder) /*return false*/;
|
||||||
|
|
|
@ -597,8 +597,11 @@ void IMSlider::SetModeAndOnlyExtruder(const bool is_one_extruder_printed_model,
|
||||||
|
|
||||||
UseDefaultColors(m_mode == SingleExtruder);
|
UseDefaultColors(m_mode == SingleExtruder);
|
||||||
|
|
||||||
m_is_wipe_tower = m_mode != SingleExtruder;
|
DynamicPrintConfig config = wxGetApp().preset_bundle->full_config();
|
||||||
|
if (config.opt_enum<PrintSequence>("print_sequence") == PrintSequence::ByObject)
|
||||||
|
m_is_wipe_tower = false;
|
||||||
|
else
|
||||||
|
m_is_wipe_tower = m_mode != SingleExtruder;
|
||||||
m_can_change_color = can_change_color;
|
m_can_change_color = can_change_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1430,22 +1433,23 @@ void IMSlider::render_menu()
|
||||||
|
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_::ImGuiStyleVar_ChildRounding, 4.0f * m_scale);
|
ImGui::PushStyleVar(ImGuiStyleVar_::ImGuiStyleVar_ChildRounding, 4.0f * m_scale);
|
||||||
if (ImGui::BeginPopup("slider_menu_popup")) {
|
if (ImGui::BeginPopup("slider_menu_popup")) {
|
||||||
if ((m_selection == ssLower && GetLowerValueD() == m_zero_layer_height) || (m_selection == ssHigher && GetHigherValueD() == m_zero_layer_height))
|
bool menu_item_enable = m_draw_mode != dmSequentialFffPrint;
|
||||||
|
//if ((m_selection == ssLower && GetLowerValueD() == m_zero_layer_height) || (m_selection == ssHigher && GetHigherValueD() == m_zero_layer_height))
|
||||||
|
//{
|
||||||
|
// if (menu_item_with_icon(_u8L("Jump to Layer").c_str(), "")) {
|
||||||
|
// m_show_go_to_layer_dialog = true;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//else
|
||||||
{
|
{
|
||||||
if (menu_item_with_icon(_u8L("Jump to Layer").c_str(), "")) {
|
if (menu_item_with_icon(_u8L("Add Pause").c_str(), "", ImVec2(0, 0), 0, false, menu_item_enable)) {
|
||||||
m_show_go_to_layer_dialog = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (menu_item_with_icon(_u8L("Add Pause").c_str(), "")) {
|
|
||||||
add_code_as_tick(PausePrint);
|
add_code_as_tick(PausePrint);
|
||||||
}
|
}
|
||||||
if (menu_item_with_icon(_u8L("Add Custom G-code").c_str(), "")) {
|
if (menu_item_with_icon(_u8L("Add Custom G-code").c_str(), "", ImVec2(0, 0), 0, false, menu_item_enable)) {
|
||||||
m_show_custom_gcode_window = true;
|
m_show_custom_gcode_window = true;
|
||||||
}
|
}
|
||||||
if (!gcode(Template).empty()) {
|
if (!gcode(Template).empty()) {
|
||||||
if (menu_item_with_icon(_u8L("Add Custom Template").c_str(), "")) {
|
if (menu_item_with_icon(_u8L("Add Custom Template").c_str(), "", ImVec2(0, 0), 0, false, menu_item_enable)) {
|
||||||
add_code_as_tick(Template);
|
add_code_as_tick(Template);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue