summaryrefslogtreecommitdiffstats
path: root/src/object/sp-stop.cpp
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2018-10-04 17:30:42 +0000
committerMartin Owens <doctormo@gmail.com>2018-10-05 22:03:39 +0000
commit7ac5f2923ed2efb98ba39c391954acd8865fc3e6 (patch)
tree9781fedbd74580a5e668565339f10a38c85394e8 /src/object/sp-stop.cpp
parentRemoval of code but breaks gradients (diff)
downloadinkscape-7ac5f2923ed2efb98ba39c391954acd8865fc3e6.tar.gz
inkscape-7ac5f2923ed2efb98ba39c391954acd8865fc3e6.zip
Replicate some of the sp-item attribute handling for sp-stop
Diffstat (limited to 'src/object/sp-stop.cpp')
-rw-r--r--src/object/sp-stop.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/object/sp-stop.cpp b/src/object/sp-stop.cpp
index c76524b95..7386599ff 100644
--- a/src/object/sp-stop.cpp
+++ b/src/object/sp-stop.cpp
@@ -33,6 +33,7 @@ SPStop::~SPStop() = default;
void SPStop::build(SPDocument* doc, Inkscape::XML::Node* repr) {
SPObject::build(doc, repr);
+ this->readAttr( "style" );
this->readAttr( "offset" );
this->readAttr( "path" ); // For mesh
SPObject::build(doc, repr);
@@ -63,7 +64,11 @@ void SPStop::set(unsigned int key, const gchar* value) {
break;
}
default: {
- SPObject::set(key, value);
+ if (SP_ATTRIBUTE_IS_CSS(key)) {
+ this->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG);
+ } else {
+ SPObject::set(key, value);
+ }
break;
}
}
@@ -129,7 +134,6 @@ SPColor SPStop::getColor() const
return style->color.value.color;
}
Glib::ustring color = style->stop_color.value.color.toString();
- g_warning("Getting stop_color: %s", color.c_str());
return style->stop_color.value.color;
}
@@ -143,7 +147,6 @@ gfloat SPStop::getOpacity() const
*/
guint32 SPStop::get_rgba32() const
{
- g_warning("Asking for rgba32!");
return getColor().toRGBA32(getOpacity());
}