summaryrefslogtreecommitdiffstats
path: root/src/sp-namedview.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2007-11-13 14:24:25 +0000
committercilix42 <cilix42@users.sourceforge.net>2007-11-13 14:24:25 +0000
commit09c07deb26109ae0c94068614c6d061f907b5542 (patch)
tree5c3456fe94bce41b12edacf6f470ba6b13dc7936 /src/sp-namedview.cpp
parentmake INX <option> translatable (diff)
downloadinkscape-09c07deb26109ae0c94068614c6d061f907b5542.tar.gz
inkscape-09c07deb26109ae0c94068614c6d061f907b5542.zip
Don't set inkscape:modified on startup when grids are shown/hidden.
(bzr r4077)
Diffstat (limited to 'src/sp-namedview.cpp')
-rw-r--r--src/sp-namedview.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp
index 8b9bc008e..9fba7bc99 100644
--- a/src/sp-namedview.cpp
+++ b/src/sp-namedview.cpp
@@ -610,7 +610,7 @@ void SPNamedView::show(SPDesktop *desktop)
}
}
- desktop->showGrids(grids_visible);
+ desktop->showGrids(grids_visible, false);
}
#define MIN_ONSCREEN_DISTANCE 50
@@ -782,7 +782,7 @@ void sp_namedview_toggle_guides(SPDocument *doc, Inkscape::XML::Node *repr)
sp_document_set_undo_sensitive(doc, saved);
}
-void sp_namedview_show_grids(SPNamedView * namedview, bool show)
+void sp_namedview_show_grids(SPNamedView * namedview, bool show, bool dirty_document)
{
namedview->grids_visible = show;
@@ -794,7 +794,11 @@ void sp_namedview_show_grids(SPNamedView * namedview, bool show)
sp_repr_set_boolean(repr, "showgrid", namedview->grids_visible);
- doc->rroot->setAttribute("sodipodi:modified", "true");
+ /* we don't want the document to get dirty on startup; that's when
+ we call this function with dirty_document = false */
+ if (dirty_document) {
+ doc->rroot->setAttribute("sodipodi:modified", "true");
+ }
sp_document_set_undo_sensitive(doc, saved);
}