summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5035e5a)
raw | patch | inline | side by side (parent: 5035e5a)
author | cilix42 <cilix42@users.sourceforge.net> | |
Tue, 11 Sep 2007 23:22:50 +0000 (23:22 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Tue, 11 Sep 2007 23:22:50 +0000 (23:22 +0000) |
src/file.cpp | patch | blob | history |
diff --git a/src/file.cpp b/src/file.cpp
index a08be62c0cfd47fd8586fbde2a47e4ea0b00daab..abb00be4cf81af4567427c4d5136140bdb45f3ad 100644 (file)
--- a/src/file.cpp
+++ b/src/file.cpp
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;
}