diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2014-12-23 09:25:08 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2014-12-23 09:25:08 +0000 |
| commit | f01a18216e26fd87a53188018e03527c7fdf8a57 (patch) | |
| tree | e5fc50bfa2b278d007659dd0aa4c6587414731dd /src/sp-use.cpp | |
| parent | Bug #1380413: make sure that the rect toolbar knows when and when not to update (diff) | |
| download | inkscape-f01a18216e26fd87a53188018e03527c7fdf8a57.tar.gz inkscape-f01a18216e26fd87a53188018e03527c7fdf8a57.zip | |
Use gray for 'context-fill' and 'context-stroke' in marker selector.
Fix rendering bug when elements with 'context-fill' and 'context-stroke' are inside groups.
(bzr r13822)
Diffstat (limited to 'src/sp-use.cpp')
| -rw-r--r-- | src/sp-use.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/sp-use.cpp b/src/sp-use.cpp index cadd6a16c..ba3f4a9d7 100644 --- a/src/sp-use.cpp +++ b/src/sp-use.cpp @@ -281,10 +281,12 @@ gchar* SPUse::description() const { Inkscape::DrawingItem* SPUse::show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) { + // std::cout << "SPUse::show: " << (getId()?getId():"null") << std::endl; Inkscape::DrawingGroup *ai = new Inkscape::DrawingGroup(drawing); ai->setPickChildren(false); - ai->setStyle(this->style, this->style); - + this->context_style = this->style; + ai->setStyle(this->style, this->context_style); + if (this->child) { Inkscape::DrawingItem *ac = this->child->invoke_show(drawing, key, flags); @@ -530,6 +532,7 @@ void SPUse::delete_self() { } void SPUse::update(SPCtx *ctx, unsigned flags) { + // std::cout << "SPUse::update: " << (getId()?getId():"null") << std::endl; SPItemCtx *ictx = (SPItemCtx *) ctx; SPItemCtx cctx = *ictx; @@ -580,7 +583,8 @@ void SPUse::update(SPCtx *ctx, unsigned flags) { if (flags & SP_OBJECT_STYLE_MODIFIED_FLAG) { for (SPItemView *v = this->display; v != NULL; v = v->next) { Inkscape::DrawingGroup *g = dynamic_cast<Inkscape::DrawingGroup *>(v->arenaitem); - g->setStyle(this->style, this->style); + this->context_style = this->style; + g->setStyle(this->style, this->context_style); } } @@ -593,6 +597,7 @@ void SPUse::update(SPCtx *ctx, unsigned flags) { } void SPUse::modified(unsigned int flags) { + // std::cout << "SPUse::modified: " << (getId()?getId():"null") << std::endl; if (flags & SP_OBJECT_MODIFIED_FLAG) { flags |= SP_OBJECT_PARENT_MODIFIED_FLAG; } @@ -602,7 +607,8 @@ void SPUse::modified(unsigned int flags) { if (flags & SP_OBJECT_STYLE_MODIFIED_FLAG) { for (SPItemView *v = this->display; v != NULL; v = v->next) { Inkscape::DrawingGroup *g = dynamic_cast<Inkscape::DrawingGroup *>(v->arenaitem); - g->setStyle(this->style, this->style); + this->context_style = this->style; + g->setStyle(this->style, this->context_style); } } |
