From d6fc29fc1cb59cc3be80b44dbcf9ad0a5c006c5b Mon Sep 17 00:00:00 2001 From: Joacim Breiler Date: Sat, 28 Dec 2024 07:59:51 +0100 Subject: [PATCH] Roll back NEWT visualizer setting (#2666) --- ugs-core/src/resources/MessagesBundle_en_US.properties | 4 ++-- ugs-core/src/resources/MessagesBundle_sv_SE.properties | 4 ++-- .../ugs/nbm/visualizer/Visualizer2TopComponent.java | 2 +- .../ugs/nbm/visualizer/options/VisualizerOptions.java | 6 +++--- .../willwinder/ugs/nbm/visualizer/VisualizerTestMain.java | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ugs-core/src/resources/MessagesBundle_en_US.properties b/ugs-core/src/resources/MessagesBundle_en_US.properties index 04fc64bd2..5bb218a66 100644 --- a/ugs-core/src/resources/MessagesBundle_en_US.properties +++ b/ugs-core/src/resources/MessagesBundle_en_US.properties @@ -325,8 +325,8 @@ platform.window.visualizer.tooltip = 3D view of the current operation. platform.window.fileBrowser = File Browser platform.window.fileBrowser.tooltip = Load a folder to view and work with files. platform.visualizer.edit.options.title = Visualizer options -platform.visualizer.legacy = Use legacy rendering engine -platform.visualizer.legacy.desc = Use the old legacy rendering engine in case of compatibility issues +platform.visualizer.use.legacy = Use legacy rendering engine +platform.visualizer.use.legacy.desc = Use the old legacy rendering engine in case of compatibility issues platform.visualizer.newt.samples = Antialiasing samples platform.visualizer.newt.samples.desc = How many antialiasing samples to make (will not be used with legacy rendering engine) platform.visualizer.color.background = Background Color diff --git a/ugs-core/src/resources/MessagesBundle_sv_SE.properties b/ugs-core/src/resources/MessagesBundle_sv_SE.properties index d1c6cce37..e8be35559 100644 --- a/ugs-core/src/resources/MessagesBundle_sv_SE.properties +++ b/ugs-core/src/resources/MessagesBundle_sv_SE.properties @@ -322,8 +322,8 @@ platform.window.visualizer.tooltip = 3D-vy av aktuellt kommando platform.window.fileBrowser = Filhanterare platform.window.fileBrowser.tooltip = Ladda en mapp för att visa och arbeta med filer. platform.visualizer.edit.options.title = Visualiseringsinställningar -platform.visualizer.legacy = Använd den äldre renderingsmotorn -platform.visualizer.legacy.desc = Använd den gamla äldre renderingsmotorn vid kompatibilitetsproblem +platform.visualizer.use.legacy = Använd den äldre renderingsmotorn +platform.visualizer.use.legacy.desc = Använd den gamla äldre renderingsmotorn vid kompatibilitetsproblem platform.visualizer.color.background = Bakgrundsfärg platform.visualizer.tool = Visa verktygets position platform.visualizer.color.tool = Verktygsfärg diff --git a/ugs-platform/ugs-platform-visualizer/src/main/java/com/willwinder/ugs/nbm/visualizer/Visualizer2TopComponent.java b/ugs-platform/ugs-platform-visualizer/src/main/java/com/willwinder/ugs/nbm/visualizer/Visualizer2TopComponent.java index b14e3fb4c..22b65def6 100644 --- a/ugs-platform/ugs-platform-visualizer/src/main/java/com/willwinder/ugs/nbm/visualizer/Visualizer2TopComponent.java +++ b/ugs-platform/ugs-platform-visualizer/src/main/java/com/willwinder/ugs/nbm/visualizer/Visualizer2TopComponent.java @@ -94,7 +94,7 @@ protected void componentOpened() { JPanel borderedPanel = new JPanel(); borderedPanel.setLayout(new BorderLayout()); borderedPanel.setBorder(BorderFactory.createLineBorder(Color.DARK_GRAY, 1)); - if (VisualizerOptions.getBooleanOption(VisualizerOptions.VISUALIZER_OPTION_LEGACY, false)) { + if (VisualizerOptions.getBooleanOption(VisualizerOptions.VISUALIZER_OPTION_LEGACY, true)) { borderedPanel.add(new VisualizationPanel(), BorderLayout.CENTER); } else { createAndAddNewtPanel(borderedPanel); diff --git a/ugs-platform/ugs-platform-visualizer/src/main/java/com/willwinder/ugs/nbm/visualizer/options/VisualizerOptions.java b/ugs-platform/ugs-platform-visualizer/src/main/java/com/willwinder/ugs/nbm/visualizer/options/VisualizerOptions.java index ed1130280..c0d1411d0 100644 --- a/ugs-platform/ugs-platform-visualizer/src/main/java/com/willwinder/ugs/nbm/visualizer/options/VisualizerOptions.java +++ b/ugs-platform/ugs-platform-visualizer/src/main/java/com/willwinder/ugs/nbm/visualizer/options/VisualizerOptions.java @@ -31,8 +31,8 @@ This file is part of Universal Gcode Sender (UGS). */ public class VisualizerOptions extends ArrayList> { - public static String VISUALIZER_OPTION_LEGACY = "platform.visualizer.legacy"; - public static String VISUALIZER_OPTION_LEGACY_DESC = "platform.visualizer.legacy.desc"; + public static String VISUALIZER_OPTION_LEGACY = "platform.visualizer.use.legacy"; + public static String VISUALIZER_OPTION_LEGACY_DESC = "platform.visualizer.use.legacy.desc"; public static String VISUALIZER_OPTION_NEWT_SAMPLES = "platform.visualizer.newt.samples"; public static String VISUALIZER_OPTION_NEWT_SAMPLES_DESC = "platform.visualizer.newt.samples.desc"; @@ -115,7 +115,7 @@ public class VisualizerOptions extends ArrayList> { public static String VISUALIZER_OPTION_BOUNDARY_INVERT_DESC = "platform.visualizer.boundary.invert.desc"; public VisualizerOptions() { - add(getOption(VISUALIZER_OPTION_LEGACY, Localization.getString(VISUALIZER_OPTION_LEGACY_DESC), false)); + add(getOption(VISUALIZER_OPTION_LEGACY, Localization.getString(VISUALIZER_OPTION_LEGACY_DESC), true)); add(getOption(VISUALIZER_OPTION_NEWT_SAMPLES, Localization.getString(VISUALIZER_OPTION_NEWT_SAMPLES_DESC), 4)); // GcodeRenderer clear color diff --git a/ugs-platform/ugs-platform-visualizer/src/test/java/com/willwinder/ugs/nbm/visualizer/VisualizerTestMain.java b/ugs-platform/ugs-platform-visualizer/src/test/java/com/willwinder/ugs/nbm/visualizer/VisualizerTestMain.java index 35288164d..7e363f998 100644 --- a/ugs-platform/ugs-platform-visualizer/src/test/java/com/willwinder/ugs/nbm/visualizer/VisualizerTestMain.java +++ b/ugs-platform/ugs-platform-visualizer/src/test/java/com/willwinder/ugs/nbm/visualizer/VisualizerTestMain.java @@ -39,7 +39,7 @@ public static void main(String[] args) throws Exception { private void start() throws Exception { setPreferredSize(new Dimension(1024, 768)); setLayout(new BorderLayout()); - VisualizerOptions.setBooleanOption(VisualizerOptions.VISUALIZER_OPTION_LEGACY, false); + VisualizerOptions.setBooleanOption(VisualizerOptions.VISUALIZER_OPTION_LEGACY, true); Visualizer2TopComponent visualizer = new Visualizer2TopComponent(); add(visualizer, BorderLayout.CENTER); visualizer.componentOpened();