diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e094a85f..44b77de48 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,13 +42,6 @@ if (MSVC) add_compile_options(-bigobj -Zm316) endif () -# CMAKE_PREFIX_PATH is used to point CMake to the remaining dependencies (Boost, TBB, ...) -# We pick it from environment if it is not defined in another way -if (NOT DEFINED CMAKE_PREFIX_PATH) - if (DEFINED ENV{CMAKE_PREFIX_PATH}) - set(CMAKE_PREFIX_PATH "$ENV{CMAKE_PREFIX_PATH}") - endif () -endif () message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}") # Add our own cmake module path. diff --git a/deps/deps-unix-common.cmake b/deps/deps-unix-common.cmake index 7ad1b4290..e4c718d21 100644 --- a/deps/deps-unix-common.cmake +++ b/deps/deps-unix-common.cmake @@ -26,6 +26,7 @@ ExternalProject_Add(dep_nlopt URL_HASH SHA256=c6dd7a5701fff8ad5ebb45a3dc8e757e61d52658de3918e38bab233e7fd3b4ae CMAKE_GENERATOR "${DEP_MSVC_GEN}" CMAKE_ARGS + -DBUILD_SHARED_LIBS=OFF -DNLOPT_PYTHON=OFF -DNLOPT_OCTAVE=OFF -DNLOPT_MATLAB=OFF @@ -35,18 +36,7 @@ ExternalProject_Add(dep_nlopt INSTALL_COMMAND "" ) -ExternalProject_Add(dep_zlib - EXCLUDE_FROM_ALL 1 - URL "https://zlib.net/zlib-1.2.11.tar.xz" - URL_HASH SHA256=4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066 - CMAKE_GENERATOR "${DEP_MSVC_GEN}" - CMAKE_ARGS ${DEP_CMAKE_OPTS} - INSTALL_COMMAND make install "DESTDIR=${DESTDIR}" - INSTALL_COMMAND "" -) - ExternalProject_Add(dep_libpng - DEPENDS dep_zlib EXCLUDE_FROM_ALL 1 URL "http://prdownloads.sourceforge.net/libpng/libpng-1.6.35.tar.xz?download" URL_HASH SHA256=23912ec8c9584917ed9b09c5023465d71709dce089be503c7867fec68a93bcd7 diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index f228723da..3ab08b773 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -3885,6 +3885,7 @@ void GLCanvas3D::render() void GLCanvas3D::select_all() { m_selection.add_all(); + m_dirty = true; } void GLCanvas3D::delete_selected() diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 52426c12d..121044729 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -520,7 +520,7 @@ void GUI_App::update_mode() obj_list()->get_sizer()->Show(mode == ConfigMenuModeExpert); sidebar().set_mode_value(mode); - sidebar().show_buttons(mode == ConfigMenuModeExpert); +// sidebar().show_buttons(mode == ConfigMenuModeExpert); obj_list()->update_selections(); sidebar().Layout(); diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index 10d9d0eb3..5a98c5254 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -263,6 +263,7 @@ void ObjectList::selection_changed() event.SetEventObject(this); wxPostEvent(this, event); } + wxGetApp().sidebar().enable_buttons(!m_objects_model->IsEmpty()); part_selection_changed(); diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index b57e4e01c..5e921921e 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -565,6 +565,7 @@ Sidebar::Sidebar(Plater *parent) p->btn_export_gcode->SetFont(wxGetApp().bold_font()); p->btn_reslice = new wxButton(this, wxID_ANY, _(L("Slice now"))); p->btn_reslice->SetFont(wxGetApp().bold_font()); + enable_buttons(false); auto *btns_sizer = new wxBoxSizer(wxVERTICAL); btns_sizer->Add(p->btn_reslice, 0, wxEXPAND | wxTOP, 5); @@ -820,15 +821,9 @@ void Sidebar::show_sliced_info_sizer(const bool show) void Sidebar::show_buttons(const bool show) { p->btn_reslice->Show(show); - for (size_t i = 0; i < wxGetApp().tab_panel()->GetPageCount(); ++i) { - TabPrinter *tab = dynamic_cast(wxGetApp().tab_panel()->GetPage(i)); - if (!tab) - continue; - if (p->plater->printer_technology() == ptFFF) { - p->btn_send_gcode->Show(show && !tab->m_config->opt_string("print_host").empty()); - } - break; - } + TabPrinter *tab = dynamic_cast(wxGetApp().get_tab(Preset::TYPE_PRINTER)); + if (tab && p->plater->printer_technology() == ptFFF) + p->btn_send_gcode->Show(show && !tab->m_config->opt_string("print_host").empty()); } void Sidebar::enable_buttons(bool enable) @@ -1819,6 +1814,8 @@ unsigned int Plater::priv::update_background_process() // Some previously calculated data on the Print was invalidated. // Hide the slicing results, as the current slicing status is no more valid. this->sidebar->show_sliced_info_sizer(false); + // Disable buttons during background process. + this->sidebar->enable_buttons(false); // Reset preview canvases. If the print has been invalidated, the preview canvases will be cleared. // Otherwise they will be just refreshed. this->gcode_preview_data.reset(); @@ -2062,6 +2059,7 @@ void Plater::priv::on_process_completed(wxCommandEvent &evt) this->statusbar()->set_status_text(L("Cancelled")); this->sidebar->show_sliced_info_sizer(success); + this->sidebar->enable_buttons(success); // This updates the "Slice now", "Export G-code", "Arrange" buttons status. // Namely, it refreshes the "Out of print bed" property of all the ModelObjects, and it enables