summaryrefslogtreecommitdiffstats
path: root/src/sp-namedview.cpp
diff options
context:
space:
mode:
authorJohn Smith <john.smith7545@yahoo.com>2012-08-09 07:23:35 +0000
committerJohn Smith <john.smith7545@yahoo.com>2012-08-09 07:23:35 +0000
commit0d1d59a3dfe51740e7601dba044c9ed979e4c9f7 (patch)
tree7b97271b606850781571acd163c8b957aae1e379 /src/sp-namedview.cpp
parentcopyright message rewritten object properties dialog (diff)
downloadinkscape-0d1d59a3dfe51740e7601dba044c9ed979e4c9f7.tar.gz
inkscape-0d1d59a3dfe51740e7601dba044c9ed979e4c9f7.zip
Fix for 819671 : No visual indication for grid and snap being on/off
(bzr r11600)
Diffstat (limited to 'src/sp-namedview.cpp')
-rw-r--r--src/sp-namedview.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp
index d9c68f7fb..75c2f8343 100644
--- a/src/sp-namedview.cpp
+++ b/src/sp-namedview.cpp
@@ -1073,6 +1073,17 @@ void SPNamedView::setGuides(bool v)
sp_repr_set_boolean(this->getRepr(), "inkscape:guide-bbox", v);
}
+bool SPNamedView::getGuides()
+{
+ g_assert(this->getRepr() != NULL);
+ unsigned int v;
+ unsigned int set = sp_repr_get_boolean(this->getRepr(), "showguides", &v);
+ if (!set) { // hide guides if not specified, for backwards compatibility
+ v = FALSE;
+ }
+
+ return v;
+}
/**
* Gets page fitting margin information from the namedview node in the XML.
* \param nv_repr reference to this document's namedview