summaryrefslogtreecommitdiffstats
path: root/src/sp-namedview.cpp
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-10-04 01:32:26 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-10-04 01:32:26 +0000
commit380f71793aba455f86eae2c75532b24dc613e71d (patch)
treea516ab2c65aea18caba79f97664f28a157a4e5f8 /src/sp-namedview.cpp
parentAllow one style entry per unique CSS style for each family. (diff)
downloadinkscape-380f71793aba455f86eae2c75532b24dc613e71d.tar.gz
inkscape-380f71793aba455f86eae2c75532b24dc613e71d.zip
Refactor SPGuide to use more C++
(bzr r13341.1.241)
Diffstat (limited to 'src/sp-namedview.cpp')
-rw-r--r--src/sp-namedview.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp
index 1d9fa06a3..8b28347f1 100644
--- a/src/sp-namedview.cpp
+++ b/src/sp-namedview.cpp
@@ -956,14 +956,10 @@ static void sp_namedview_setup_guides(SPNamedView *nv)
static void sp_namedview_show_single_guide(SPGuide* guide, bool show)
{
- for (GSList *v = guide->views; v != NULL; v = v->next) {
- if (show) {
- sp_canvas_item_show(SP_CANVAS_ITEM(v->data));
- sp_canvas_item_show(SP_CANVAS_ITEM(SP_GUIDELINE(v->data)->origin));
- } else {
- sp_canvas_item_hide(SP_CANVAS_ITEM(v->data));
- sp_canvas_item_hide(SP_CANVAS_ITEM(SP_GUIDELINE(v->data)->origin));
- }
+ if (show) {
+ guide->showSPGuide();
+ } else {
+ guide->hideSPGuide();
}
}
@@ -1156,9 +1152,9 @@ Inkscape::CanvasGrid * sp_namedview_get_first_enabled_grid(SPNamedView *namedvie
void SPNamedView::translateGuides(Geom::Translate const &tr) {
for (GSList *l = guides; l != NULL; l = l->next) {
SPGuide &guide = *SP_GUIDE(l->data);
- Geom::Point point_on_line = guide.point_on_line;
+ Geom::Point point_on_line = guide.getPoint();
point_on_line *= tr;
- sp_guide_moveto(guide, point_on_line, true);
+ guide.moveto(point_on_line, true);
}
}