summaryrefslogtreecommitdiffstats
path: root/src/widgets/stroke-style.cpp
diff options
context:
space:
mode:
authorThomas Holder <thomas@thomas-holder.de>2019-11-03 19:02:46 +0000
committerThomas Holder <thomas@thomas-holder.de>2019-11-03 19:59:20 +0000
commit7308f9e1e734fc54661b3d79c4ff8e8fbeb84867 (patch)
tree1c4287533b3727dcc74b6bd85de7f3834bedab7c /src/widgets/stroke-style.cpp
parentmake SP_ATTRIBUTE_IS_CSS a function (diff)
downloadinkscape-7308f9e1e734fc54661b3d79c4ff8e8fbeb84867.tar.gz
inkscape-7308f9e1e734fc54661b3d79c4ff8e8fbeb84867.zip
refactor: Eliminate SPIString::value_default
- eliminate value_default - make value private (-> _value) - add value() method
Diffstat (limited to 'src/widgets/stroke-style.cpp')
-rw-r--r--src/widgets/stroke-style.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp
index 44f9ac714..815111dd9 100644
--- a/src/widgets/stroke-style.cpp
+++ b/src/widgets/stroke-style.cpp
@@ -591,7 +591,7 @@ StrokeStyle::forkMarker(SPObject *marker, int loc, SPItem *item)
unsigned int refs = 0;
for (int i = SP_MARKER_LOC_START; i < SP_MARKER_LOC_QTY; i++) {
if (item->style->marker_ptrs[i]->set &&
- !strcmp(urlId.c_str(), item->style->marker_ptrs[i]->value)) {
+ !strcmp(urlId.c_str(), item->style->marker_ptrs[i]->value())) {
refs++;
}
}
@@ -1277,12 +1277,14 @@ StrokeStyle::updateAllMarkers(std::vector<SPItem*> const &objects, bool skip_und
if (!all_texts) {
for (SPObject *object : simplified_list) {
+ char const *value = object->style->marker_ptrs[markertype.loc]->value();
+
// If the object has this type of markers,
- if (object->style->marker_ptrs[markertype.loc]->value == nullptr)
+ if (value == nullptr)
continue;
// Extract the name of the marker that the object uses
- marker = getMarkerObj(object->style->marker_ptrs[markertype.loc]->value, object->document);
+ marker = getMarkerObj(value, object->document);
// Set the marker color
if (update < 0) {