From: Daniel Kirschten Date: Tue, 25 Jun 2019 09:37:51 +0000 (+0200) Subject: Simulation preview no longer can be moved / zoomed; removed old code X-Git-Url: https://mograsim.net/gitweb/?a=commitdiff_plain;h=0a9344ab19795856d42636b938c806d509f31542;p=Mograsim.git Simulation preview no longer can be moved / zoomed; removed old code --- diff --git a/net.mograsim.plugin.core/src/net/mograsim/plugin/SimulationPreview.java b/net.mograsim.plugin.core/src/net/mograsim/plugin/SimulationPreview.java index 9426f2c9..381a2bc6 100644 --- a/net.mograsim.plugin.core/src/net/mograsim/plugin/SimulationPreview.java +++ b/net.mograsim.plugin.core/src/net/mograsim/plugin/SimulationPreview.java @@ -6,7 +6,6 @@ import org.eclipse.ui.themes.ITheme; import org.eclipse.ui.themes.IThemePreview; import net.haspamelodica.swt.helper.swtobjectwrappers.Point; -import net.haspamelodica.swt.helper.zoomablecanvas.helper.ZoomableCanvasUserInput; import net.mograsim.logic.core.timeline.Timeline; import net.mograsim.logic.ui.LogicExecuter; import net.mograsim.logic.ui.LogicUICanvas; @@ -79,21 +78,9 @@ public class SimulationPreview implements IThemePreview rIn.clicked(0, 0); ui = new LogicUICanvas(parent, SWT.NONE, model); - ZoomableCanvasUserInput userInput = new ZoomableCanvasUserInput(ui); - userInput.buttonDrag = 3; - userInput.buttonZoom = 2; - userInput.enableUserInput(); - update(currentTheme); - currentTheme.getColorRegistry().addListener(e -> update(currentTheme)); - - ui.zoomSteps(12, 10, 10); - exec.startLiveExecution(); - } - private void update(ITheme currentTheme) - { - ui.setBackground(currentTheme.getColorRegistry().get("net.mograsim.plugin.sim_backgound")); - ui.setForeground(currentTheme.getColorRegistry().get("net.mograsim.plugin.sim_text_color")); + ui.zoom(3.5, 10, 10); + exec.startLiveExecution(); } @Override