aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-11-02 11:28:48 +0100
committerPřemysl Eric Janouch <p@janouch.name>2021-11-02 11:28:48 +0100
commitde291ffddb3c92252199dc424d68c2adc84c53f8 (patch)
tree01845fece05aced42deac8c764a416c1355a08fb
parentbaaca4c58f92115676638599fa50c35b50351f9c (diff)
downloadlogdiag-de291ffddb3c92252199dc424d68c2adc84c53f8.tar.gz
logdiag-de291ffddb3c92252199dc424d68c2adc84c53f8.tar.xz
logdiag-de291ffddb3c92252199dc424d68c2adc84c53f8.zip
Reset view position on opening a file
-rw-r--r--src/ld-window-main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ld-window-main.c b/src/ld-window-main.c
index 51769f6..7acd319 100644
--- a/src/ld-window-main.c
+++ b/src/ld-window-main.c
@@ -757,6 +757,9 @@ diagram_open (LdWindowMain *self, const gchar *filename)
ld_diagram_set_modified (self->priv->diagram, FALSE);
diagram_set_filename (self, g_strdup (filename));
+
+ ld_diagram_view_set_x (self->priv->view, 0);
+ ld_diagram_view_set_y (self->priv->view, 0);
return TRUE;
}