diff options
| author | Patrick Storz <eduard.braun2@gmx.de> | 2019-02-17 18:33:48 +0000 |
|---|---|---|
| committer | Patrick Storz <eduard.braun2@gmx.de> | 2019-02-20 01:44:47 +0000 |
| commit | 7048d098f15eae7138b7d01c88ad6aebc1afaf26 (patch) | |
| tree | ceacf61accdeea7f64ec3c5cceb5e3a1ed9026a4 /src/inkscape-window.cpp | |
| parent | Fix typo in svg-preview.h and update POTFILES.in (diff) | |
| download | inkscape-7048d098f15eae7138b7d01c88ad6aebc1afaf26.tar.gz inkscape-7048d098f15eae7138b7d01c88ad6aebc1afaf26.zip | |
Rescue code for restoring last used window geometry
It was accidentally dropped in
8b1840f9507f10911f63fc00b9885354ead99d53
Also show window *after* setting position/size. This gives the
window manager the chance to move an off-screen window back into
the visible desktop bounds (e.g. after a monitor was disconnected).
Diffstat (limited to 'src/inkscape-window.cpp')
| -rw-r--r-- | src/inkscape-window.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/inkscape-window.cpp b/src/inkscape-window.cpp index 8c0525a87..f85d94473 100644 --- a/src/inkscape-window.cpp +++ b/src/inkscape-window.cpp @@ -85,11 +85,14 @@ InkscapeWindow::InkscapeWindow(SPDocument* document) // ================ Window Options ============== - show(); // Must show before resize! - // Resize the window to match the document properties sp_namedview_window_from_document(_desktop); // This should probably be a member function here. + + // Must show before setting zoom and view! (crashes otherwise) + // Should show after resizing/moving to allow window manager to correct an invalid windows size/position + show(); + sp_namedview_zoom_and_view_from_document(_desktop); sp_namedview_update_layers_from_document(_desktop); } |
