diff --git a/localization/i18n/OrcaSlicer.pot b/localization/i18n/OrcaSlicer.pot index 92b25f26c0..bbdc0e59be 100644 --- a/localization/i18n/OrcaSlicer.pot +++ b/localization/i18n/OrcaSlicer.pot @@ -2293,8 +2293,6 @@ msgstr "" msgid "%s has been removed." msgstr "" -msgid "Switching application language" -msgstr "" msgid "Select the language" msgstr "" @@ -8294,8 +8292,6 @@ msgstr "" msgid "Language selection" msgstr "" -msgid "Switching application language while some presets are modified." -msgstr "" msgid "Asia-Pacific" msgstr "" diff --git a/localization/i18n/ca/OrcaSlicer_ca.po b/localization/i18n/ca/OrcaSlicer_ca.po index 91ba0e2f2a..373eb6e9fd 100644 --- a/localization/i18n/ca/OrcaSlicer_ca.po +++ b/localization/i18n/ca/OrcaSlicer_ca.po @@ -2522,8 +2522,6 @@ msgstr "Hi ha una actualització disponible. Obriu el quadre de diàleg del paqu msgid "%s has been removed." msgstr "%s s'ha eliminat." -msgid "Switching application language" -msgstr "Canvi d'idioma de l'aplicació" msgid "Select the language" msgstr "Seleccioneu l'idioma" @@ -8924,8 +8922,6 @@ msgstr "Voleu continuar?" msgid "Language selection" msgstr "Selecció d'idiomes" -msgid "Switching application language while some presets are modified." -msgstr "Canviant l'idioma de l'aplicació mentre es modifiquen alguns perfils." msgid "Asia-Pacific" msgstr "Àsia-Pacífic" diff --git a/localization/i18n/cs/OrcaSlicer_cs.po b/localization/i18n/cs/OrcaSlicer_cs.po index 9884888723..b0d64c8005 100644 --- a/localization/i18n/cs/OrcaSlicer_cs.po +++ b/localization/i18n/cs/OrcaSlicer_cs.po @@ -2482,8 +2482,6 @@ msgstr "Je k dispozici aktualizace. Otevřete dialog balíčku předvoleb a prov msgid "%s has been removed." msgstr "%s bylo odstraněno." -msgid "Switching application language" -msgstr "Přepnutí jazyka aplikace" msgid "Select the language" msgstr "Zvolte jazyk" @@ -8882,8 +8880,6 @@ msgstr "Chcete pokračovat?" msgid "Language selection" msgstr "Výběr jazyka" -msgid "Switching application language while some presets are modified." -msgstr "Přepnutí jazyka aplikace, když jsou některé předvolby upraveny." msgid "Asia-Pacific" msgstr "Asie-Pacifik" diff --git a/localization/i18n/de/OrcaSlicer_de.po b/localization/i18n/de/OrcaSlicer_de.po index bb096c0a23..bd25405cc3 100644 --- a/localization/i18n/de/OrcaSlicer_de.po +++ b/localization/i18n/de/OrcaSlicer_de.po @@ -2430,8 +2430,6 @@ msgstr "Es ist ein Update verfügbar. Öffnen Sie den Profilbündel-Dialog, um e msgid "%s has been removed." msgstr "%s wurde entfernt." -msgid "Switching application language" -msgstr "Wechsel der Sprache" msgid "Select the language" msgstr "Sprache wählen" @@ -8754,8 +8752,6 @@ msgstr "Möchten Sie fortfahren?" msgid "Language selection" msgstr "Sprachauswahl" -msgid "Switching application language while some presets are modified." -msgstr "Umschalten der Anwendungssprache, während einige Profile geändert werden." msgid "Asia-Pacific" msgstr "Asien-Pazifik" diff --git a/localization/i18n/en/OrcaSlicer_en.po b/localization/i18n/en/OrcaSlicer_en.po index b949aea730..35c7f8a87a 100644 --- a/localization/i18n/en/OrcaSlicer_en.po +++ b/localization/i18n/en/OrcaSlicer_en.po @@ -2289,8 +2289,6 @@ msgstr "" msgid "%s has been removed." msgstr "" -msgid "Switching application language" -msgstr "" msgid "Select the language" msgstr "" @@ -8290,8 +8288,6 @@ msgstr "" msgid "Language selection" msgstr "" -msgid "Switching application language while some presets are modified." -msgstr "" msgid "Asia-Pacific" msgstr "" diff --git a/localization/i18n/es/OrcaSlicer_es.po b/localization/i18n/es/OrcaSlicer_es.po index e1d86c2fe8..efe4c7dbcd 100644 --- a/localization/i18n/es/OrcaSlicer_es.po +++ b/localization/i18n/es/OrcaSlicer_es.po @@ -2356,8 +2356,6 @@ msgstr "Hay una actualización disponible. Abra el cuadro de diálogo del paquet msgid "%s has been removed." msgstr "Se ha eliminado %s." -msgid "Switching application language" -msgstr "Cambiando el idioma de la aplicación" msgid "Select the language" msgstr "Seleccionar el idioma" @@ -8529,8 +8527,6 @@ msgstr "¿Quieres continuar?" msgid "Language selection" msgstr "Selección de idiomas" -msgid "Switching application language while some presets are modified." -msgstr "Cambiando idioma de la aplicación mientras se modifican algunos perfiles." msgid "Asia-Pacific" msgstr "Asia-Pacífico" diff --git a/localization/i18n/eu/OrcaSlicer_eu.po b/localization/i18n/eu/OrcaSlicer_eu.po index a475d76ab2..698941018e 100644 --- a/localization/i18n/eu/OrcaSlicer_eu.po +++ b/localization/i18n/eu/OrcaSlicer_eu.po @@ -2390,8 +2390,6 @@ msgstr "Eguneratze bat dago erabilgarri. Ireki aurrezarpen-paketeen elkarrizketa msgid "%s has been removed." msgstr "%s kendu da." -msgid "Switching application language" -msgstr "Aplikazioaren hizkuntza aldatzen" msgid "Select the language" msgstr "Hautatu hizkuntza" @@ -8610,8 +8608,6 @@ msgstr "Jarraitu nahi duzu?" msgid "Language selection" msgstr "Hizkuntza-hautaketa" -msgid "Switching application language while some presets are modified." -msgstr "Aplikazioaren hizkuntza aldatzen ari da aurrezarpen batzuk aldatuta dauden bitartean." msgid "Asia-Pacific" msgstr "Asia-Pazifikoa" diff --git a/localization/i18n/fr/OrcaSlicer_fr.po b/localization/i18n/fr/OrcaSlicer_fr.po index de356edd7d..6344696234 100644 --- a/localization/i18n/fr/OrcaSlicer_fr.po +++ b/localization/i18n/fr/OrcaSlicer_fr.po @@ -2414,8 +2414,6 @@ msgstr "Une mise à jour est disponible. Ouvrez la boîte de dialogue du paquet msgid "%s has been removed." msgstr "%s a été supprimé." -msgid "Switching application language" -msgstr "Changer la langue de l'application" msgid "Select the language" msgstr "Sélectionner la langue" @@ -8678,8 +8676,6 @@ msgstr "Voulez-vous continuer ?" msgid "Language selection" msgstr "Sélection de la langue" -msgid "Switching application language while some presets are modified." -msgstr "Changement de langue de l’application alors que certains préréglages sont modifiés." msgid "Asia-Pacific" msgstr "Asie-Pacifique" diff --git a/localization/i18n/hu/OrcaSlicer_hu.po b/localization/i18n/hu/OrcaSlicer_hu.po index 2c00949e15..78c06dd4c0 100644 --- a/localization/i18n/hu/OrcaSlicer_hu.po +++ b/localization/i18n/hu/OrcaSlicer_hu.po @@ -2460,8 +2460,6 @@ msgstr "Frissítés érhető el. Nyisd meg a beállításcsomag párbeszédablak msgid "%s has been removed." msgstr "%s eltávolítva." -msgid "Switching application language" -msgstr "Alkalmazás nyelvének váltása" msgid "Select the language" msgstr "Válaszd ki a nyelvet" @@ -8806,8 +8804,6 @@ msgstr "Szeretnéd folytatni?" msgid "Language selection" msgstr "Nyelv kiválasztása" -msgid "Switching application language while some presets are modified." -msgstr "Alkalmazás nyelvének átváltása, miközben egyes beállítások módosultak." msgid "Asia-Pacific" msgstr "Ázsia-Csendes-óceáni térség" diff --git a/localization/i18n/it/OrcaSlicer_it.po b/localization/i18n/it/OrcaSlicer_it.po index 1aa2f15701..cf5099bca3 100644 --- a/localization/i18n/it/OrcaSlicer_it.po +++ b/localization/i18n/it/OrcaSlicer_it.po @@ -2466,8 +2466,6 @@ msgstr "È disponibile un aggiornamento. Apri la finestra di dialogo del bundle msgid "%s has been removed." msgstr "%s è stato rimosso." -msgid "Switching application language" -msgstr "Cambio lingua applicazione" msgid "Select the language" msgstr "Seleziona la lingua" @@ -8807,8 +8805,6 @@ msgstr "Vuoi continuare?" msgid "Language selection" msgstr "Selezione lingua" -msgid "Switching application language while some presets are modified." -msgstr "Cambio lingua applicazione durante la modifica di alcuni profili." msgid "Asia-Pacific" msgstr "Asia-Pacifico" diff --git a/localization/i18n/ja/OrcaSlicer_ja.po b/localization/i18n/ja/OrcaSlicer_ja.po index 9067928361..99cd0d0a83 100644 --- a/localization/i18n/ja/OrcaSlicer_ja.po +++ b/localization/i18n/ja/OrcaSlicer_ja.po @@ -2473,8 +2473,6 @@ msgstr "アップデートが利用可能です。プリセットバンドルの msgid "%s has been removed." msgstr "%sを削除しました。" -msgid "Switching application language" -msgstr "アプリケーション言語の切り替え" msgid "Select the language" msgstr "言語を選択" @@ -8825,8 +8823,6 @@ msgstr "続行しますか?" msgid "Language selection" msgstr "言語選択" -msgid "Switching application language while some presets are modified." -msgstr "アプリケーション言語を切り替える時に、プリセットの変更があります" msgid "Asia-Pacific" msgstr "アジア太平洋地域" diff --git a/localization/i18n/ko/OrcaSlicer_ko.po b/localization/i18n/ko/OrcaSlicer_ko.po index fef0a09398..8d12c90228 100644 --- a/localization/i18n/ko/OrcaSlicer_ko.po +++ b/localization/i18n/ko/OrcaSlicer_ko.po @@ -2481,8 +2481,6 @@ msgstr "사용 가능한 업데이트가 있습니다. 사전 설정 번들 대 msgid "%s has been removed." msgstr "%s이(가) 제거되었습니다." -msgid "Switching application language" -msgstr "응용 프로그램 언어 전환" msgid "Select the language" msgstr "언어 선택" @@ -8860,8 +8858,6 @@ msgstr "계속하시겠습니까?" msgid "Language selection" msgstr "언어 선택" -msgid "Switching application language while some presets are modified." -msgstr "일부 사전 설정이 수정되는 동안 응용 프로그램 언어를 전환합니다." msgid "Asia-Pacific" msgstr "아시아 태평양" diff --git a/localization/i18n/lt/OrcaSlicer_lt.po b/localization/i18n/lt/OrcaSlicer_lt.po index 80273427f0..67d02bef6d 100644 --- a/localization/i18n/lt/OrcaSlicer_lt.po +++ b/localization/i18n/lt/OrcaSlicer_lt.po @@ -2449,8 +2449,6 @@ msgstr "Yra prieinamas atnaujinimas. Atidarykite profilių paketo dialogo langą msgid "%s has been removed." msgstr "%s buvo pašalintas." -msgid "Switching application language" -msgstr "Perjungiama programos kalba" msgid "Select the language" msgstr "Pasirinkite kalbą" @@ -8797,8 +8795,6 @@ msgstr "Ar norite tęsti?" msgid "Language selection" msgstr "Kalbos pasirinkimas" -msgid "Switching application language while some presets are modified." -msgstr "Keičiama programos kalba, kai yra pakeistų profilių." msgid "Asia-Pacific" msgstr "Azija-Ramusis vandenynas" diff --git a/localization/i18n/nl/OrcaSlicer_nl.po b/localization/i18n/nl/OrcaSlicer_nl.po index 720f4ba6f5..eff0fdc6b0 100644 --- a/localization/i18n/nl/OrcaSlicer_nl.po +++ b/localization/i18n/nl/OrcaSlicer_nl.po @@ -2679,8 +2679,6 @@ msgstr "Er is een update beschikbaar. Open het dialoogvenster voor de voorinstel msgid "%s has been removed." msgstr "%s is verwijderd." -msgid "Switching application language" -msgstr "De taal van de applicatie wordt aangepast" msgid "Select the language" msgstr "Kies de taal" @@ -9602,8 +9600,6 @@ msgstr "Wilt u doorgaan?" msgid "Language selection" msgstr "Taal selectie" -msgid "Switching application language while some presets are modified." -msgstr "De taal van de toepassing aanpaasen terwijl sommige voorinstellingen zijn aangepast." msgid "Asia-Pacific" msgstr "Azië-Pacific" diff --git a/localization/i18n/pl/OrcaSlicer_pl.po b/localization/i18n/pl/OrcaSlicer_pl.po index 3d7fb083ef..6f74f4b602 100644 --- a/localization/i18n/pl/OrcaSlicer_pl.po +++ b/localization/i18n/pl/OrcaSlicer_pl.po @@ -2512,8 +2512,6 @@ msgstr "Dostępna jest aktualizacja. Otwórz okno pakietu profili, aby ją zains msgid "%s has been removed." msgstr "%s został usunięty." -msgid "Switching application language" -msgstr "Zmiana języka aplikacji" msgid "Select the language" msgstr "Wybierz język" @@ -9016,8 +9014,6 @@ msgstr "Czy kontynuować?" msgid "Language selection" msgstr "Wybór języka" -msgid "Switching application language while some presets are modified." -msgstr "Zmiana języka aplikacji przy jednoczesnym istniejących zmodyfikowanych ustawieniach." msgid "Asia-Pacific" msgstr "Azja i Pacyfik" diff --git a/localization/i18n/pt_BR/OrcaSlicer_pt_BR.po b/localization/i18n/pt_BR/OrcaSlicer_pt_BR.po index 066b8b310b..6f7bf473c0 100644 --- a/localization/i18n/pt_BR/OrcaSlicer_pt_BR.po +++ b/localization/i18n/pt_BR/OrcaSlicer_pt_BR.po @@ -2356,8 +2356,6 @@ msgstr "Há uma atualização disponível. Abra a caixa de diálogo do pacote de msgid "%s has been removed." msgstr "%s foi removido." -msgid "Switching application language" -msgstr "Alternando o idioma do aplicativo" msgid "Select the language" msgstr "Selecione o idioma" @@ -8572,8 +8570,6 @@ msgstr "Você deseja continuar?" msgid "Language selection" msgstr "Seleção de idioma" -msgid "Switching application language while some presets are modified." -msgstr "Alternando idioma do aplicativo enquanto algumas predefinições são modificadas." msgid "Asia-Pacific" msgstr "Ásia-Pacífico" diff --git a/localization/i18n/ru/OrcaSlicer_ru.po b/localization/i18n/ru/OrcaSlicer_ru.po index b5e6baffe0..2e33546ae8 100644 --- a/localization/i18n/ru/OrcaSlicer_ru.po +++ b/localization/i18n/ru/OrcaSlicer_ru.po @@ -2431,8 +2431,6 @@ msgstr "Доступно обновление. Проверьте меню па msgid "%s has been removed." msgstr "%s был удалён." -msgid "Switching application language" -msgstr "Изменение языка приложения" msgid "Select the language" msgstr "Выбор языка" @@ -8852,8 +8850,6 @@ msgstr "Хотите продолжить?" msgid "Language selection" msgstr "Выбор языка" -msgid "Switching application language while some presets are modified." -msgstr "Смена языка приложения при изменении некоторых профилей." msgid "Asia-Pacific" msgstr "Азиатско-Тихоокеанский" diff --git a/localization/i18n/sv/OrcaSlicer_sv.po b/localization/i18n/sv/OrcaSlicer_sv.po index b4e3bf51bc..b9aa481d4c 100644 --- a/localization/i18n/sv/OrcaSlicer_sv.po +++ b/localization/i18n/sv/OrcaSlicer_sv.po @@ -2767,8 +2767,6 @@ msgstr "Det finns en uppdatering tillgänglig. Öppna dialogrutan för förinst msgid "%s has been removed." msgstr "%s har tagits bort." -msgid "Switching application language" -msgstr "Byt applikationsspråk" msgid "Select the language" msgstr "Välj språk" @@ -9694,8 +9692,6 @@ msgstr "Fortsätta?" msgid "Language selection" msgstr "Språkval" -msgid "Switching application language while some presets are modified." -msgstr "Byter språk medans inställningarna ändras." msgid "Asia-Pacific" msgstr "Asien-Stillahavsområdet" diff --git a/localization/i18n/th/OrcaSlicer_th.po b/localization/i18n/th/OrcaSlicer_th.po index 935bb83a3b..ee7430015e 100644 --- a/localization/i18n/th/OrcaSlicer_th.po +++ b/localization/i18n/th/OrcaSlicer_th.po @@ -2456,8 +2456,6 @@ msgstr "มีอัปเดตพร้อมใช้งาน เปิด msgid "%s has been removed." msgstr "ลบ %s แล้ว" -msgid "Switching application language" -msgstr "การเปลี่ยนภาษาของแอปพลิเคชัน" msgid "Select the language" msgstr "เลือกภาษา" @@ -8758,8 +8756,6 @@ msgstr "ต้องการดำเนินการต่อหรือไ msgid "Language selection" msgstr "การเลือกภาษา" -msgid "Switching application language while some presets are modified." -msgstr "การสลับภาษาของแอปพลิเคชันในขณะที่มีการแก้ไขค่าที่ตั้งไว้บางส่วน" msgid "Asia-Pacific" msgstr "เอเชียแปซิฟิก" diff --git a/localization/i18n/tr/OrcaSlicer_tr.po b/localization/i18n/tr/OrcaSlicer_tr.po index 02d54aa39f..0cf9d57412 100644 --- a/localization/i18n/tr/OrcaSlicer_tr.po +++ b/localization/i18n/tr/OrcaSlicer_tr.po @@ -2480,8 +2480,6 @@ msgstr "Kullanılabilir bir güncelleme var. Güncellemek için ön ayar paketi msgid "%s has been removed." msgstr "%s kaldırıldı." -msgid "Switching application language" -msgstr "Uygulama dilini değiştirme" msgid "Select the language" msgstr "Dili seçin" @@ -8860,8 +8858,6 @@ msgstr "Devam etmek istiyor musun?" msgid "Language selection" msgstr "Dil seçimi" -msgid "Switching application language while some presets are modified." -msgstr "Bazı ön ayarlar değiştirilirken uygulama dilinin değiştirilmesi." msgid "Asia-Pacific" msgstr "Asya Pasifik" diff --git a/localization/i18n/uk/OrcaSlicer_uk.po b/localization/i18n/uk/OrcaSlicer_uk.po index d72a1f9792..ec9e97bae0 100644 --- a/localization/i18n/uk/OrcaSlicer_uk.po +++ b/localization/i18n/uk/OrcaSlicer_uk.po @@ -2424,8 +2424,6 @@ msgstr "Доступне оновлення. Відкрийте вікно на msgid "%s has been removed." msgstr "%s вилучено." -msgid "Switching application language" -msgstr "Зміна мови програми" msgid "Select the language" msgstr "Вибрати мову" @@ -8874,8 +8872,6 @@ msgstr "Ви хочете продовжувати?" msgid "Language selection" msgstr "Вибір мови" -msgid "Switching application language while some presets are modified." -msgstr "Зміна мови програми при зміні деяких профілів." msgid "Asia-Pacific" msgstr "Азіатсько-Тихоокеанський регіон" diff --git a/localization/i18n/vi/OrcaSlicer_vi.po b/localization/i18n/vi/OrcaSlicer_vi.po index a0758d51ad..a80f47cfc1 100644 --- a/localization/i18n/vi/OrcaSlicer_vi.po +++ b/localization/i18n/vi/OrcaSlicer_vi.po @@ -2568,8 +2568,6 @@ msgstr "Có bản cập nhật khả dụng. Hãy mở hộp thoại gói cài msgid "%s has been removed." msgstr "%s đã bị xóa." -msgid "Switching application language" -msgstr "Đang chuyển ngôn ngữ ứng dụng" msgid "Select the language" msgstr "Chọn ngôn ngữ" @@ -9309,8 +9307,6 @@ msgstr "Bạn có muốn tiếp tục?" msgid "Language selection" msgstr "Chọn ngôn ngữ" -msgid "Switching application language while some presets are modified." -msgstr "Đang chuyển đổi ngôn ngữ ứng dụng trong khi một số preset đã được chỉnh sửa." msgid "Asia-Pacific" msgstr "Châu Á-Thái Bình Dương" diff --git a/localization/i18n/zh_CN/OrcaSlicer_zh_CN.po b/localization/i18n/zh_CN/OrcaSlicer_zh_CN.po index 7c474031c9..faa3419ae5 100644 --- a/localization/i18n/zh_CN/OrcaSlicer_zh_CN.po +++ b/localization/i18n/zh_CN/OrcaSlicer_zh_CN.po @@ -2361,8 +2361,6 @@ msgstr "有更新可用。打开预设包对话框进行更新。" msgid "%s has been removed." msgstr "%s 已被移除。" -msgid "Switching application language" -msgstr "切换应用程序语言" msgid "Select the language" msgstr "选择语言" @@ -8587,8 +8585,6 @@ msgstr "是否继续?" msgid "Language selection" msgstr "语言选择" -msgid "Switching application language while some presets are modified." -msgstr "在切换应用语言之前发现某些参数预设有更改。" msgid "Asia-Pacific" msgstr "亚太" diff --git a/localization/i18n/zh_TW/OrcaSlicer_zh_TW.po b/localization/i18n/zh_TW/OrcaSlicer_zh_TW.po index 83b22ca029..8f17cfdc5d 100644 --- a/localization/i18n/zh_TW/OrcaSlicer_zh_TW.po +++ b/localization/i18n/zh_TW/OrcaSlicer_zh_TW.po @@ -2425,8 +2425,6 @@ msgstr "有可用的更新。請開啟預設組合對話框進行更新。" msgid "%s has been removed." msgstr "%s 已移除。" -msgid "Switching application language" -msgstr "切換應用程式語言" msgid "Select the language" msgstr "選擇語言" @@ -8753,8 +8751,6 @@ msgstr "是否繼續?" msgid "Language selection" msgstr "語言選擇" -msgid "Switching application language while some presets are modified." -msgstr "在切換應用程式語言之前發現某些參數預設有更改。" msgid "Asia-Pacific" msgstr "亞太" diff --git a/src/libslic3r/CMakeLists.txt b/src/libslic3r/CMakeLists.txt index e860f50280..ffc6b5cee6 100644 --- a/src/libslic3r/CMakeLists.txt +++ b/src/libslic3r/CMakeLists.txt @@ -558,6 +558,12 @@ if (_opts) target_compile_options(libslic3r_cgal PRIVATE "${_opts_bad}") endif() +if (IS_CLANG_CL) + # CGAL passes /fp:strict /fp:except-. clang-cl reports the second as overriding part of + # the first; the settings cc1 receives are the same ones MSVC produces from that pair. + target_compile_options(libslic3r_cgal PRIVATE -Wno-overriding-option) +endif () + target_link_libraries(libslic3r_cgal PRIVATE ${_cgal_tgt} admesh libigl mcut boost_libs) if (MSVC AND "${CMAKE_SIZEOF_VOID_P}" STREQUAL "4") # 32 bit MSVC workaround diff --git a/src/libslic3r/Emboss.cpp b/src/libslic3r/Emboss.cpp index ef144b48d3..34d9a93590 100644 --- a/src/libslic3r/Emboss.cpp +++ b/src/libslic3r/Emboss.cpp @@ -968,10 +968,10 @@ EmbossStyles Emboss::get_font_list_by_register() { } // TODO: Fix global function -bool CALLBACK EnumFamCallBack(LPLOGFONT lplf, - LPNEWTEXTMETRIC lpntm, - DWORD FontType, - LPVOID aFontList) +int CALLBACK EnumFamCallBack(const LOGFONT *lplf, + const TEXTMETRIC *lpntm, + DWORD FontType, + LPARAM aFontList) { std::vector *fontList = (std::vector *) (aFontList); @@ -988,7 +988,7 @@ EmbossStyles Emboss::get_font_list_by_enumeration() { HDC hDC = GetDC(NULL); std::vector font_names; - EnumFontFamilies(hDC, (LPCTSTR) NULL, (FONTENUMPROC) EnumFamCallBack, + EnumFontFamilies(hDC, (LPCTSTR) NULL, EnumFamCallBack, (LPARAM) &font_names); EmbossStyles font_list; diff --git a/src/libslic3r/Fill/FillAdaptive.cpp b/src/libslic3r/Fill/FillAdaptive.cpp index 344bb529f0..dbaa1f2ac9 100644 --- a/src/libslic3r/Fill/FillAdaptive.cpp +++ b/src/libslic3r/Fill/FillAdaptive.cpp @@ -1395,8 +1395,8 @@ void Filler::_fill_surface_single( } #endif /* ADAPTIVE_CUBIC_INFILL_DEBUG_OUTPUT */ - const auto hook_length = coordf_t(std::min(std::numeric_limits::max(), scale_(params.anchor_length))); - const auto hook_length_max = coordf_t(std::min(std::numeric_limits::max(), scale_(params.anchor_length_max))); + const auto hook_length = coordf_t(scale_(params.anchor_length)); + const auto hook_length_max = coordf_t(scale_(params.anchor_length_max)); Polylines all_polylines_with_hooks = all_polylines.size() > 1 ? connect_lines_using_hooks(std::move(all_polylines), expolygon, this->spacing, hook_length, hook_length_max) : std::move(all_polylines); diff --git a/src/libslic3r/GCode/ToolOrderUtils.cpp b/src/libslic3r/GCode/ToolOrderUtils.cpp index 4e2934d967..4a67477d24 100644 --- a/src/libslic3r/GCode/ToolOrderUtils.cpp +++ b/src/libslic3r/GCode/ToolOrderUtils.cpp @@ -910,7 +910,7 @@ namespace Slic3r unsigned int iterations = (1 << all_extruders.size()); unsigned int final_state = iterations - 1; - std::vector>cache(iterations, std::vector(all_extruders.size(), 0x7fffffff)); + std::vector>cache(iterations, std::vector(all_extruders.size(), std::numeric_limits::max())); std::vector>prev(iterations, std::vector(all_extruders.size(), -1)); cache[1][0] = 0.; for (unsigned int state = 0; state < iterations; ++state) { diff --git a/src/libslic3r/Line.cpp b/src/libslic3r/Line.cpp index c74df3aa59..94453e18f7 100644 --- a/src/libslic3r/Line.cpp +++ b/src/libslic3r/Line.cpp @@ -30,8 +30,8 @@ bool Line::intersection_infinite(const Line &other, Point* point) const return false; double t1 = cross2(v12, v2) / denom; Vec2d result = (a1 + t1 * v1); - if (result.x() > std::numeric_limits::max() || result.x() < std::numeric_limits::lowest() || - result.y() > std::numeric_limits::max() || result.y() < std::numeric_limits::lowest()) { + if (result.x() > double(std::numeric_limits::max()) || result.x() < double(std::numeric_limits::lowest()) || + result.y() > double(std::numeric_limits::max()) || result.y() < double(std::numeric_limits::lowest())) { // Intersection has at least one of the coordinates much bigger (or smaller) than coord_t maximum value (or minimum). // So it can not be stored into the Point without integer overflows. That could mean that input lines are parallel or near parallel. return false; diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index e147356ea6..54378b3b16 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -1511,13 +1511,9 @@ bool PrintObject::invalidate_state_by_config_options( steps.emplace_back(posPerimeters); steps.emplace_back(posSupportMaterial); } else if (opt_key == "bridge_flow" || opt_key == "internal_bridge_flow") { - if (m_config.support_top_z_distance > 0.) { - // Only invalidate due to bridging if bridging is enabled. - // If later "support_top_z_distance" is modified, the complete PrintObject is invalidated anyway. - steps.emplace_back(posPerimeters); - steps.emplace_back(posInfill); - steps.emplace_back(posSupportMaterial); - } + steps.emplace_back(posPerimeters); + steps.emplace_back(posInfill); + steps.emplace_back(posSupportMaterial); } else if ( opt_key == "wall_generator" || opt_key == "wall_transition_length" @@ -1635,7 +1631,9 @@ bool PrintObject::invalidate_step(PrintObjectStep step) bool PrintObject::invalidate_all_steps() { // First call the "invalidate" functions, which may cancel background processing. - bool result = Inherited::invalidate_all_steps() | m_print->invalidate_all_steps(); + const bool inherited_invalidated = Inherited::invalidate_all_steps(); + const bool print_invalidated = m_print->invalidate_all_steps(); + bool result = inherited_invalidated || print_invalidated; // Then reset some of the depending values. m_slicing_params.valid = false; return result; diff --git a/src/libslic3r/SLAPrint.cpp b/src/libslic3r/SLAPrint.cpp index cdefd3e10e..eb37ca578c 100644 --- a/src/libslic3r/SLAPrint.cpp +++ b/src/libslic3r/SLAPrint.cpp @@ -1007,7 +1007,9 @@ bool SLAPrintObject::invalidate_step(SLAPrintObjectStep step) bool SLAPrintObject::invalidate_all_steps() { - return Inherited::invalidate_all_steps() | m_print->invalidate_all_steps(); + const bool inherited_invalidated = Inherited::invalidate_all_steps(); + const bool print_invalidated = m_print->invalidate_all_steps(); + return inherited_invalidated || print_invalidated; } double SLAPrintObject::get_elevation() const { diff --git a/src/slic3r/GUI/DeviceCore/DevMapping.cpp b/src/slic3r/GUI/DeviceCore/DevMapping.cpp index 165492c9f6..0040bb05f2 100644 --- a/src/slic3r/GUI/DeviceCore/DevMapping.cpp +++ b/src/slic3r/GUI/DeviceCore/DevMapping.cpp @@ -1,3 +1,5 @@ +#include + #include #include "DevMapping.h" #include "DevFilaSystem.h" @@ -270,7 +272,7 @@ namespace Slic3r std::set picked_tar; for (int k = 0; k < distance_map.size(); k++) { - float min_val = INT_MAX; + float min_val = std::numeric_limits::max(); int picked_src_idx = -1; int picked_tar_idx = -1; for (int i = 0; i < distance_map.size(); i++) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 556faaa763..676d310f7b 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -5059,7 +5059,21 @@ void GLCanvas3D::do_move(const std::string& snapshot_type) } //BBS: notify instance updates to part plater list - m_selection.notify_instance_update(-1, 0); + // Only what moved: the selected instances, or every instance of an object one of whose + // parts moved. Notifying a plate about an instance that stayed put invalidates its slice + // result, and notifying instance 0 alone left a moved copy unregistered on its new plate. + { + std::set> notified; + for (unsigned int i : m_selection.get_volume_idxs()) { + const GLVolume* v = m_volumes.volumes[i]; + const int object_idx = v->object_idx(); + if (object_idx < 0 || object_idx >= static_cast(m_model->objects.size())) + continue; + const std::pair key(object_idx, selection_mode == Selection::Volume ? -1 : v->instance_idx()); + if (notified.insert(key).second) + m_selection.notify_instance_update(key.first, key.second); + } + } // Fixes sinking/flying instances (snaps object to buildplate) for (const std::pair& i : done) { diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 6d08f052da..df2d1fccc0 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -7769,21 +7769,6 @@ void GUI_App::stop_http_server() m_http_server.stop(); } -void GUI_App::switch_staff_pick(bool on) -{ - mainframe->m_webview->SendDesignStaffpick(on); -} - -bool GUI_App::switch_language() -{ - if (select_language()) { - recreate_GUI(_L("Switching application language") + dots); - return true; - } else { - return false; - } -} - #ifdef __linux__ static const wxLanguageInfo* linux_get_existing_locale_language(const wxLanguageInfo* language, const wxLanguageInfo* system_language) @@ -7878,72 +7863,6 @@ int GUI_App::GetSingleChoiceIndex(const wxString& message, #endif } -// select language from the list of installed languages -bool GUI_App::select_language() -{ - wxArrayString translations = wxTranslations::Get()->GetAvailableTranslations(SLIC3R_APP_KEY); - std::vector language_infos; - language_infos.emplace_back(wxLocale::GetLanguageInfo(wxLANGUAGE_ENGLISH)); - for (size_t i = 0; i < translations.GetCount(); ++ i) { - const wxLanguageInfo *langinfo = wxLocale::FindLanguageInfo(translations[i]); - if (langinfo != nullptr) - language_infos.emplace_back(langinfo); - } - sort_remove_duplicates(language_infos); - std::sort(language_infos.begin(), language_infos.end(), [](const wxLanguageInfo* l, const wxLanguageInfo* r) { return l->Description < r->Description; }); - - wxArrayString names; - names.Alloc(language_infos.size()); - - // Some valid language should be selected since the application start up. - const wxString active_language_code = current_language_code(); - const wxLanguageInfo* active_language_info = wxLocale::FindLanguageInfo(active_language_code); - const wxLanguage current_language = active_language_info != nullptr ? wxLanguage(active_language_info->Language) : wxLanguage(m_wxLocale->GetLanguage()); - const wxString active_lang_prefix = active_language_code.BeforeFirst('_'); - int init_selection = -1; - int init_selection_alt = -1; - int init_selection_default = -1; - for (size_t i = 0; i < language_infos.size(); ++ i) { - if (wxLanguage(language_infos[i]->Language) == current_language) - // The dictionary matches the active language and country. - init_selection = i; - else if ((language_infos[i]->CanonicalName.BeforeFirst('_') == active_lang_prefix) || - // if the active language is Slovak, mark the Czech language as active. - (language_infos[i]->CanonicalName.BeforeFirst('_') == "cs" && active_lang_prefix == "sk")) - // The dictionary matches the active language, it does not necessarily match the country. - init_selection_alt = i; - if (language_infos[i]->CanonicalName.BeforeFirst('_') == "en") - // This will be the default selection if the active language does not match any dictionary. - init_selection_default = i; - names.Add(language_infos[i]->Description); - } - if (init_selection == -1) - // This is the dictionary matching the active language. - init_selection = init_selection_alt; - if (init_selection != -1) - // This is the language to highlight in the choice dialog initially. - init_selection_default = init_selection; - - const long index = GetSingleChoiceIndex(_L("Select the language"), _L("Language"), names, init_selection_default); - // Try to load a new language. - if (index != -1 && (init_selection == -1 || init_selection != index)) { - const wxLanguageInfo *new_language_info = language_infos[index]; - if (this->load_language(new_language_info->CanonicalName, false)) { - // Save language at application config. - // Which language to save as the selected dictionary language? - // 1) Hopefully the language set to wxTranslations by this->load_language(), but that API is weird and we don't want to rely on its - // stability in the future: - // wxTranslations::Get()->GetBestTranslation(SLIC3R_APP_KEY, wxLANGUAGE_ENGLISH); - // 2) Current locale language may not match the dictionary name, see GH issue #3901 - // m_wxLocale->GetCanonicalName() - // 3) new_language_info->CanonicalName is a safe bet. It points to a valid dictionary name. - app_config->set("language", new_language_info->CanonicalName.ToUTF8().data()); - return true; - } - } - - return false; -} // Load gettext translation files and activate them at the start of the application, // based on the "language" key stored in the application config. @@ -8330,146 +8249,6 @@ void GUI_App::show_ip_address_enter_dialog_handler(wxCommandEvent& evt) show_modal_ip_address_enter_dialog(mode == -1?false:true, title); } -//void GUI_App::add_config_menu(wxMenuBar *menu) -//void GUI_App::add_config_menu(wxMenu *menu) -//{ -// auto local_menu = new wxMenu(); -// wxWindowID config_id_base = wxWindow::NewControlId(int(ConfigMenuCnt)); -// -// const auto config_wizard_name = _(ConfigWizard::name(true)); -// const auto config_wizard_tooltip = from_u8((boost::format(_utf8(L("Open %s"))) % config_wizard_name).str()); -// // Cmd+, is standard on OS X - what about other operating systems? -// if (is_editor()) { -// local_menu->Append(config_id_base + ConfigMenuWizard, config_wizard_name + dots, config_wizard_tooltip); -// local_menu->Append(config_id_base + ConfigMenuUpdate, _L("Check for Configuration Updates"), _L("Check for configuration updates")); -// local_menu->AppendSeparator(); -// } -// local_menu->Append(config_id_base + ConfigMenuPreferences, _L("Preferences") + dots + -//#ifdef __APPLE__ -// "\tCtrl+,", -//#else -// "\tCtrl+P", -//#endif -// _L("Application preferences")); -// wxMenu* mode_menu = nullptr; -// if (is_editor()) { -// local_menu->AppendSeparator(); -// mode_menu = new wxMenu(); -// mode_menu->AppendRadioItem(config_id_base + ConfigMenuModeSimple, _L("Simple"), _L("Simple Mode")); -// mode_menu->AppendRadioItem(config_id_base + ConfigMenuModeAdvanced, _L("Advanced"), _L("Advanced Mode")); -// Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { if (get_mode() == comSimple) evt.Check(true); }, config_id_base + ConfigMenuModeSimple); -// Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { if (get_mode() == comAdvanced) evt.Check(true); }, config_id_base + ConfigMenuModeAdvanced); -// -// local_menu->AppendSubMenu(mode_menu, _L("Mode"), wxString::Format(_L("%s Mode"), SLIC3R_APP_NAME)); -// } -// local_menu->AppendSeparator(); -// local_menu->Append(config_id_base + ConfigMenuLanguage, _L("Language")); -// if (is_editor()) { -// local_menu->AppendSeparator(); -// } -// -// local_menu->Bind(wxEVT_MENU, [this, config_id_base](wxEvent &event) { -// switch (event.GetId() - config_id_base) { -// case ConfigMenuWizard: -// run_wizard(ConfigWizard::RR_USER); -// break; -// case ConfigMenuUpdate: -// check_updates(true); -// break; -//#ifdef __linux__ -// case ConfigMenuDesktopIntegration: -// show_desktop_integration_dialog(); -// break; -//#endif -// case ConfigMenuSnapshots: -// //BBS do not support task snapshot -// break; -// case ConfigMenuPreferences: -// { -// //BBS GUI refactor: remove unuse layout logic -// //bool app_layout_changed = false; -// { -// // the dialog needs to be destroyed before the call to recreate_GUI() -// // or sometimes the application crashes into wxDialogBase() destructor -// // so we put it into an inner scope -// PreferencesDialog dlg(mainframe); -// dlg.ShowModal(); -// //BBS GUI refactor: remove unuse layout logic -// //app_layout_changed = dlg.settings_layout_changed(); -// if (dlg.seq_top_layer_only_changed()) -// this->plater_->refresh_print(); -// -// if (dlg.recreate_GUI()) { -// recreate_GUI(_L("Restart application") + dots); -// return; -// } -//#ifdef _WIN32 -// if (is_editor()) { -// if (app_config->get("associate_3mf") == "true") -// associate_3mf_files(); -// if (app_config->get("associate_stl") == "true") -// associate_stl_files(); -// } -// else { -// if (app_config->get("associate_gcode") == "true") -// associate_gcode_files(); -// } -//#endif // _WIN32 -// } -// //BBS GUI refactor: remove unuse layout logic -// /*if (app_layout_changed) { -// // hide full main_sizer for mainFrame -// mainframe->GetSizer()->Show(false); -// mainframe->update_layout(); -// mainframe->select_tab(size_t(0)); -// }*/ -// break; -// } -// case ConfigMenuLanguage: -// { -// /* Before change application language, let's check unsaved changes on 3D-Scene -// * and draw user's attention to the application restarting after a language change -// */ -// { -// // the dialog needs to be destroyed before the call to switch_language() -// // or sometimes the application crashes into wxDialogBase() destructor -// // so we put it into an inner scope -// wxString title = is_editor() ? wxString(SLIC3R_APP_NAME) : wxString(GCODEVIEWER_APP_NAME); -// title += " - " + _L("Choose language"); -// //wxMessageDialog dialog(nullptr, -// MessageDialog dialog(nullptr, -// _L("Switching the language requires application restart.\n") + "\n\n" + -// _L("Do you want to continue?"), -// title, -// wxICON_QUESTION | wxOK | wxCANCEL); -// if (dialog.ShowModal() == wxID_CANCEL) -// return; -// } -// -// switch_language(); -// break; -// } -// case ConfigMenuFlashFirmware: -// //BBS FirmwareDialog::run(mainframe); -// break; -// default: -// break; -// } -// }); -// -// using std::placeholders::_1; -// -// if (mode_menu != nullptr) { -// auto modfn = [this](int mode, wxCommandEvent&) { if (get_mode() != mode) save_mode(mode); }; -// mode_menu->Bind(wxEVT_MENU, std::bind(modfn, comSimple, _1), config_id_base + ConfigMenuModeSimple); -// mode_menu->Bind(wxEVT_MENU, std::bind(modfn, comAdvanced, _1), config_id_base + ConfigMenuModeAdvanced); -// } -// -// // BBS -// //menu->Append(local_menu, _L("Configuration")); -// menu->AppendSubMenu(local_menu, _L("Configuration")); -//} - void GUI_App::open_presetbundledialog(size_t open_on_tab, const std::string& highlight_option) { bool app_layout_changed = false; diff --git a/src/slic3r/GUI/GUI_App.hpp b/src/slic3r/GUI/GUI_App.hpp index 8bf32df64c..2569e10271 100644 --- a/src/slic3r/GUI/GUI_App.hpp +++ b/src/slic3r/GUI/GUI_App.hpp @@ -569,7 +569,6 @@ public: void start_http_server(const std::string& provider = ORCA_CLOUD_PROVIDER); void start_http_server(int port, const std::string& provider = ORCA_CLOUD_PROVIDER); void stop_http_server(); - void switch_staff_pick(bool on); void on_show_check_privacy_dlg(int online_login = 0, const std::string& provider = ORCA_CLOUD_PROVIDER); void show_check_privacy_dlg(wxCommandEvent& evt); @@ -583,7 +582,6 @@ public: void persist_window_geometry(wxTopLevelWindow *window, bool default_maximized = false); void update_ui_from_settings(); - bool switch_language(); bool load_language(wxString language, bool initial); Tab* get_tab(Preset::Type type); @@ -801,7 +799,6 @@ private: bool window_pos_restore(wxTopLevelWindow* window, const std::string &name, bool default_maximized = false); void window_pos_sanitize(wxTopLevelWindow* window); void window_pos_center(wxTopLevelWindow *window); - bool select_language(); // Dynamic printer agent selection - internal helpers for switch_printer_agent // and the plugin load/unload callbacks (init_plugin_gui_wiring). diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index c734804c22..5f36323d6e 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -3275,98 +3275,9 @@ void MainFrame::init_menubar_as_editor() auto preference_item = new wxMenuItem(parent_menu, ConfigMenuPreferences + config_id_base, _L("Preferences") + "\t" + ctrl + "P", ""); #endif - //auto printer_item = new wxMenuItem(parent_menu, ConfigMenuPrinter + config_id_base, _L("Printer"), ""); - //auto language_item = new wxMenuItem(parent_menu, ConfigMenuLanguage + config_id_base, _L("Switch Language"), ""); -// parent_menu->Bind(wxEVT_MENU, [this, config_id_base](wxEvent& event) { -// switch (event.GetId() - config_id_base) { -// //case ConfigMenuLanguage: -// //{ -// // /* Before change application language, let's check unsaved changes on 3D-Scene -// // * and draw user's attention to the application restarting after a language change -// // */ -// // { -// // // the dialog needs to be destroyed before the call to switch_language() -// // // or sometimes the application crashes into wxDialogBase() destructor -// // // so we put it into an inner scope -// // wxString title = _L("Language selection"); -// // wxMessageDialog dialog(nullptr, -// // _L("Switching the language requires application restart.\n") + "\n\n" + -// // _L("Do you want to continue?"), -// // title, -// // wxICON_QUESTION | wxOK | wxCANCEL); -// // if (dialog.ShowModal() == wxID_CANCEL) -// // return; -// // } -// -// // wxGetApp().switch_language(); -// // break; -// //} -// //case ConfigMenuWizard: -// //{ -// // wxGetApp().run_wizard(ConfigWizard::RR_USER); -// // break; -// //} -// case ConfigMenuPrinter: -// { -// wxGetApp().params_dialog()->Popup(); -// wxGetApp().get_tab(Preset::TYPE_PRINTER)->restore_last_select_item(); -// break; -// } -// case ConfigMenuPreferences: -// { -// CallAfter([this] { -// PreferencesDialog dlg(this); -// dlg.ShowModal(); -//#if ENABLE_GCODE_LINES_ID_IN_H_SLIDER -// if (dlg.seq_top_layer_only_changed() || dlg.seq_seq_top_gcode_indices_changed()) -//#else -// if (dlg.seq_top_layer_only_changed()) -//#endif // ENABLE_GCODE_LINES_ID_IN_H_SLIDER -// plater()->refresh_print(); -//#if ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN -//#ifdef _WIN32 -// /* -// if (wxGetApp().app_config()->get("associate_3mf") == "true") -// wxGetApp().associate_3mf_files(); -// if (wxGetApp().app_config()->get("associate_stl") == "true") -// wxGetApp().associate_stl_files(); -// /*if (wxGetApp().app_config()->get("associate_step") == "true") -// wxGetApp().associate_step_files();*/ -//#endif // _WIN32 -//#endif -// }); -// break; -// } -// default: -// break; -// } -// }); #ifdef __APPLE__ wxString about_title = wxString::Format(_L("&About %s"), SLIC3R_APP_FULL_NAME); - //auto about_item = new wxMenuItem(parent_menu, OrcaSlicerMenuAbout + bambu_studio_id_base, about_title, ""); - //parent_menu->Bind(wxEVT_MENU, [this, bambu_studio_id_base](wxEvent& event) { - // switch (event.GetId() - bambu_studio_id_base) { - // case OrcaSlicerMenuAbout: - // Slic3r::GUI::about(); - // break; - // case OrcaSlicerMenuPreferences: - // CallAfter([this] { - // PreferencesDialog dlg(this); - // dlg.ShowModal(); - //#if ENABLE_GCODE_LINES_ID_IN_H_SLIDER - // if (dlg.seq_top_layer_only_changed() || dlg.seq_seq_top_gcode_indices_changed()) - //#else - // if (dlg.seq_top_layer_only_changed()) - //#endif // ENABLE_GCODE_LINES_ID_IN_H_SLIDER - // plater()->refresh_print(); - // }); - // break; - // default: - // break; - // } - //}); - //parent_menu->Insert(0, about_item); append_menu_item( parent_menu, wxID_ANY, _L(about_title), "", [](wxCommandEvent &) { Slic3r::GUI::about();}, diff --git a/src/slic3r/GUI/MeshUtils.cpp b/src/slic3r/GUI/MeshUtils.cpp index bc6c60a360..173c5d2f13 100644 --- a/src/slic3r/GUI/MeshUtils.cpp +++ b/src/slic3r/GUI/MeshUtils.cpp @@ -297,7 +297,7 @@ void MeshClipper::recalculate_triangles() // it so it lies on our line. This will be the figure to subtract // from the cut. The coordinates must not overflow after the transform, // make the rectangle a bit smaller. - const coord_t size = (std::numeric_limits::max()/2 - scale_(std::max(std::abs(e * a), std::abs(e * b)))) / 4; + const coord_t size = (double(std::numeric_limits::max()/2) - scale_(std::max(std::abs(e * a), std::abs(e * b)))) / 4; Polygons ep {Polygon({Point(-size, 0), Point(size, 0), Point(size, 2*size), Point(-size, 2*size)})}; ep.front().rotate(angle); ep.front().translate(scale_(-e * a), scale_(-e * b)); @@ -352,7 +352,7 @@ void MeshClipper::recalculate_triangles() // To prevent overflow after scaling, downscale the input if needed: double extra_scale = 1.; - coord_t limit = coord_t(std::min(std::numeric_limits::max() / (2. * std::max(1., scale_x)), std::numeric_limits::max() / (2. * std::max(1., scale_y)))); + coord_t limit = coord_t(std::min(double(std::numeric_limits::max()) / (2. * std::max(1., scale_x)), double(std::numeric_limits::max()) / (2. * std::max(1., scale_y)))); coord_t max_coord = 0; for (const Point& pt : exp.contour) max_coord = std::max(max_coord, std::max(std::abs(pt.x()), std::abs(pt.y()))); diff --git a/src/slic3r/GUI/PartPlate.cpp b/src/slic3r/GUI/PartPlate.cpp index 9826498fbd..d38ab5e0ac 100644 --- a/src/slic3r/GUI/PartPlate.cpp +++ b/src/slic3r/GUI/PartPlate.cpp @@ -1917,7 +1917,7 @@ std::vector PartPlate::get_extruders_without_support(bool conside_custom_gc const DynamicPrintConfig& glb_config = wxGetApp().preset_bundle->prints.get_edited_preset().config; for (int obj_idx = 0; obj_idx < m_model->objects.size(); obj_idx++) { - if (!contain_instance_totally(obj_idx, 0)) + if (!contain_any_instance_totally(obj_idx)) continue; ModelObject* mo = m_model->objects[obj_idx]; @@ -2088,7 +2088,7 @@ bool PartPlate::check_single_extruder_mixed_filament_risk(const DynamicPrintConf "which may significantly increase waste and the risk of nozzle / waste-chute clogging."); for (int obj_idx = 0; obj_idx < (int)m_model->objects.size(); ++obj_idx) { - if (!contain_instance_totally(obj_idx, 0)) + if (!contain_any_instance_totally(obj_idx)) continue; ModelObject *mo = m_model->objects[obj_idx]; int obj_ext = mo->config.has("extruder") ? mo->config.extruder() : 1; @@ -2307,7 +2307,7 @@ bool PartPlate::check_compatible_of_nozzle_and_filament(const DynamicPrintConfig return wipe_tower_size; for (int obj_idx = 0; obj_idx < m_model->objects.size(); obj_idx++) { - if (!use_global_objects && !contain_instance_totally(obj_idx, 0)) + if (!use_global_objects && !contain_any_instance_totally(obj_idx)) continue; BoundingBoxf3 bbox = m_model->objects[obj_idx]->bounding_box(); diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index a28add0e4d..0fdb9dcd94 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -17839,6 +17839,10 @@ void Plater::increase_instances(size_t num) model_object->add_instance(offset_vec, model_instance->get_scaling_factor(), model_instance->get_rotation(), model_instance->get_mirror()); // p->print.get_object(obj_idx)->add_copy(Slic3r::to_2d(offset_vec)); } + // Register the copies with the plate they land on before the scene reloads: the plate's + // filament list and wipe tower preview are read from that registry. + for (size_t i = model_object->instances.size() - num; i < model_object->instances.size(); ++i) + p->partplate_list.notify_instance_update(obj_idx, static_cast(i)); #ifdef SUPPORT_AUTO_CENTER if (p->get_config("autocenter") == "true") @@ -17869,8 +17873,10 @@ void Plater::decrease_instances(size_t num) ModelObject* model_object = p->model.objects[obj_idx]; if (model_object->instances.size() > num) { - for (size_t i = 0; i < num; ++ i) + for (size_t i = 0; i < num; ++ i) { + p->partplate_list.notify_instance_removed(obj_idx, static_cast(model_object->instances.size()) - 1); model_object->delete_last_instance(); + } p->update(); // Delete object from Sidebar list. Do it after update, so that the GLScene selection is updated with the modified model. sidebar().obj_list()->decrease_object_instances(obj_idx, num); diff --git a/src/slic3r/GUI/Preferences.cpp b/src/slic3r/GUI/Preferences.cpp index 08483f3100..7d80147efa 100644 --- a/src/slic3r/GUI/Preferences.cpp +++ b/src/slic3r/GUI/Preferences.cpp @@ -507,26 +507,14 @@ wxBoxSizer *PreferencesDialog::create_item_language_combobox(wxString title, wxS } } - - // the dialog needs to be destroyed before the call to switch_language() - // or sometimes the application crashes into wxDialogBase() destructor - // so we put it into an inner scope - MessageDialog msg_wingow(nullptr, _L("Switching languages requires the application to restart.\n") + "\n" + _L("Do you want to continue?"), - L("Language selection"), wxICON_QUESTION | wxOK | wxCANCEL); - if (msg_wingow.ShowModal() == wxID_CANCEL) { + MessageDialog msg_window(nullptr, _L("Switching languages requires the application to restart.\n") + "\n" + _L("Do you want to continue?"), + _L("Language selection"), wxICON_QUESTION | wxOK | wxCANCEL); + if (msg_window.ShowModal() == wxID_CANCEL) { combobox->SetSelection(m_current_language_selected); return; } } - auto check = [](bool yes_or_no) { - // if (yes_or_no) - // return true; - int act_btns = ActionButtons::SAVE; - return wxGetApp().check_and_keep_current_preset_changes(_L("Switching application language"), - _L("Switching application language while some presets are modified."), act_btns); - }; - m_current_language_selected = combobox->GetSelection(); if (m_current_language_selected >= 0 && m_current_language_selected < vlist.size()) { m_pending_language = vlist[m_current_language_selected]->CanonicalName.ToUTF8().data(); @@ -1031,11 +1019,6 @@ wxBoxSizer *PreferencesDialog::create_item_checkbox(wxString title, wxString too app_config->set_bool(param, checkbox->GetValue()); app_config->save(); - // if (param == "staff_pick_switch") { - // bool pbool = app_config->get("staff_pick_switch") == "true"; - // wxGetApp().switch_staff_pick(pbool); - // } - if (param == "sync_user_preset") { bool sync = app_config->get("sync_user_preset") == "true" ? true : false; if (sync) { diff --git a/src/slic3r/GUI/Printer/PrinterFileSystem.cpp b/src/slic3r/GUI/Printer/PrinterFileSystem.cpp index 8ec6909c8c..9aa35e2cff 100644 --- a/src/slic3r/GUI/Printer/PrinterFileSystem.cpp +++ b/src/slic3r/GUI/Printer/PrinterFileSystem.cpp @@ -1803,7 +1803,7 @@ static void* get_function(const char* name) return function; #if defined(_MSC_VER) || defined(_WIN32) - function = GetProcAddress(module, name); + function = reinterpret_cast(GetProcAddress(module, name)); #else function = dlsym(module, name); #endif diff --git a/src/slic3r/GUI/Widgets/FanControl.cpp b/src/slic3r/GUI/Widgets/FanControl.cpp index f10553814e..7efdfabf07 100644 --- a/src/slic3r/GUI/Widgets/FanControl.cpp +++ b/src/slic3r/GUI/Widgets/FanControl.cpp @@ -995,7 +995,7 @@ void FanControlPopupNew::init_names(MachineObject* obj) { radio_btn_name[AIR_DUCT::AIR_DUCT_HEATING_INTERNAL_FILT] = _L("Heating"); radio_btn_name[AIR_DUCT::AIR_DUCT_EXHAUST] = _L("Exhaust"); radio_btn_name[AIR_DUCT::AIR_DUCT_FULL_COOLING] = _L("Full Cooling"); - radio_btn_name[AIR_DUCT::AIR_DUCT_INIT] = L("Init"); + radio_btn_name[AIR_DUCT::AIR_DUCT_INIT] = _L("Init"); air_door_func_name[AIR_DOOR::AIR_DOOR_FUNC_CHAMBER] = _L("Chamber"); air_door_func_name[AIR_DOOR::AIR_DOOR_FUNC_INNERLOOP] = _L("Innerloop"); diff --git a/src/slic3r/Utils/BBLNetworkPlugin.cpp b/src/slic3r/Utils/BBLNetworkPlugin.cpp index 607e7d16d1..d795abf354 100644 --- a/src/slic3r/Utils/BBLNetworkPlugin.cpp +++ b/src/slic3r/Utils/BBLNetworkPlugin.cpp @@ -349,7 +349,7 @@ void* BBLNetworkPlugin::get_function(const char* name) return function; #if defined(_MSC_VER) || defined(_WIN32) - function = GetProcAddress(m_networking_module, name); + function = reinterpret_cast(GetProcAddress(m_networking_module, name)); #else function = dlsym(m_networking_module, name); #endif diff --git a/src/slic3r/Utils/BBLPrinterAgent.cpp b/src/slic3r/Utils/BBLPrinterAgent.cpp index 5e73edf84c..0c6225cc55 100644 --- a/src/slic3r/Utils/BBLPrinterAgent.cpp +++ b/src/slic3r/Utils/BBLPrinterAgent.cpp @@ -8,6 +8,7 @@ #include using json = nlohmann::json; +#include #include namespace Slic3r { @@ -90,6 +91,16 @@ OnMessageFn to_orca_messages(OnMessageFn fn) return [fn = std::move(fn)](std::string dev_id, std::string msg) { fn(std::move(dev_id), BBLPrinterAgent::to_orca_payload(std::move(msg))); }; } +// Retypes a plug-in entry point for an older plug-in generation. The detour through the +// generic function pointer marks the signature change as deliberate, which a direct cast +// between two signatures does not. +template +To as_abi(From fn) +{ + static_assert(std::is_function_v>, "as_abi retypes a function pointer"); + return reinterpret_cast(reinterpret_cast(fn)); +} + } // namespace std::string BBLPrinterAgent::to_orca_filament_id(const std::string& printer_filament_id) const @@ -141,7 +152,7 @@ int BBLPrinterAgent::send_message(std::string dev_id, std::string json_str, int // series through the legacy form would silently drop MessageFlag sign/encrypt. switch (plugin.network_abi()) { case NetworkAbi::Legacy: { - auto legacy_func = reinterpret_cast(func); + auto legacy_func = as_abi(func); return legacy_func(agent, std::move(dev_id), std::move(json_str), qos); } case NetworkAbi::V0203: @@ -185,7 +196,7 @@ int BBLPrinterAgent::send_message_to_printer(std::string dev_id, std::string jso if (func && agent) { switch (plugin.network_abi()) { case NetworkAbi::Legacy: { - auto legacy_func = reinterpret_cast(func); + auto legacy_func = as_abi(func); return legacy_func(agent, std::move(dev_id), std::move(json_str), qos); } case NetworkAbi::V0203: @@ -275,7 +286,7 @@ int BBLPrinterAgent::bind(std::string dev_ip, std::string dev_id, std::string de switch (plugin.network_abi()) { case NetworkAbi::Legacy: case NetworkAbi::V0203: { - auto older_func = reinterpret_cast(func); + auto older_func = as_abi(func); return older_func(agent, dev_ip, dev_id, sec_link, timezone, improved, update_fn); } case NetworkAbi::Current: @@ -436,9 +447,9 @@ int dispatch_start(CurrentFn func, PrintParams& params, const CallbackFns&... ca params.ams_mapping_info = BBLPrinterAgent::from_orca_payload(std::move(params.ams_mapping_info)); switch (plugin.network_abi()) { case NetworkAbi::Legacy: - return reinterpret_cast(func)(agent, BBLNetworkPlugin::as_legacy(params), callbacks...); + return as_abi(func)(agent, BBLNetworkPlugin::as_legacy(params), callbacks...); case NetworkAbi::V0203: - return reinterpret_cast(func)(agent, BBLNetworkPlugin::as_0203(params), callbacks...); + return as_abi(func)(agent, BBLNetworkPlugin::as_0203(params), callbacks...); case NetworkAbi::Current: return func(agent, std::move(params), callbacks...); default: diff --git a/src/slic3r/Utils/PresetUpdater.cpp b/src/slic3r/Utils/PresetUpdater.cpp index 23957f6500..032f9dbf7a 100644 --- a/src/slic3r/Utils/PresetUpdater.cpp +++ b/src/slic3r/Utils/PresetUpdater.cpp @@ -1620,7 +1620,7 @@ void PresetUpdater::priv::check_new_vendors(const std::set& system_ Http::get(download_url_str) .timeout_connect(5) .on_progress(check_cancel) - .on_error([&vendor_id, &retry_count, max_retries](std::string body, std::string error, unsigned http_status) { + .on_error([&vendor_id, &retry_count](std::string body, std::string error, unsigned http_status) { BOOST_LOG_TRIVIAL(warning) << "[Orca Updater] download failed for new vendor " << vendor_id << " (attempt " << retry_count << "/" << max_retries << "): " << error; })