summaryrefslogtreecommitdiffstats
path: root/src/display
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2018-12-01 16:47:43 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2018-12-01 16:47:43 +0000
commit16b6bdbb7c160d95473256c7b414125310af25fe (patch)
tree0cb2b056c6f7ff7bf1ce50aac8cea8f064af1a0f /src/display
parentFix merging (diff)
downloadinkscape-16b6bdbb7c160d95473256c7b414125310af25fe.tar.gz
inkscape-16b6bdbb7c160d95473256c7b414125310af25fe.zip
Fix merging
Diffstat (limited to 'src/display')
-rw-r--r--src/display/drawing-item.cpp9
-rw-r--r--src/display/drawing-item.h7
2 files changed, 8 insertions, 8 deletions
diff --git a/src/display/drawing-item.cpp b/src/display/drawing-item.cpp
index 922576ec5..d3729da94 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)
- , _user_data(nullptr)
+ , _item(nullptr)
, _cache(nullptr)
, _state(0)
, _child_type(CHILD_ORPHAN)
@@ -1031,10 +1031,9 @@ DrawingItem::pick(Geom::Point const &p, double delta, unsigned flags)
Glib::ustring
DrawingItem::name()
{
- SPObject *object = static_cast<SPObject *>(_user_data);
- if (object) {
- if(object->getId())
- return object->getId();
+ if (_item) {
+ if (_item->getId())
+ return _item->getId();
else
return "No object id";
} else {
diff --git a/src/display/drawing-item.h b/src/display/drawing-item.h
index 8cf7604c9..f0107cdc7 100644
--- a/src/display/drawing-item.h
+++ b/src/display/drawing-item.h
@@ -131,8 +131,9 @@ 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; }
+ void setItem(SPItem *item) { _item = item; }
+ SPItem* getItem() const { return _item; } // SPItem
+
void update(Geom::IntRect const &area = Geom::IntRect::infinite(), UpdateContext const &ctx = UpdateContext(), unsigned flags = STATE_ALL, unsigned reset = 0);
unsigned render(DrawingContext &dc, Geom::IntRect const &area, unsigned flags = 0, DrawingItem *stop_at = nullptr);
@@ -204,7 +205,7 @@ protected:
DrawingPattern *_fill_pattern;
DrawingPattern *_stroke_pattern;
Inkscape::Filters::Filter *_filter;
- void *_user_data; ///< Used to associate DrawingItems with SPItems that created them
+ SPItem *_item; ///< Used to associate DrawingItems with SPItems that created them
DrawingCache *_cache;
CacheList::iterator _cache_iterator;