Commit 79fcb914 authored by Aleksey Pivovarov's avatar Aleksey Pivovarov
Browse files

IDEA-97673 images: reduce blinking on editor initialisation

* avoid changing size twice: at editor creation and when adding it
  into component hierarchy
parent 10b4472a
Branches unavailable Tags unavailable
No related merge requests found
Showing with 8 additions and 2 deletions
+8 -2
......@@ -269,9 +269,15 @@ final class ImageEditorUI extends JPanel implements DataProvider, CopyProvider,
document.setFormat(format);
if (previousImage == null || !zoomModel.isZoomLevelChanged()) {
zoomModel.setZoomFactor(1.0d);
Options options = OptionsManager.getInstance().getOptions();
ZoomOptions zoomOptions = options.getEditorOptions().getZoomOptions();
updateZoomFactor();
if (zoomOptions.isSmartZooming()) {
updateZoomFactor();
}
else {
zoomModel.setZoomFactor(1.0);
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment