From: cilix42 Date: Tue, 11 Sep 2007 23:22:50 +0000 (+0000) Subject: Preserve current zoom and view for reverted documents X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=622e69d46d2e53e8bf2562dff810ebb8eb811e91;p=inkscape.git Preserve current zoom and view for reverted documents --- diff --git a/src/file.cpp b/src/file.cpp index a08be62c0..abb00be4c 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -264,7 +264,16 @@ sp_file_revert_dialog() if (do_revert) { // Allow overwriting of current document. doc->virgin = TRUE; + + // remember current zoom and view + double zoom = desktop->current_zoom(); + NR::Point c = desktop->get_display_area().midpoint(); + reverted = sp_file_open(uri,NULL); + if (reverted) { + // restore zoom and view + desktop->zoom_absolute(c[NR::X], c[NR::Y], zoom); + } } else { reverted = false; }