mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
don't show grid on the thumbnail
This commit is contained in:
+1
-1
@@ -112,7 +112,7 @@ public class CanvasPlugin implements IPlugIn, ClipboardOwner {
|
||||
private RulerScrollPane getScrollPane() {
|
||||
if (scrollPane == null) {
|
||||
scrollPane = new RulerScrollPane(getCanvasPanel(), new ProjectDrawingProvider(
|
||||
plugInPort, true), new Size(1d, SizeUnit.cm).convertToPixels(), new Size(1d,
|
||||
plugInPort, true, false), new Size(1d, SizeUnit.cm).convertToPixels(), new Size(1d,
|
||||
SizeUnit.in).convertToPixels());
|
||||
boolean metric = ConfigurationManager.getInstance().readBoolean(Presenter.METRIC_KEY,
|
||||
true);
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ public class FileMenuPlugin implements IPlugIn {
|
||||
|
||||
@Override
|
||||
public void connect(IPlugInPort plugInPort) {
|
||||
this.drawingProvider = new ProjectDrawingProvider(plugInPort, false);
|
||||
this.drawingProvider = new ProjectDrawingProvider(plugInPort, false, true);
|
||||
this.traceMaskDrawingProvider = new TraceMaskDrawingProvider(plugInPort);
|
||||
|
||||
ActionFactory actionFactory = ActionFactory.getInstance();
|
||||
|
||||
+7
-2
@@ -21,11 +21,14 @@ public class ProjectDrawingProvider implements IDrawingProvider {
|
||||
|
||||
private IPlugInPort plugInPort;
|
||||
private boolean useZoom;
|
||||
private boolean showGridWhenNeeded;
|
||||
|
||||
public ProjectDrawingProvider(IPlugInPort plugInPort, boolean useZoom) {
|
||||
public ProjectDrawingProvider(IPlugInPort plugInPort, boolean useZoom,
|
||||
boolean showGridWhenNeeded) {
|
||||
super();
|
||||
this.plugInPort = plugInPort;
|
||||
this.useZoom = useZoom;
|
||||
this.showGridWhenNeeded = showGridWhenNeeded;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -34,7 +37,9 @@ public class ProjectDrawingProvider implements IDrawingProvider {
|
||||
if (useZoom) {
|
||||
options.add(DrawOption.ZOOM);
|
||||
}
|
||||
if (ConfigurationManager.getInstance().readBoolean(IPlugInPort.EXPORT_GRID_KEY, false)) {
|
||||
if (showGridWhenNeeded
|
||||
&& ConfigurationManager.getInstance().readBoolean(IPlugInPort.EXPORT_GRID_KEY,
|
||||
false)) {
|
||||
options.add(DrawOption.GRID);
|
||||
}
|
||||
plugInPort.draw((Graphics2D) g, options, null);
|
||||
|
||||
Reference in New Issue
Block a user