diff --git a/DesktopPreview/src/org/gephi/desktop/preview/PreviewUIControllerImpl.java b/DesktopPreview/src/org/gephi/desktop/preview/PreviewUIControllerImpl.java index 799ebacf2..5bc52ac34 100644 --- a/DesktopPreview/src/org/gephi/desktop/preview/PreviewUIControllerImpl.java +++ b/DesktopPreview/src/org/gephi/desktop/preview/PreviewUIControllerImpl.java @@ -163,6 +163,7 @@ public void run() { model.setRefreshing(true); fireEvent(REFRESHING, true); + previewController.getModel().getProperties().putValue(PreviewProperty.VISIBILITY_RATIO, model.getVisibilityRatio()); previewController.refreshPreview(); fireEvent(REFRESHED, model); diff --git a/DesktopPreview/src/org/gephi/desktop/preview/PreviewUIModelImpl.java b/DesktopPreview/src/org/gephi/desktop/preview/PreviewUIModelImpl.java index ec1f7fcf7..37a39cc55 100644 --- a/DesktopPreview/src/org/gephi/desktop/preview/PreviewUIModelImpl.java +++ b/DesktopPreview/src/org/gephi/desktop/preview/PreviewUIModelImpl.java @@ -53,8 +53,6 @@ public float getVisibilityRatio() { public void setVisibilityRatio(float visibilityRatio) { this.visibilityRatio = visibilityRatio; - PreviewController previewController = Lookup.getDefault().lookup(PreviewController.class); - previewController.getModel().getProperties().putValue(PreviewProperty.VISIBILITY_RATIO, visibilityRatio); } public void setCurrentPreset(PreviewPreset preset) { diff --git a/PreviewExport/src/org/gephi/io/exporter/preview/PDFExporter.java b/PreviewExport/src/org/gephi/io/exporter/preview/PDFExporter.java index a1ecc58fe..a988868da 100644 --- a/PreviewExport/src/org/gephi/io/exporter/preview/PDFExporter.java +++ b/PreviewExport/src/org/gephi/io/exporter/preview/PDFExporter.java @@ -70,6 +70,7 @@ public boolean execute() { Progress.start(progress); PreviewController controller = Lookup.getDefault().lookup(PreviewController.class); + controller.getModel(workspace).getProperties().putValue(PreviewProperty.VISIBILITY_RATIO, 1.0); controller.refreshPreview(workspace); PreviewProperties props = controller.getModel(workspace).getProperties(); diff --git a/PreviewExport/src/org/gephi/io/exporter/preview/PNGExporter.java b/PreviewExport/src/org/gephi/io/exporter/preview/PNGExporter.java index d3fbc0144..90774306a 100644 --- a/PreviewExport/src/org/gephi/io/exporter/preview/PNGExporter.java +++ b/PreviewExport/src/org/gephi/io/exporter/preview/PNGExporter.java @@ -58,7 +58,9 @@ public boolean execute() { Progress.start(progress); PreviewController controller = Lookup.getDefault().lookup(PreviewController.class); + controller.getModel(workspace).getProperties().putValue(PreviewProperty.VISIBILITY_RATIO, 1.0); controller.refreshPreview(workspace); + PreviewProperties props = controller.getModel(workspace).getProperties(); props.putValue("width", width); props.putValue("height", height); diff --git a/PreviewExport/src/org/gephi/io/exporter/preview/SVGExporter.java b/PreviewExport/src/org/gephi/io/exporter/preview/SVGExporter.java index a8888ae9d..e8ba08564 100644 --- a/PreviewExport/src/org/gephi/io/exporter/preview/SVGExporter.java +++ b/PreviewExport/src/org/gephi/io/exporter/preview/SVGExporter.java @@ -59,7 +59,9 @@ public class SVGExporter implements CharacterExporter, VectorExporter, LongTask public boolean execute() { PreviewController controller = Lookup.getDefault().lookup(PreviewController.class); + controller.getModel(workspace).getProperties().putValue(PreviewProperty.VISIBILITY_RATIO, 1.0); controller.refreshPreview(workspace); + PreviewProperties props = controller.getModel(workspace).getProperties(); props.putValue(SVGTarget.SCALE_STROKES, scaleStrokes); props.putValue(PreviewProperty.MARGIN, new Float((float) margin));