diff --git a/localization/i18n/OrcaSlicer.pot b/localization/i18n/OrcaSlicer.pot index c894f59848..184f943551 100644 --- a/localization/i18n/OrcaSlicer.pot +++ b/localization/i18n/OrcaSlicer.pot @@ -6342,6 +6342,12 @@ msgstr "" msgid "If enabled, use free camera. If not enabled, use constrained camera." msgstr "" +msgid "Swap pan and rotate mouse buttons" +msgstr "" + +msgid "If enabled, swaps the left and right mouse buttons pan and rotate functions." +msgstr "" + msgid "Reverse mouse zoom" msgstr "" diff --git a/localization/i18n/ca/OrcaSlicer_ca.po b/localization/i18n/ca/OrcaSlicer_ca.po index 32c8f173e2..5556cac3be 100644 --- a/localization/i18n/ca/OrcaSlicer_ca.po +++ b/localization/i18n/ca/OrcaSlicer_ca.po @@ -6872,6 +6872,12 @@ msgstr "" "Si està activat, fa servir la càmera lliure. Si no està activat, fa servir " "la càmera restringida." +msgid "Swap pan and rotate mouse buttons" +msgstr "Intercanviar la panoràmica i girar els botons del ratolí" + +msgid "If enabled, swaps the left and right mouse buttons pan and rotate functions." +msgstr "Si està activat, intercanvia les funcions de panoràmica i rotació dels botons esquerre i dret del ratolí." + msgid "Reverse mouse zoom" msgstr "Zoom invers del ratolí" diff --git a/localization/i18n/cs/OrcaSlicer_cs.po b/localization/i18n/cs/OrcaSlicer_cs.po index 036cc163bf..684613bbda 100644 --- a/localization/i18n/cs/OrcaSlicer_cs.po +++ b/localization/i18n/cs/OrcaSlicer_cs.po @@ -6698,17 +6698,23 @@ msgstr "" "Pokud je povoleno, použijte volnou kameru. Pokud není povoleno, použijte " "omezenou kameru." +msgid "Swap pan and rotate mouse buttons" +msgstr "Prohodit tlačítka pro posouvání a otáčení myši" + +msgid "If enabled, swaps the left and right mouse buttons pan and rotate functions." +msgstr "Pokud je tato možnost povolena, prohodí levé a pravé tlačítko myši pro funkce posouvání a otáčení." + msgid "Reverse mouse zoom" -msgstr "" +msgstr "Zvětšení/zmenšení myší v opačném směru" msgid "If enabled, reverses the direction of zoom with mouse wheel." -msgstr "" +msgstr "Pokud je povoleno, obrací směr přiblížení kolečkem myši." msgid "Show splash screen" msgstr "Zobrazovat úvodní obrazovku" msgid "Show the splash screen during startup." -msgstr "" +msgstr "Zobrazit úvodní obrazovku během spuštění." msgid "Show \"Tip of the day\" notification after start" msgstr "Zobrazovat \"Tip dne\" po spuštění" diff --git a/localization/i18n/de/OrcaSlicer_de.po b/localization/i18n/de/OrcaSlicer_de.po index bc2750f932..e9cbfdaab1 100644 --- a/localization/i18n/de/OrcaSlicer_de.po +++ b/localization/i18n/de/OrcaSlicer_de.po @@ -6939,6 +6939,12 @@ msgstr "Freie Kamera verwenden" msgid "If enabled, use free camera. If not enabled, use constrained camera." msgstr "Wenn aktiviert, wird die freie Kamera verwendet." +msgid "Swap pan and rotate mouse buttons" +msgstr "Schwenk- und Dreh-Maustasten vertauschen" + +msgid "If enabled, swaps the left and right mouse buttons pan and rotate functions." +msgstr "Wenn aktiviert, werden die Schwenk- und Drehfunktionen der linken und rechten Maustaste vertauscht." + msgid "Reverse mouse zoom" msgstr "Maus-Zoom umkehren" diff --git a/localization/i18n/en/OrcaSlicer_en.po b/localization/i18n/en/OrcaSlicer_en.po index c8f9554a4d..fadcdf48ff 100644 --- a/localization/i18n/en/OrcaSlicer_en.po +++ b/localization/i18n/en/OrcaSlicer_en.po @@ -6454,6 +6454,12 @@ msgstr "" msgid "If enabled, use free camera. If not enabled, use constrained camera." msgstr "" +msgid "Swap pan and rotate mouse buttons" +msgstr "" + +msgid "If enabled, swaps the left and right mouse buttons pan and rotate functions." +msgstr "" + msgid "Reverse mouse zoom" msgstr "" diff --git a/localization/i18n/es/OrcaSlicer_es.po b/localization/i18n/es/OrcaSlicer_es.po index 018f5738f1..321cf83cae 100644 --- a/localization/i18n/es/OrcaSlicer_es.po +++ b/localization/i18n/es/OrcaSlicer_es.po @@ -6893,6 +6893,12 @@ msgstr "" "Si está activada, utiliza la cámara libre. Si no está activada, utiliza la " "cámara restringida." +msgid "Swap pan and rotate mouse buttons" +msgstr "Intercambiar los botones de panorámica y rotación del mouse" + +msgid "If enabled, swaps the left and right mouse buttons pan and rotate functions." +msgstr "Si está habilitado, intercambia las funciones de panorámica y rotación de los botones izquierdo y derecho del mouse." + msgid "Reverse mouse zoom" msgstr "Invertir el zoom del ratón" diff --git a/localization/i18n/fr/OrcaSlicer_fr.po b/localization/i18n/fr/OrcaSlicer_fr.po index 5a02f47028..2b692617fd 100644 --- a/localization/i18n/fr/OrcaSlicer_fr.po +++ b/localization/i18n/fr/OrcaSlicer_fr.po @@ -6935,6 +6935,12 @@ msgstr "" "Si activée, utilise la caméra libre. Si désactivée, utilise la caméra " "contrainte." +msgid "Swap pan and rotate mouse buttons" +msgstr "Échanger les boutons de panoramique et de rotation de la souris" + +msgid "If enabled, swaps the left and right mouse buttons pan and rotate functions." +msgstr "Si cette option est activée, les fonctions de panoramique et de rotation des boutons gauche et droit de la souris sont échangées." + msgid "Reverse mouse zoom" msgstr "Inverser le zoom de la souris" diff --git a/localization/i18n/hu/OrcaSlicer_hu.po b/localization/i18n/hu/OrcaSlicer_hu.po index 77f50f0f84..39139e3a59 100644 --- a/localization/i18n/hu/OrcaSlicer_hu.po +++ b/localization/i18n/hu/OrcaSlicer_hu.po @@ -6614,6 +6614,12 @@ msgstr "" "Ha engedélyezve van, szabad kamerát használ. Ha nincs engedélyezve, akkor " "kötött kamerát használ." +msgid "Swap pan and rotate mouse buttons" +msgstr "Felcserélt pásztázás és forgatás egérgombok" + +msgid "If enabled, swaps the left and right mouse buttons pan and rotate functions." +msgstr "Ha engedélyezve van, felcseréli a bal és jobb egérgomb pásztázási és forgatási funkcióit." + msgid "Reverse mouse zoom" msgstr "" diff --git a/localization/i18n/it/OrcaSlicer_it.po b/localization/i18n/it/OrcaSlicer_it.po index b305c28c4d..c678181da2 100644 --- a/localization/i18n/it/OrcaSlicer_it.po +++ b/localization/i18n/it/OrcaSlicer_it.po @@ -6894,13 +6894,17 @@ msgid "If enabled, use free camera. If not enabled, use constrained camera." msgstr "" "Se abilitato, usa la visuale libera. Altrimenti, usa la visuale vincolata." +msgid "Swap pan and rotate mouse buttons" +msgstr "Scambia i pulsanti del mouse per ruotare e spostare" + +msgid "If enabled, swaps the left and right mouse buttons pan and rotate functions." +msgstr "Se abilitato, inverte le funzioni di panoramica e rotazione dei pulsanti sinistro e destro del mouse." + msgid "Reverse mouse zoom" msgstr "Inverti zoom del mouse" msgid "If enabled, reverses the direction of zoom with mouse wheel." -msgstr "" -"Se abilitato, inverte la direzione dell'ingrandimento con la rotellina del " -"mouse." +msgstr "Se abilitato, inverte la direzione dell'ingrandimento con la rotellina del mouse." msgid "Show splash screen" msgstr "Mostra schermata iniziale" diff --git a/localization/i18n/ja/OrcaSlicer_ja.po b/localization/i18n/ja/OrcaSlicer_ja.po index 9df1755cc8..b391cae343 100644 --- a/localization/i18n/ja/OrcaSlicer_ja.po +++ b/localization/i18n/ja/OrcaSlicer_ja.po @@ -6489,11 +6489,17 @@ msgstr "" "チェックすると、フリーカメラが使用されます。 そうでない場合は、拘束カメラを使" "用します。" +msgid "Swap pan and rotate mouse buttons" +msgstr "パンと回転のマウスボタンを入れ替える" + +msgid "If enabled, swaps the left and right mouse buttons pan and rotate functions." +msgstr "有効にすると、マウスの左ボタンと右ボタンのパン機能と回転機能が入れ替わります。" + msgid "Reverse mouse zoom" -msgstr "" +msgstr "マウスの逆ズーム" msgid "If enabled, reverses the direction of zoom with mouse wheel." -msgstr "" +msgstr "有効にすると、マウス ホイールによるズームの方向が反転します。" msgid "Show splash screen" msgstr "スプラッシュ画面を表示する" diff --git a/localization/i18n/ko/OrcaSlicer_ko.po b/localization/i18n/ko/OrcaSlicer_ko.po index ed8dc910bd..db1ed58756 100644 --- a/localization/i18n/ko/OrcaSlicer_ko.po +++ b/localization/i18n/ko/OrcaSlicer_ko.po @@ -6669,6 +6669,12 @@ msgstr "" "활성화된 경우 자유로운 카메라 앵글을 사용합니다. 활성화되지 않은 경우 제한된 " "카메라 앵글을 사용합니다." +msgid "Swap pan and rotate mouse buttons" +msgstr "팬 및 회전 마우스 버튼 바꾸기" + +msgid "If enabled, swaps the left and right mouse buttons pan and rotate functions." +msgstr "이 기능을 활성화하면 왼쪽 마우스 버튼과 오른쪽 마우스 버튼의 팬 및 회전 기능이 바뀝니다." + msgid "Reverse mouse zoom" msgstr "역방향 마우스 줌" diff --git a/localization/i18n/lt/OrcaSlicer_lt.po b/localization/i18n/lt/OrcaSlicer_lt.po index 0a3c917ebb..4e69ab84f9 100644 --- a/localization/i18n/lt/OrcaSlicer_lt.po +++ b/localization/i18n/lt/OrcaSlicer_lt.po @@ -6835,6 +6835,12 @@ msgstr "" "Jei įjungta, naudoti laisvą kamerą. Jei neįjungta, naudoti stacionarią " "kamerą." +msgid "Swap pan and rotate mouse buttons" +msgstr "Sukeisti judėjimą ir sukimąsi pelės mygtuko" + +msgid "If enabled, swaps the left and right mouse buttons pan and rotate functions." +msgstr "Jei įjungta, sukeičia kairiojo ir dešiniojo pelės mygtukų panoraminio ir pasukimo funkcijas." + msgid "Reverse mouse zoom" msgstr "Apversti pelės didinimą" diff --git a/localization/i18n/nl/OrcaSlicer_nl.po b/localization/i18n/nl/OrcaSlicer_nl.po index 60891c7b7b..632d9ebd6b 100644 --- a/localization/i18n/nl/OrcaSlicer_nl.po +++ b/localization/i18n/nl/OrcaSlicer_nl.po @@ -6707,6 +6707,12 @@ msgstr "" "Als dit is ingeschakeld wordt de vrij beweegbare camera gebruikt, anders een " "vaste camera." +msgid "Swap pan and rotate mouse buttons" +msgstr "Wissel de pan- en rotatiemuisknoppen om" + +msgid "If enabled, swaps the left and right mouse buttons pan and rotate functions." +msgstr "Als deze optie is ingeschakeld, worden de pan- en rotatiefuncties van de linker- en rechtermuisknop omgedraaid." + msgid "Reverse mouse zoom" msgstr "Omgekeerde muiszoom" diff --git a/localization/i18n/pl/OrcaSlicer_pl.po b/localization/i18n/pl/OrcaSlicer_pl.po index 747dd49871..1f26741e65 100644 --- a/localization/i18n/pl/OrcaSlicer_pl.po +++ b/localization/i18n/pl/OrcaSlicer_pl.po @@ -6848,6 +6848,12 @@ msgstr "Używanie wolnego widoku kamery" msgid "If enabled, use free camera. If not enabled, use constrained camera." msgstr "Przełącza pomiędzy wolnym a ograniczonym widokiem kamery." +msgid "Swap pan and rotate mouse buttons" +msgstr "Zamień przyciski przesuwania i obracania myszy" + +msgid "If enabled, swaps the left and right mouse buttons pan and rotate functions." +msgstr "Jeśli włączone, zamienia funkcje przesuwania i obracania lewym i prawym przyciskiem myszy." + msgid "Reverse mouse zoom" msgstr "Odwrócone przybliżanie myszką" diff --git a/localization/i18n/pt_BR/OrcaSlicer_pt_BR.po b/localization/i18n/pt_BR/OrcaSlicer_pt_BR.po index 2ea8c9c909..8abbbcc195 100644 --- a/localization/i18n/pt_BR/OrcaSlicer_pt_BR.po +++ b/localization/i18n/pt_BR/OrcaSlicer_pt_BR.po @@ -6854,6 +6854,12 @@ msgstr "Usar câmera livre" msgid "If enabled, use free camera. If not enabled, use constrained camera." msgstr "Se ativado, usa câmera livre. Se não ativado, usa câmera restrita." +msgid "Swap pan and rotate mouse buttons" +msgstr "Alterar a panorâmica e girar os botões do mouse" + +msgid "If enabled, swaps the left and right mouse buttons pan and rotate functions." +msgstr "Se ativado, troca as funções de panorâmica e rotação dos botões esquerdo e direito do mouse." + msgid "Reverse mouse zoom" msgstr "Inverter zoom do mouse" diff --git a/localization/i18n/ru/OrcaSlicer_ru.po b/localization/i18n/ru/OrcaSlicer_ru.po index f7fadcd9ce..a8178983d2 100644 --- a/localization/i18n/ru/OrcaSlicer_ru.po +++ b/localization/i18n/ru/OrcaSlicer_ru.po @@ -6931,17 +6931,20 @@ msgid "Use free camera" msgstr "Использовать свободную камеру" msgid "If enabled, use free camera. If not enabled, use constrained camera." -msgstr "" -"Если включено, используется свободное вращение камеры. Если выключено, " +msgstr "Если включено, используется свободное вращение камеры. Если выключено, " "используется вращение камера с ограничениями." +msgid "Swap pan and rotate mouse buttons" +msgstr "Поменять местами кнопки панорамирования и вращения мыши" + +msgid "If enabled, swaps the left and right mouse buttons pan and rotate functions." +msgstr "Если включено, меняет местами функции панорамирования и поворота левой и правой кнопок мыши." + msgid "Reverse mouse zoom" msgstr "Инвертировать управление масштабом" msgid "If enabled, reverses the direction of zoom with mouse wheel." -msgstr "" -"Если включено, направление масштабирования с помощью колесика мыши будет " -"инвертировано." +msgstr "Если включено, направление масштабирования с помощью колесика мыши будет инвертировано." msgid "Show splash screen" msgstr "Показывать заставку при запуске программы" @@ -6953,46 +6956,37 @@ msgid "Show \"Tip of the day\" notification after start" msgstr "Показывать уведомление с полезным советом при запуске приложения" msgid "If enabled, useful hints are displayed at startup." -msgstr "" -"Если включено, будут показываться уведомления с полезном советом при запуске " -"приложения." +msgstr "Если включено, будут показываться уведомления с полезном советом при запуске приложения." msgid "Flushing volumes: Auto-calculate every time the color changed." msgstr "Объём очистки: автопересчёт при каждом изменении цвета" msgid "If enabled, auto-calculate every time the color changed." -msgstr "" -"Если включено, выполняется автоматический перерасчёт объёма очистки при " +msgstr "Если включено, выполняется автоматический перерасчёт объёма очистки при " "каждом изменении цвета." -msgid "" -"Flushing volumes: Auto-calculate every time when the filament is changed." +msgid "Flushing volumes: Auto-calculate every time when the filament is changed." msgstr "Объём очистки: автопересчёт при каждой смене прутка" msgid "If enabled, auto-calculate every time when filament is changed" -msgstr "" -"Если включено, выполняется автоматический перерасчёт объёма очистки при " +msgstr "Если включено, выполняется автоматический перерасчёт объёма очистки при " "каждой смене прутка." msgid "Remember printer configuration" msgstr "Запоминать конфигурацию принтера" -msgid "" -"If enabled, Orca will remember and switch filament/process configuration for " +msgid "If enabled, Orca will remember and switch filament/process configuration for " "each printer automatically." -msgstr "" -"Если включено, программа будет запоминать связь выбранного профиля принтера " +msgstr "Если включено, программа будет запоминать связь выбранного профиля принтера " "с профилем пластиковой нити и процессом печати, выставленными вами в " "последний раз." msgid "Multi-device Management (Take effect after restarting Orca Slicer)." msgstr "Управление несколькими принтерами (требуется перезапуск программы)" -msgid "" -"With this option enabled, you can send a task to multiple devices at the " +msgid "With this option enabled, you can send a task to multiple devices at the " "same time and manage multiple devices." -msgstr "" -"Если включено, вы сможете управлять несколькими устройствами и отправлять " +msgstr "Если включено, вы сможете управлять несколькими устройствами и отправлять " "задания на печать на несколько устройств одновременно." msgid "Auto arrange plate after cloning" diff --git a/localization/i18n/sv/OrcaSlicer_sv.po b/localization/i18n/sv/OrcaSlicer_sv.po index 5e594f4298..7d252ca6fc 100644 --- a/localization/i18n/sv/OrcaSlicer_sv.po +++ b/localization/i18n/sv/OrcaSlicer_sv.po @@ -6598,30 +6598,34 @@ msgstr "" msgid "Zoom to mouse position" msgstr "Zooma till musens position" -msgid "" -"Zoom in towards the mouse pointer's position in the 3D view, rather than the " +msgid "Zoom in towards the mouse pointer's position in the 3D view, rather than the " "2D window center." -msgstr "" -"Zooma in mot muspekarens position i 3D-vyn, istället för mot 2D-fönstrets " +msgstr "Zooma in mot muspekarens position i 3D-vyn, istället för mot 2D-fönstrets " "mitt." msgid "Use free camera" -msgstr "" +msgstr "Använd fri kamera" msgid "If enabled, use free camera. If not enabled, use constrained camera." -msgstr "" +msgstr "Om aktiverat, använd fri kamera. Om inte aktiverat, använd begränsad kamera." + +msgid "Swap pan and rotate mouse buttons" +msgstr "Växla panorerings- och rotationsknapparna på musen" + +msgid "If enabled, swaps the left and right mouse buttons pan and rotate functions." +msgstr "Om aktiverat växlar vänster och höger musknapps panorerings- och rotationsfunktioner." msgid "Reverse mouse zoom" -msgstr "" +msgstr "Omvänd muszoomning" msgid "If enabled, reverses the direction of zoom with mouse wheel." -msgstr "" +msgstr "Om aktiverad, vänder zoomriktningen med mushjulet." msgid "Show splash screen" -msgstr "" +msgstr "Visa välkomstskärm" msgid "Show the splash screen during startup." -msgstr "" +msgstr "Visa välkomstskärmen under uppstart." msgid "Show \"Tip of the day\" notification after start" msgstr "Visa \"Dagens tips\" efter start" diff --git a/localization/i18n/tr/OrcaSlicer_tr.po b/localization/i18n/tr/OrcaSlicer_tr.po index 7978a3662f..a25bb5dbec 100644 --- a/localization/i18n/tr/OrcaSlicer_tr.po +++ b/localization/i18n/tr/OrcaSlicer_tr.po @@ -6799,12 +6799,17 @@ msgstr "" "Etkinleştirilirse serbest kamerayı kullanın. Etkin değilse kısıtlı kamerayı " "kullanın." +msgid "Swap pan and rotate mouse buttons" +msgstr "Pan ve döndürme işlevlerini fare düğmeleri arasında değiştir" + +msgid "If enabled, swaps the left and right mouse buttons pan and rotate functions." +msgstr "Etkinleştirildiğinde, sol ve sağ fare düğmelerinin pan ve döndürme işlevlerini yer değiştirir." + msgid "Reverse mouse zoom" msgstr "Mouse yakınlaştırmasını tersine çevir" msgid "If enabled, reverses the direction of zoom with mouse wheel." -msgstr "" -"Etkinleştirilirse, mouse tekerleğiyle yakınlaştırmanın yönü tersine çevrilir." +msgstr "Etkinleştirilirse, mouse tekerleğiyle yakınlaştırmanın yönü tersine çevrilir." msgid "Show splash screen" msgstr "Açılış ekranını göster" diff --git a/localization/i18n/uk/OrcaSlicer_uk.po b/localization/i18n/uk/OrcaSlicer_uk.po index 131ed159eb..75325c195c 100644 --- a/localization/i18n/uk/OrcaSlicer_uk.po +++ b/localization/i18n/uk/OrcaSlicer_uk.po @@ -6860,6 +6860,12 @@ msgstr "" "Якщо увімкнено, використовуватиметься вільна камера. Якщо вимкнено, " "використовуватиметься камера з обмеженими можливостями." +msgid "Swap pan and rotate mouse buttons" +msgstr "Поміняти кнопки миші для панорамування й обертання" + +msgid "If enabled, swaps the left and right mouse buttons pan and rotate functions." +msgstr "Якщо ввімкнено, змінює місцями функції панорамування та обертання між лівою та правою кнопками миші." + msgid "Reverse mouse zoom" msgstr "Зворотне масштабування мишкою" diff --git a/localization/i18n/zh_CN/OrcaSlicer_zh_CN.po b/localization/i18n/zh_CN/OrcaSlicer_zh_CN.po index 686cf9ad63..13d5f78cfe 100644 --- a/localization/i18n/zh_CN/OrcaSlicer_zh_CN.po +++ b/localization/i18n/zh_CN/OrcaSlicer_zh_CN.po @@ -6519,6 +6519,12 @@ msgstr "使用自由视角" msgid "If enabled, use free camera. If not enabled, use constrained camera." msgstr "如果启用,使用自由视角。如果未启用,使用约束视角。" +msgid "Swap pan and rotate mouse buttons" +msgstr "交换鼠标按钮的平移与旋转功能" + +msgid "If enabled, swaps the left and right mouse buttons pan and rotate functions." +msgstr "启用后,将左键和右键的平移与旋转功能对调" + msgid "Reverse mouse zoom" msgstr "反转鼠标缩放" diff --git a/localization/i18n/zh_TW/OrcaSlicer_zh_TW.po b/localization/i18n/zh_TW/OrcaSlicer_zh_TW.po index 73062ca190..bd9ee60a19 100644 --- a/localization/i18n/zh_TW/OrcaSlicer_zh_TW.po +++ b/localization/i18n/zh_TW/OrcaSlicer_zh_TW.po @@ -6540,6 +6540,12 @@ msgstr "使用自由鏡頭" msgid "If enabled, use free camera. If not enabled, use constrained camera." msgstr "如果啟用,則使用自由鏡頭。若未啟用,則使用受限鏡頭。" +msgid "Swap pan and rotate mouse buttons" +msgstr "交换鼠标按钮的平移与旋转功能" + +msgid "If enabled, swaps the left and right mouse buttons pan and rotate functions." +msgstr "启用后,将左键和右键的平移与旋转功能对调" + msgid "Reverse mouse zoom" msgstr "反轉滑鼠滾輪縮放方向" diff --git a/src/libslic3r/AppConfig.cpp b/src/libslic3r/AppConfig.cpp index 588d1e0c0a..5e21e02d24 100644 --- a/src/libslic3r/AppConfig.cpp +++ b/src/libslic3r/AppConfig.cpp @@ -178,6 +178,9 @@ void AppConfig::set_defaults() if (get("camera_navigation_style").empty()) set("camera_navigation_style", "0"); + if (get("swap_mouse_buttons").empty()) + set_bool("swap_mouse_buttons", false); + if (get("reverse_mouse_wheel_zoom").empty()) set_bool("reverse_mouse_wheel_zoom", false); diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index e02919d9e0..1e400f6421 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -4104,6 +4104,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) } bool any_gizmo_active = m_gizmos.get_current() != nullptr; + bool swapMouseButtons = wxGetApp().app_config->get_bool("swap_mouse_buttons"); if (m_mouse.drag.move_requires_threshold && m_mouse.is_move_start_threshold_position_2D_defined() && m_mouse.is_move_threshold_met(pos)) { m_mouse.drag.move_requires_threshold = false; @@ -4305,7 +4306,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) m_dirty = true; } } - else if (evt.Dragging() || is_camera_rotate(evt) || is_camera_pan(evt)) { + else if (evt.Dragging() || is_camera_rotate(evt, swapMouseButtons) || is_camera_pan(evt, swapMouseButtons)) { m_mouse.dragging = true; if (m_layers_editing.state != LayersEditing::Unknown && layer_editing_object_idx != -1) { @@ -4315,10 +4316,10 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) } } // do not process the dragging if the left mouse was set down in another canvas - else if (is_camera_rotate(evt)) { + else if (is_camera_rotate(evt, swapMouseButtons)) { // Orca: Sphere rotation for painting view - // if dragging over blank area with left button, rotate - if ((any_gizmo_active || m_hover_volume_idxs.empty()) && m_mouse.is_start_position_3D_defined()) { + // if dragging over blank area with left button or button functions swapped then rotate + if ((any_gizmo_active || swapMouseButtons || m_hover_volume_idxs.empty()) && m_mouse.is_start_position_3D_defined()) { Camera& camera = wxGetApp().plater()->get_camera(); auto mult_pref = wxGetApp().app_config->get("camera_orbit_mult"); const double mult = mult_pref.empty() ? 1.0 : std::stod(mult_pref); @@ -4381,15 +4382,17 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) } } } - camera.auto_type(Camera::EType::Perspective); + camera.auto_type(Camera::EType::Perspective); m_dirty = true; + m_mouse.ignore_right_up = true; // will be reset on button up event even if not right button is pressed } + m_camera_movement = true; m_mouse.drag.start_position_3D = Vec3d((double)pos(0), (double)pos(1), 0.0); } - else if (is_camera_pan(evt)) { - // If dragging over blank area with right button, pan. + else if (is_camera_pan(evt, swapMouseButtons)) { + // if dragging with right button or if button functions swapped and dragging with left button over blank area then pan if (m_mouse.is_start_position_2D_defined()) { // get point in model space at Z = 0 float z = 0.0f; @@ -4407,7 +4410,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) camera.set_target(camera.get_target() + orig - cur_pos); m_dirty = true; - m_mouse.ignore_right_up = true; + m_mouse.ignore_right_up = true; // will be reset on button up event even if not right button is pressed } m_camera_movement = true; @@ -4415,10 +4418,10 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) } } else if ((evt.LeftUp() || evt.MiddleUp() || evt.RightUp()) || - (m_camera_movement && !is_camera_rotate(evt) && !is_camera_pan(evt))) { + (m_camera_movement && !is_camera_rotate(evt, swapMouseButtons) && !is_camera_pan(evt, swapMouseButtons))) { m_mouse.position = pos.cast(); - if (evt.LeftUp()) { + if (swapMouseButtons ? evt.RightUp() : evt.LeftUp()) { m_rotation_center(0) = m_rotation_center(1) = m_rotation_center(2) = 0.f; } @@ -4603,21 +4606,21 @@ void GLCanvas3D::on_set_focus(wxFocusEvent& evt) m_is_touchpad_navigation = wxGetApp().app_config->get_bool("camera_navigation_style"); } -bool GLCanvas3D::is_camera_rotate(const wxMouseEvent& evt) const +bool GLCanvas3D::is_camera_rotate(const wxMouseEvent& evt, const bool buttonsSwapped) const { if (m_is_touchpad_navigation) { return evt.Moving() && evt.AltDown() && !evt.ShiftDown(); } else { - return evt.Dragging() && evt.LeftIsDown(); + return evt.Dragging() && (buttonsSwapped ? evt.RightIsDown() : evt.LeftIsDown()); } } -bool GLCanvas3D::is_camera_pan(const wxMouseEvent& evt) const +bool GLCanvas3D::is_camera_pan(const wxMouseEvent& evt, const bool buttonsSwapped) const { if (m_is_touchpad_navigation) { return evt.Moving() && evt.ShiftDown() && !evt.AltDown(); } else { - return evt.Dragging() && (evt.MiddleIsDown() || evt.RightIsDown()); + return evt.Dragging() && (evt.MiddleIsDown() || (buttonsSwapped ? evt.LeftIsDown() : evt.RightIsDown())); } } diff --git a/src/slic3r/GUI/GLCanvas3D.hpp b/src/slic3r/GUI/GLCanvas3D.hpp index 26c14fa75e..3845ef462c 100644 --- a/src/slic3r/GUI/GLCanvas3D.hpp +++ b/src/slic3r/GUI/GLCanvas3D.hpp @@ -216,7 +216,7 @@ class GLCanvas3D }; static const float THICKNESS_BAR_WIDTH; - + // Orca: Shrinkage compensation void set_shrinkage_compensation(const Vec3d &shrinkage_compensation) { m_shrinkage_compensation = shrinkage_compensation; }; @@ -232,7 +232,7 @@ class GLCanvas3D // Owned by LayersEditing. SlicingParameters* m_slicing_parameters{ nullptr }; std::vector m_layer_height_profile; - + // Orca: Shrinkage compensation to apply when we need to use object_max_z with Z compensation. Vec3d m_shrinkage_compensation{ Vec3d::Ones() }; @@ -968,8 +968,8 @@ public: void on_set_focus(wxFocusEvent& evt); void force_set_focus(); - bool is_camera_rotate(const wxMouseEvent& evt) const; - bool is_camera_pan(const wxMouseEvent& evt) const; + bool is_camera_rotate(const wxMouseEvent& evt, const bool buttonsSwapped) const; + bool is_camera_pan(const wxMouseEvent& evt, const bool buttonsSwapped) const; Size get_canvas_size() const; Vec2d get_local_mouse_position() const; @@ -1063,7 +1063,7 @@ public: bool is_overhang_shown() const { return m_slope.is_GlobalUsed(); } void show_overhang(bool show) { m_slope.globalUse(show); } - + bool is_using_slope() const { return m_slope.is_used(); } void use_slope(bool use) { m_slope.use(use); } void set_slope_normal_angle(float angle_in_deg) { m_slope.set_normal_angle(angle_in_deg); } diff --git a/src/slic3r/GUI/Preferences.cpp b/src/slic3r/GUI/Preferences.cpp index f6255fa368..db52a767e6 100644 --- a/src/slic3r/GUI/Preferences.cpp +++ b/src/slic3r/GUI/Preferences.cpp @@ -123,7 +123,7 @@ wxBoxSizer *PreferencesDialog::create_item_combobox(wxString title, wxWindow *pa auto current_setting = app_config->get(param); if (!current_setting.empty()) { auto compare = [current_setting](string possible_setting) { return current_setting == possible_setting; }; - auto iterator = find_if(config_name_index.begin(), config_name_index.end(), compare); + auto iterator = find_if(config_name_index.begin(), config_name_index.end(), compare); current_index = iterator - config_name_index.begin(); } @@ -536,7 +536,7 @@ wxBoxSizer *PreferencesDialog::create_camera_orbit_mult_input(wxString title, wx sizer_input->Add(input_title, 0, wxALIGN_CENTER_VERTICAL | wxALL, 3); sizer_input->Add(input, 0, wxALIGN_CENTER_VERTICAL, 0); sizer_input->Add(0, 0, 0, wxEXPAND | wxLEFT, 3); - + const double min = 0.05; const double max = 2.0; @@ -1200,12 +1200,12 @@ wxWindow* PreferencesDialog::create_general_page() std::vector Units = {_L("Metric") + " (mm, g)", _L("Imperial") + " (in, oz)"}; auto item_currency = create_item_combobox(_L("Units"), page, _L("Units"), "use_inches", Units); - auto item_single_instance = create_item_checkbox(_L("Allow only one OrcaSlicer instance"), page, + auto item_single_instance = create_item_checkbox(_L("Allow only one OrcaSlicer instance"), page, #if __APPLE__ _L("On OSX there is always only one instance of app running by default. However it is allowed to run multiple instances " - "of same app from the command line. In such case this settings will allow only one instance."), + "of same app from the command line. In such case this settings will allow only one instance."), #else - _L("If this is enabled, when starting OrcaSlicer and another instance of the same OrcaSlicer is already running, that instance will be reactivated instead."), + _L("If this is enabled, when starting OrcaSlicer and another instance of the same OrcaSlicer is already running, that instance will be reactivated instead."), #endif 50, "single_instance"); @@ -1217,6 +1217,7 @@ wxWindow* PreferencesDialog::create_general_page() auto item_mouse_zoom_settings = create_item_checkbox(_L("Zoom to mouse position"), page, _L("Zoom in towards the mouse pointer's position in the 3D view, rather than the 2D window center."), 50, "zoom_to_mouse"); auto item_use_free_camera_settings = create_item_checkbox(_L("Use free camera"), page, _L("If enabled, use free camera. If not enabled, use constrained camera."), 50, "use_free_camera"); + auto swap_pan_rotate = create_item_checkbox(_L("Swap pan and rotate mouse buttons"), page, _L("If enabled, swaps the left and right mouse buttons pan and rotate functions."), 50, "swap_mouse_buttons"); auto reverse_mouse_zoom = create_item_checkbox(_L("Reverse mouse zoom"), page, _L("If enabled, reverses the direction of zoom with mouse wheel."), 50, "reverse_mouse_wheel_zoom"); auto camera_orbit_mult = create_camera_orbit_mult_input(_L("Orbit speed multiplier"), page, _L("Multiplies the orbit speed for finer or coarser camera movement.")); @@ -1301,6 +1302,7 @@ wxWindow* PreferencesDialog::create_general_page() sizer_page->Add(item_single_instance, 0, wxTOP, FromDIP(3)); sizer_page->Add(item_mouse_zoom_settings, 0, wxTOP, FromDIP(3)); sizer_page->Add(item_use_free_camera_settings, 0, wxTOP, FromDIP(3)); + sizer_page->Add(swap_pan_rotate, 0, wxTOP, FromDIP(3)); sizer_page->Add(reverse_mouse_zoom, 0, wxTOP, FromDIP(3)); sizer_page->Add(camera_orbit_mult, 0, wxTOP, FromDIP(3)); sizer_page->Add(item_show_splash_screen, 0, wxTOP, FromDIP(3));