summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2018-12-01 16:07:55 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2018-12-01 16:17:15 +0000
commitc4c77d4826cabf2d41e8614225609427f57fa1f4 (patch)
tree0a40b9be68336b3cd7be2f112414dcbd4157b292 /src
parentAdd scrool insensitive and reset if desktop change size (diff)
downloadinkscape-c4c77d4826cabf2d41e8614225609427f57fa1f4.tar.gz
inkscape-c4c77d4826cabf2d41e8614225609427f57fa1f4.zip
Fix merge to master and add shortcut
Diffstat (limited to 'src')
-rw-r--r--src/desktop.cpp2
-rw-r--r--src/display/drawing-item.cpp9
-rw-r--r--src/display/drawing-item.h3
-rw-r--r--src/object/sp-item.cpp2
-rw-r--r--src/ui/view/svg-view.cpp2
-rw-r--r--src/verbs.cpp6
6 files changed, 12 insertions, 12 deletions
diff --git a/src/desktop.cpp b/src/desktop.cpp
index 902e4f62e..45026102b 100644
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
@@ -1818,7 +1818,7 @@ static gint
_arena_handler (SPCanvasArena */*arena*/, Inkscape::DrawingItem *ai, GdkEvent *event, SPDesktop *desktop)
{
if (ai) {
- SPItem *spi = ai->getItem();
+ SPItem *spi = (ai) ? static_cast<SPItem *>(ai->data()) : nullptr;
return sp_event_context_item_handler (desktop->event_context, spi, event);
} else {
return sp_event_context_root_handler (desktop->event_context, event);
diff --git a/src/display/drawing-item.cpp b/src/display/drawing-item.cpp
index d3729da94..922576ec5 100644
--- a/src/display/drawing-item.cpp
+++ b/src/display/drawing-item.cpp
@@ -121,7 +121,7 @@ DrawingItem::DrawingItem(Drawing &drawing)
, _fill_pattern(nullptr)
, _stroke_pattern(nullptr)
, _filter(nullptr)
- , _item(nullptr)
+ , _user_data(nullptr)
, _cache(nullptr)
, _state(0)
, _child_type(CHILD_ORPHAN)
@@ -1031,9 +1031,10 @@ DrawingItem::pick(Geom::Point const &p, double delta, unsigned flags)
Glib::ustring
DrawingItem::name()
{
- if (_item) {
- if (_item->getId())
- return _item->getId();
+ SPObject *object = static_cast<SPObject *>(_user_data);
+ if (object) {
+ if(object->getId())
+ return object->getId();
else
return "No object id";
} else {
diff --git a/src/display/drawing-item.h b/src/display/drawing-item.h
index 2481a01a1..8cf7604c9 100644
--- a/src/display/drawing-item.h
+++ b/src/display/drawing-item.h
@@ -131,7 +131,6 @@ public:
void setKey(unsigned key) { _key = key; }
unsigned key() const { return _key; }
-
void setData(void *data) { _user_data = data; }
void *data() const { return _user_data; }
@@ -205,7 +204,7 @@ protected:
DrawingPattern *_fill_pattern;
DrawingPattern *_stroke_pattern;
Inkscape::Filters::Filter *_filter;
- SPItem *_item; ///< Used to associate DrawingItems with SPItems that created them
+ void *_user_data; ///< Used to associate DrawingItems with SPItems that created them
DrawingCache *_cache;
CacheList::iterator _cache_iterator;
diff --git a/src/object/sp-item.cpp b/src/object/sp-item.cpp
index 6a9bd9615..e9ec95252 100644
--- a/src/object/sp-item.cpp
+++ b/src/object/sp-item.cpp
@@ -1179,7 +1179,7 @@ Inkscape::DrawingItem *SPItem::invoke_show(Inkscape::Drawing &drawing, unsigned
stroke_ps->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
}
}
- ai->setItem(this);
+ ai->setData(this);
ai->setItemBounds(geometricBounds());
}
diff --git a/src/ui/view/svg-view.cpp b/src/ui/view/svg-view.cpp
index 14ced7fac..5e388f71b 100644
--- a/src/ui/view/svg-view.cpp
+++ b/src/ui/view/svg-view.cpp
@@ -142,7 +142,7 @@ static gint arena_handler(SPCanvasArena */*arena*/, Inkscape::DrawingItem *ai, G
static gboolean active = FALSE;
SPEvent spev;
- SPItem *spitem = (ai) ? ai->getItem() : nullptr;
+ SPItem *spitem = (ai) ? static_cast<SPItem *>(ai->data()) : nullptr;
switch (event->type) {
case GDK_BUTTON_PRESS:
diff --git a/src/verbs.cpp b/src/verbs.cpp
index fa87cc691..1d80d296b 100644
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
@@ -3121,9 +3121,9 @@ Verb *Verb::_base_verbs[] = {
// N_("Switch to print colors preview mode"), NULL),
new ZoomVerb(SP_VERB_VIEW_COLOR_MODE_TOGGLE, "ViewColorModeToggle", N_("_Toggle"),
N_("Toggle between normal and grayscale color display modes"), nullptr),
-
- new ZoomVerb(SP_VERB_VIEW_TOGGLE_SPLIT, "ViewSplitModeToggle", N_("Togg_le Split View Mode"),
- N_("Split canvas in 2 to show outline"), INKSCAPE_ICON("dot")),
+
+ new ZoomVerb(SP_VERB_VIEW_TOGGLE_SPLIT, "ViewSplitModeToggle", N_("Toggle _Split View Mode"),
+ N_("Split canvas in 2 to show outline"), nullptr),
new ZoomVerb(SP_VERB_VIEW_CMS_TOGGLE, "ViewCmsToggle", N_("Color-managed view"),
N_("Toggle color-managed display for this document window"), INKSCAPE_ICON("color-management")),