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:
@@ -17,4 +17,12 @@
|
|||||||
</gridColor>
|
</gridColor>
|
||||||
</org.diylc.core.Theme>
|
</org.diylc.core.Theme>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<string>showTemplatesAtStartup</string>
|
||||||
|
<boolean>false</boolean>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<string>exportGrid</string>
|
||||||
|
<boolean>true</boolean>
|
||||||
|
</entry>
|
||||||
</map>
|
</map>
|
||||||
+1
-1
@@ -112,7 +112,7 @@ public class CanvasPlugin implements IPlugIn, ClipboardOwner {
|
|||||||
private RulerScrollPane getScrollPane() {
|
private RulerScrollPane getScrollPane() {
|
||||||
if (scrollPane == null) {
|
if (scrollPane == null) {
|
||||||
scrollPane = new RulerScrollPane(getCanvasPanel(), new ProjectDrawingProvider(
|
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());
|
SizeUnit.in).convertToPixels());
|
||||||
boolean metric = ConfigurationManager.getInstance().readBoolean(Presenter.METRIC_KEY,
|
boolean metric = ConfigurationManager.getInstance().readBoolean(Presenter.METRIC_KEY,
|
||||||
true);
|
true);
|
||||||
|
|||||||
+1
-1
@@ -31,7 +31,7 @@ public class FileMenuPlugin implements IPlugIn {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void connect(IPlugInPort plugInPort) {
|
public void connect(IPlugInPort plugInPort) {
|
||||||
this.drawingProvider = new ProjectDrawingProvider(plugInPort, false);
|
this.drawingProvider = new ProjectDrawingProvider(plugInPort, false, true);
|
||||||
this.traceMaskDrawingProvider = new TraceMaskDrawingProvider(plugInPort);
|
this.traceMaskDrawingProvider = new TraceMaskDrawingProvider(plugInPort);
|
||||||
|
|
||||||
ActionFactory actionFactory = ActionFactory.getInstance();
|
ActionFactory actionFactory = ActionFactory.getInstance();
|
||||||
|
|||||||
+7
-2
@@ -21,11 +21,14 @@ public class ProjectDrawingProvider implements IDrawingProvider {
|
|||||||
|
|
||||||
private IPlugInPort plugInPort;
|
private IPlugInPort plugInPort;
|
||||||
private boolean useZoom;
|
private boolean useZoom;
|
||||||
|
private boolean showGridWhenNeeded;
|
||||||
|
|
||||||
public ProjectDrawingProvider(IPlugInPort plugInPort, boolean useZoom) {
|
public ProjectDrawingProvider(IPlugInPort plugInPort, boolean useZoom,
|
||||||
|
boolean showGridWhenNeeded) {
|
||||||
super();
|
super();
|
||||||
this.plugInPort = plugInPort;
|
this.plugInPort = plugInPort;
|
||||||
this.useZoom = useZoom;
|
this.useZoom = useZoom;
|
||||||
|
this.showGridWhenNeeded = showGridWhenNeeded;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -34,7 +37,9 @@ public class ProjectDrawingProvider implements IDrawingProvider {
|
|||||||
if (useZoom) {
|
if (useZoom) {
|
||||||
options.add(DrawOption.ZOOM);
|
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);
|
options.add(DrawOption.GRID);
|
||||||
}
|
}
|
||||||
plugInPort.draw((Graphics2D) g, options, null);
|
plugInPort.draw((Graphics2D) g, options, null);
|
||||||
|
|||||||
Reference in New Issue
Block a user