diff --git a/cad/PrusaSlicer/Makefile b/cad/PrusaSlicer/Makefile index f0248716a9e2..a82e609995c8 100644 --- a/cad/PrusaSlicer/Makefile +++ b/cad/PrusaSlicer/Makefile @@ -1,63 +1,62 @@ PORTNAME= PrusaSlicer DISTVERSIONPREFIX=version_ -DISTVERSION= 2.7.2 -PORTREVISION= 1 +DISTVERSION= 2.7.4 CATEGORIES= cad DIST_SUBDIR= PrusaSlicer MAINTAINER= teodorsigaev@gmail.com COMMENT= Slicing application for 3D printers WWW= https://www.prusa3d.com/prusaslicer/ LICENSE= AGPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= cereal>=1.3.0.10:devel/cereal \ cgal>=5.0.2:math/cgal \ opencascade>=7.7.0:cad/opencascade \ libbgcode>=0.2.0:cad/libbgcode LIB_DEPENDS+= libbgcode_convert.so:cad/libbgcode \ libbgcode_binarize.so:cad/libbgcode \ libbgcode_core.so:cad/libbgcode \ libtbb.so:devel/onetbb \ libboost_log.so:devel/boost-libs \ libImath.so:math/Imath \ libnlopt.so:math/nlopt \ libqhull_r.so:math/qhull \ libcurl.so:ftp/curl \ libexpat.so:textproc/expat2 \ libiconv.so:converters/libiconv \ libopenvdb.so:misc/openvdb \ libgmp.so:math/gmp \ libmpfr.so:math/mpfr \ libdbus-1.so:devel/dbus \ libpng.so:graphics/png \ libTKXSDRAWSTEP.so:cad/opencascade \ libtiff.so:graphics/tiff \ libfontconfig.so:x11-fonts/fontconfig \ libfreeimage.so:graphics/freeimage \ libfreetype.so:print/freetype2 \ libavcodec.so:multimedia/ffmpeg4 \ libharfbuzz.so:print/harfbuzz \ libwayland-egl.so:graphics/wayland USES= cmake cpe desktop-file-utils eigen:3 gettext gl gnome iconv \ jpeg pkgconfig xorg CPE_VENDOR= prusa3d USE_GITHUB= yes GH_ACCOUNT= prusa3d USE_GL= gl glu glew USE_GNOME= gtk30 pango atk cairo gdkpixbuf2 glib20 USE_WX= 3.2 USE_XORG= x11 CMAKE_ARGS+= -DwxWidgets_CONFIG_EXECUTABLE="${WX_CONFIG}" \ -DSLIC3R_GTK=3 \ -DSLIC3R_FHS=1 \ -DSLIC3R_PCH=OFF \ -DSLIC3R_BUILD_TESTS=OFF PORTDATA= * .include diff --git a/cad/PrusaSlicer/distinfo b/cad/PrusaSlicer/distinfo index ea27189ec62c..1b16531420b3 100644 --- a/cad/PrusaSlicer/distinfo +++ b/cad/PrusaSlicer/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1709292528 -SHA256 (PrusaSlicer/prusa3d-PrusaSlicer-version_2.7.2_GH0.tar.gz) = 0af8ab83ad33cdebc1d13d37d8ed3b2125d84532eb4bca7618c422bf7648ebee -SIZE (PrusaSlicer/prusa3d-PrusaSlicer-version_2.7.2_GH0.tar.gz) = 64915607 +TIMESTAMP = 1712342295 +SHA256 (PrusaSlicer/prusa3d-PrusaSlicer-version_2.7.4_GH0.tar.gz) = 6370a9593aeac5c56543e66d167ab5fd053df55b9376392c2d6184eb0bf65fc8 +SIZE (PrusaSlicer/prusa3d-PrusaSlicer-version_2.7.4_GH0.tar.gz) = 65396083 diff --git a/cad/PrusaSlicer/files/patch-src_libslic3r_CMakeLists.txt b/cad/PrusaSlicer/files/patch-src_libslic3r_CMakeLists.txt index 6c3d971a3d87..a9e06edfca78 100644 --- a/cad/PrusaSlicer/files/patch-src_libslic3r_CMakeLists.txt +++ b/cad/PrusaSlicer/files/patch-src_libslic3r_CMakeLists.txt @@ -1,10 +1,10 @@ ---- src/libslic3r/CMakeLists.txt.orig 2024-02-29 13:03:32 UTC +--- src/libslic3r/CMakeLists.txt.orig 2024-04-05 09:25:31 UTC +++ src/libslic3r/CMakeLists.txt -@@ -575,7 +575,6 @@ target_link_libraries(libslic3r +@@ -576,7 +576,6 @@ target_link_libraries(libslic3r target_link_libraries(libslic3r libnest2d admesh - libcereal libigl miniz boost_libs diff --git a/cad/PrusaSlicer/files/patch-src_libslic3r_Format_STEP.cpp b/cad/PrusaSlicer/files/patch-src_libslic3r_Format_STEP.cpp new file mode 100644 index 000000000000..062214443e84 --- /dev/null +++ b/cad/PrusaSlicer/files/patch-src_libslic3r_Format_STEP.cpp @@ -0,0 +1,19 @@ +--- src/libslic3r/Format/STEP.cpp.orig 2024-04-05 18:42:53 UTC ++++ src/libslic3r/Format/STEP.cpp +@@ -39,7 +39,7 @@ LoadStepFn get_load_step_fn() + #endif + + if (!load_step_fn) { +- auto libpath = boost::dll::program_location().parent_path(); ++ auto libpath = boost::dll::program_location().parent_path().parent_path(); + #ifdef _WIN32 + libpath /= "OCCTWrapper.dll"; + HMODULE module = LoadLibraryW(libpath.wstring().c_str()); +@@ -61,6 +61,7 @@ LoadStepFn get_load_step_fn() + #elif __APPLE__ + load_step_fn = &load_step_internal; + #else ++ libpath /= "lib"; + libpath /= "OCCTWrapper.so"; + void *plugin_ptr = dlopen(libpath.c_str(), RTLD_NOW | RTLD_GLOBAL); + diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_ConfigWizard.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_ConfigWizard.cpp index ecba71fe5cf1..17e0bdf7b75c 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_ConfigWizard.cpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_ConfigWizard.cpp @@ -1,56 +1,56 @@ ---- src/slic3r/GUI/ConfigWizard.cpp.orig 2024-02-29 13:03:32 UTC +--- src/slic3r/GUI/ConfigWizard.cpp.orig 2024-04-05 09:25:31 UTC +++ src/slic3r/GUI/ConfigWizard.cpp @@ -69,7 +69,7 @@ #include "slic3r/GUI/I18N.hpp" #include "slic3r/Config/Version.hpp" -#if defined(__linux__) && defined(__WXGTK3__) +#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__WXGTK3__) #define wxLinux_gtk3 true #else #define wxLinux_gtk3 false @@ -596,7 +596,7 @@ void PageWelcome::set_run_reason(ConfigWizard::RunReas const bool data_empty = run_reason == ConfigWizard::RR_DATA_EMPTY; welcome_text->Show(data_empty); cbox_reset->Show(!data_empty); -#if defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION) +#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION) if (!DesktopIntegrationDialog::is_integrated()) cbox_integrate->Show(true); else @@ -1518,7 +1518,7 @@ PageDownloader::PageDownloader(ConfigWizard* parent) )); } --#ifdef __linux__ -+#if defined(__linux__) || defined(__FreeBSD__) +-#if defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION) append_text(wxString::Format(_L( "On Linux systems the process of registration also creates desktop integration files for this version of application." ))); @@ -1579,7 +1579,7 @@ bool DownloaderUtils::Worker::perform_register(const s } //key_full = "\"C:\\Program Files\\Prusa3D\\PrusaSlicer\\prusa-slicer-console.exe\" \"%1\""; key_full = key_string; -#elif __APPLE__ +#elif defined(__APPLE__) || defined(__FreeBSD__) // Apple registers for custom url in info.plist thus it has to be already registered since build. // The url will always trigger opening of prusaslicer and we have to check that user has allowed it. (GUI_App::MacOpenURL is the triggered method) - #else + #elif defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION) @@ -1598,7 +1598,7 @@ void DownloaderUtils::Worker::deregister() return; } key_full = key_string; -#elif __APPLE__ +#elif defined(__APPLE__) || defined(__FreeBSD__) // TODO - #else + #elif defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION) BOOST_LOG_TRIVIAL(debug) << "DesktopIntegrationDialog::undo_downloader_registration"; @@ -3063,7 +3063,7 @@ bool ConfigWizard::priv::apply_config(AppConfig *app_c if ((check_unsaved_preset_changes = install_bundles.size() > 0)) header = _L_PLURAL("A new vendor was installed and one of its printers will be activated", "New vendors were installed and one of theirs printers will be activated", install_bundles.size()); --#ifdef __linux__ -+#if defined(__linux__) || defined(__FreeBSD__) +-#if defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION) // Desktop integration on Linux BOOST_LOG_TRIVIAL(debug) << "ConfigWizard::priv::apply_config integrate_desktop" << page_welcome->integrate_desktop() << " perform_registration_linux " << page_downloader->m_downloader->get_perform_registration_linux(); if (page_welcome->integrate_desktop()) diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI__App.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI__App.cpp index 90a6a54b262b..3066068410c9 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI__App.cpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI__App.cpp @@ -1,128 +1,128 @@ ---- src/slic3r/GUI/GUI_App.cpp.orig 2024-02-29 13:03:32 UTC +--- src/slic3r/GUI/GUI_App.cpp.orig 2024-04-05 09:25:31 UTC +++ src/slic3r/GUI/GUI_App.cpp @@ -403,7 +403,7 @@ class SplashScreen : public wxSplashScreen (private) }; -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) bool static check_old_linux_datadir(const wxString& app_name) { // If we are on Linux and the datadir does not exist yet, look into the old // location where the datadir was before version 2.3. If we find it there, @@ -937,7 +937,7 @@ void GUI_App::init_app_config() // Mac : "~/Library/Application Support/Slic3r" if (data_dir().empty()) { - #ifndef __linux__ + #if !defined(__linux__) && !defined(__FreeBSD__) set_data_dir(wxStandardPaths::Get().GetUserDataDir().ToUTF8().data()); #else // Since version 2.3, config dir on Linux is in ${XDG_CONFIG_HOME}. @@ -1107,7 +1107,8 @@ bool GUI_App::on_init_inner() // Set initialization of image handlers before any UI actions - See GH issue #7469 wxInitAllImageHandlers(); - + // Silence warnings generated with wxWidgets 3.2 + wxSizerFlags::DisableConsistencyChecks(); #if defined(_WIN32) && ! defined(_WIN64) // Win32 32bit build. if (wxPlatformInfo::Get().GetArchName().substr(0, 2) == "64") { @@ -1135,7 +1136,7 @@ bool GUI_App::on_init_inner() wxCHECK_MSG(wxDirExists(resources_dir), false, wxString::Format("Resources path does not exist or is not a directory: %s", resources_dir)); -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) if (! check_old_linux_datadir(GetAppName())) { std::cerr << "Quitting, user chose to move their data to new location." << std::endl; return false; @@ -1240,7 +1241,7 @@ bool GUI_App::on_init_inner() if (!default_splashscreen_pos) // revert "restore_win_position" value if application wasn't crashed get_app_config()->set("restore_win_position", "1"); -#ifndef __linux__ +#if !defined(__linux__) && !defined(__FreeBSD__) wxYield(); #endif scrn->SetText(_L("Loading configuration")+ dots); @@ -1393,7 +1394,7 @@ bool GUI_App::on_init_inner() // and wxEVT_SET_FOCUS before GUI_App::post_init is called) wasn't called before GUI_App::post_init and OpenGL wasn't initialized. // Since issue #9774 Where same problem occured on MacOS Ventura, we decided to have this check on MacOS as well. -#if defined(__linux__) || defined(__APPLE__) +#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) if (!m_post_initialized && m_opengl_initialized) { #else if (!m_post_initialized) { @@ -2096,7 +2097,7 @@ bool GUI_App::switch_language() } } -#ifdef __linux__ +#if defined(__linux__) || (__FreeBSD__) static const wxLanguageInfo* linux_get_existing_locale_language(const wxLanguageInfo* language, const wxLanguageInfo* system_language) { @@ -2298,7 +2299,7 @@ bool GUI_App::load_language(wxString language, bool in m_language_info_best = wxLocale::FindLanguageInfo(best_language); BOOST_LOG_TRIVIAL(trace) << boost::format("Best translation language detected (may be different from user locales): %1%") % m_language_info_best->CanonicalName.ToUTF8().data(); } - #ifdef __linux__ + #if defined(__linux__) || defined(__FreeBSD__) wxString lc_all; if (wxGetEnv("LC_ALL", &lc_all) && ! lc_all.IsEmpty()) { // Best language returned by wxWidgets on Linux apparently does not respect LC_ALL. @@ -2307,6 +2308,7 @@ bool GUI_App::load_language(wxString language, bool in } #endif } + m_language_info_best = nullptr; } const wxLanguageInfo *language_info = language.empty() ? nullptr : wxLocale::FindLanguageInfo(language); @@ -2351,7 +2353,7 @@ bool GUI_App::load_language(wxString language, bool in } else if (m_language_info_system != nullptr && language_info->CanonicalName.BeforeFirst('_') == m_language_info_system->CanonicalName.BeforeFirst('_')) language_info = m_language_info_system; -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) // If we can't find this locale , try to use different one for the language // instead of just reporting that it is impossible to switch. if (! wxLocale::IsAvailable(language_info->Language)) { @@ -2471,7 +2473,7 @@ void GUI_App::add_config_menu(wxMenuBar *menu) local_menu->Append(config_id_base + ConfigMenuTakeSnapshot, _L("Take Configuration &Snapshot"), _L("Capture a configuration snapshot")); local_menu->Append(config_id_base + ConfigMenuUpdateConf, _L("Check for Configuration Updates"), _L("Check for configuration updates")); local_menu->Append(config_id_base + ConfigMenuUpdateApp, _L("Check for Application Updates"), _L("Check for new version of application")); -#if defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION) +#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION) //if (DesktopIntegrationDialog::integration_possible()) local_menu->Append(config_id_base + ConfigMenuDesktopIntegration, _L("Desktop Integration"), _L("Desktop Integration")); #endif //(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION) @@ -2519,7 +2521,7 @@ void GUI_App::add_config_menu(wxMenuBar *menu) case ConfigMenuUpdateApp: app_version_check(true); break; -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) case ConfigMenuDesktopIntegration: show_desktop_integration_dialog(); break; -@@ -3155,7 +3157,7 @@ void GUI_App::show_desktop_integration_dialog() +@@ -3149,7 +3151,7 @@ void GUI_App::show_desktop_integration_dialog() void GUI_App::show_desktop_integration_dialog() { -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) //wxCHECK_MSG(mainframe != nullptr, false, "Internal error: Main frame not created / null"); DesktopIntegrationDialog dialog(mainframe); dialog.ShowModal(); -@@ -3175,7 +3177,7 @@ void GUI_App::show_downloader_registration_dialog() +@@ -3169,7 +3171,7 @@ void GUI_App::show_downloader_registration_dialog() if (msg.ShowModal() == wxID_YES) { auto downloader_worker = new DownloaderUtils::Worker(nullptr); downloader_worker->perform_register(app_config->get("url_downloader_dest")); --#ifdef __linux__ -+#if defined(__linux__) || defined(__FreeBSD__) +-#if defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION) if (downloader_worker->get_perform_registration_linux()) DesktopIntegrationDialog::perform_downloader_desktop_integration(); - #endif // __linux__ + #endif //(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION) diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Plater.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Plater.cpp index 96030dedf76a..ca035e9a15a2 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Plater.cpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Plater.cpp @@ -1,38 +1,38 @@ ---- src/slic3r/GUI/Plater.cpp.orig 2024-02-29 13:03:32 UTC +--- src/slic3r/GUI/Plater.cpp.orig 2024-04-05 09:25:31 UTC +++ src/slic3r/GUI/Plater.cpp -@@ -2555,7 +2555,7 @@ std::vector Plater::priv::load_files(const std +@@ -2558,7 +2558,7 @@ std::vector Plater::priv::load_files(const std // when loading a project file. However, creating the dialog on heap causes issues on macOS, where it does not // appear at all. Therefore, we create the dialog on stack on Win and macOS, and on heap on Linux, which // is the only system that needed the workarounds in the first place. -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) auto progress_dlg = new wxProgressDialog(loading, "", 100, find_toplevel_parent(q), wxPD_APP_MODAL | wxPD_AUTO_HIDE); Slic3r::ScopeGuard([&progress_dlg](){ if (progress_dlg) progress_dlg->Destroy(); progress_dlg = nullptr; }); #else -@@ -2602,7 +2602,7 @@ std::vector Plater::priv::load_files(const std +@@ -2605,7 +2605,7 @@ std::vector Plater::priv::load_files(const std bool is_project_file = type_prusa; try { if (type_3mf || type_zip_amf) { -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) // On Linux Constructor of the ProgressDialog calls DisableOtherWindows() function which causes a disabling of all children of the find_toplevel_parent(q) // And a destructor of the ProgressDialog calls ReenableOtherWindows() function which revert previously disabled children. // But if printer technology will be changes during project loading, -@@ -4572,7 +4572,7 @@ void Plater::priv::on_right_click(RBtnEvent& evt) +@@ -4575,7 +4575,7 @@ void Plater::priv::on_right_click(RBtnEvent& evt) Vec2d mouse_position = evt.data.first; wxPoint position(static_cast(mouse_position.x()), static_cast(mouse_position.y())); -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) // For some reason on Linux the menu isn't displayed if position is // specified (even though the position is sane). position = wxDefaultPosition; -@@ -5425,7 +5425,7 @@ void Plater::load_project(const wxString& filename) +@@ -5428,7 +5428,7 @@ void Plater::load_project(const wxString& filename) p->reset(); - if (! load_files({ into_path(filename) }).empty()) { + if (! load_files((const std::vector){ into_path(filename) }).empty()) { // At least one file was loaded. p->set_project_filename(filename); // Save the names of active presets and project specific config into ProjectDirtyStateManager. diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Preferences.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Preferences.cpp index f5cd8fed5ba3..07094d21f323 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Preferences.cpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Preferences.cpp @@ -1,20 +1,20 @@ ---- src/slic3r/GUI/Preferences.cpp.orig 2023-12-12 14:21:21 UTC +--- src/slic3r/GUI/Preferences.cpp.orig 2024-04-05 09:25:31 UTC +++ src/slic3r/GUI/Preferences.cpp @@ -28,7 +28,7 @@ #ifdef WIN32 #include #endif // WIN32 --#ifdef __linux__ -+#if defined(__linux__) || defined(__FreeBSD__) +-#if defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION) #include "DesktopIntegrationDialog.hpp" - #endif //__linux__ + #endif //(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION) @@ -758,7 +758,7 @@ void PreferencesDialog::accept(wxEvent&) downloader->allow(it->second == "1"); if (!downloader->on_finish()) return; --#ifdef __linux__ -+#if defined(__linux__) || defined(__FreeBSD__) +-#if defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION) if( downloader->get_perform_registration_linux()) DesktopIntegrationDialog::perform_downloader_desktop_integration(); - #endif // __linux__ + #endif //(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION) diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Tab.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Tab.cpp index 0335a1119208..48846a70ff5a 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Tab.cpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Tab.cpp @@ -1,56 +1,56 @@ ---- src/slic3r/GUI/Tab.cpp.orig 2024-02-29 13:03:32 UTC +--- src/slic3r/GUI/Tab.cpp.orig 2024-04-05 09:25:31 UTC +++ src/slic3r/GUI/Tab.cpp @@ -279,7 +279,7 @@ void Tab::create_preset_tab() // Don't set the 2nd parameter to 1, making the sizer rubbery scalable in Y axis may lead // to wrong vertical size assigned to wxBitmapComboBoxes, see GH issue #7176. mode_sizer->Add(m_mode_sizer, 0, wxALIGN_RIGHT); - m_top_hsizer->Add(mode_sizer, 1, wxALIGN_CENTER_VERTICAL | wxRIGHT, wxOSX ? 15 : 10); + m_top_hsizer->Add(mode_sizer, 1, wxRIGHT, wxOSX ? 15 : 10); } // hide whole top sizer to correct layout later m_top_hsizer->ShowItems(false); @@ -296,7 +296,7 @@ void Tab::create_preset_tab() m_treectrl = new wxTreeCtrl(panel, wxID_ANY, wxDefaultPosition, wxSize(20 * m_em_unit, -1), wxTR_NO_BUTTONS | wxTR_HIDE_ROOT | wxTR_SINGLE | wxTR_NO_LINES | wxBORDER_SUNKEN | wxWANTS_CHARS); m_treectrl->SetFont(wxGetApp().normal_font()); -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) m_treectrl->SetBackgroundColour(m_parent->GetBackgroundColour()); #endif m_left_sizer->Add(m_treectrl, 1, wxEXPAND); @@ -310,7 +310,7 @@ void Tab::create_preset_tab() // This helps to process all the cursor key events on Windows in the tree control, // so that the cursor jumps to the last item. m_treectrl->Bind(wxEVT_TREE_SEL_CHANGED, [this](wxTreeEvent&) { -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) // Events queue is opposite On Linux. wxEVT_SET_FOCUS invokes after wxEVT_TREE_SEL_CHANGED, // and a result wxEVT_KILL_FOCUS doesn't invoke for the TextCtrls. // see https://github.com/prusa3d/PrusaSlicer/issues/5720 -@@ -3694,7 +3694,7 @@ void Tab::load_current_preset() +@@ -3700,7 +3700,7 @@ void Tab::load_current_preset() else #endif wxGetApp().tab_panel()->InsertPage(wxGetApp().tab_panel()->FindPage(this), tab, tab->title()); - #ifdef __linux__ // the tabs apparently need to be explicitly shown on Linux (pull request #1563) + #if defined(__linux__) || defined(__FreeBSD__) // the tabs apparently need to be explicitly shown on Linux (pull request #1563) int page_id = wxGetApp().tab_panel()->FindPage(tab); wxGetApp().tab_panel()->GetPage(page_id)->Show(true); #endif // __linux__ -@@ -4115,7 +4115,7 @@ bool Tab::tree_sel_change_delayed() +@@ -4121,7 +4121,7 @@ bool Tab::tree_sel_change_delayed() // There is a bug related to Ubuntu overlay scrollbars, see https://github.com/prusa3d/PrusaSlicer/issues/898 and https://github.com/prusa3d/PrusaSlicer/issues/952. // The issue apparently manifests when Show()ing a window with overlay scrollbars while the UI is frozen. For this reason, // we will Thaw the UI prematurely on Linux. This means destroing the no_updates object prematurely. -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) std::unique_ptr no_updates(new wxWindowUpdateLocker(this)); #else /* On Windows we use DoubleBuffering during rendering, -@@ -4161,7 +4161,7 @@ bool Tab::tree_sel_change_delayed() +@@ -4167,7 +4167,7 @@ bool Tab::tree_sel_change_delayed() if (wxGetApp().mainframe!=nullptr && wxGetApp().mainframe->is_active_and_shown_tab(this)) activate_selected_page(throw_if_canceled); - #ifdef __linux__ + #if defined(__linux__) || defined(__FreeBSD__) no_updates.reset(nullptr); #endif