summaryrefslogtreecommitdiffstats
path: root/src/desktop.cpp
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2019-03-06 01:58:30 +0000
committerMartin Owens <doctormo@gmail.com>2019-03-06 01:58:30 +0000
commite5bf2580b421854298c4d2eaa62f9324ed03f81c (patch)
tree574232d8b2fa35b08210b337f6a868dfca4f2b09 /src/desktop.cpp
parentRevert modal fix to fix #108 (diff)
parentChanged tabs to spaces (diff)
downloadinkscape-e5bf2580b421854298c4d2eaa62f9324ed03f81c.tar.gz
inkscape-e5bf2580b421854298c4d2eaa62f9324ed03f81c.zip
Merge addition of center on page button
Diffstat (limited to 'src/desktop.cpp')
-rw-r--r--src/desktop.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/desktop.cpp b/src/desktop.cpp
index 3f40e7e75..ebc3e5591 100644
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
@@ -1064,6 +1064,14 @@ SPDesktop::zoom_selection()
set_display_area(*d, 10);
}
+/**
+ * Centre Page in window, without zooming
+ */
+void SPDesktop::zoom_center_page()
+{
+ zoom_absolute_center_point(Geom::Point(doc()->getWidth().value("px")/2, doc()->getHeight().value("px")/2), this->current_zoom());
+}
+
/**
* Performs a quick zoom into what the user is working on.