summaryrefslogtreecommitdiffstats
path: root/src/widgets/fill-style.cpp
diff options
context:
space:
mode:
authorThomas Holder <thomas@thomas-holder.de>2019-10-28 11:32:35 +0000
committerThomas Holder <thomas@thomas-holder.de>2019-10-28 11:32:35 +0000
commit98cbf65b029df0cfb9f6b7d34538258fe4ee96c5 (patch)
tree43153dccc9e85e8aafb9288fc08521d35161e739 /src/widgets/fill-style.cpp
parentrefactor: private SPIBase::_name (diff)
downloadinkscape-98cbf65b029df0cfb9f6b7d34538258fe4ee96c5.tar.gz
inkscape-98cbf65b029df0cfb9f6b7d34538258fe4ee96c5.zip
refactor: TypedSPI
Diffstat (limited to 'src/widgets/fill-style.cpp')
-rw-r--r--src/widgets/fill-style.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/fill-style.cpp b/src/widgets/fill-style.cpp
index f8eb00d7a..114cbb1b3 100644
--- a/src/widgets/fill-style.cpp
+++ b/src/widgets/fill-style.cpp
@@ -248,8 +248,8 @@ void FillNStroke::performUpdate()
// query style from desktop into it. This returns a result flag and fills query with the style of subselection, if any, or selection
int result = sp_desktop_query_style(desktop, &query, (kind == FILL) ? QUERY_STYLE_PROPERTY_FILL : QUERY_STYLE_PROPERTY_STROKE);
- SPIPaint &targPaint = (kind == FILL) ? query.fill : query.stroke;
- SPIScale24 &targOpacity = (kind == FILL) ? query.fill_opacity : query.stroke_opacity;
+ SPIPaint &targPaint = *query.getFillOrStroke(kind == FILL);
+ SPIScale24 &targOpacity = *(kind == FILL ? query.fill_opacity.upcast() : query.stroke_opacity.upcast());
switch (result) {
case QUERY_STYLE_NOTHING:
@@ -561,7 +561,7 @@ void FillNStroke::updateFromPaint()
SPStyle query(desktop->doc());
int result = objects_query_fillstroke(items, &query, kind == FILL);
if (result == QUERY_STYLE_MULTIPLE_SAME) {
- SPIPaint &targPaint = (kind == FILL) ? query.fill : query.stroke;
+ SPIPaint &targPaint = *query.getFillOrStroke(kind == FILL);
SPColor common;
if (!targPaint.isColor()) {
common = sp_desktop_get_color(desktop, kind == FILL);
@@ -755,7 +755,7 @@ void FillNStroke::updateFromPaint()
SPObject *selobj = item;
SPStyle *style = selobj->style;
- if (style && ((kind == FILL) ? style->fill : style->stroke).isPaintserver()) {
+ if (style && ((kind == FILL) ? style->fill.isPaintserver() : style->stroke.isPaintserver())) {
SPPaintServer *server = (kind == FILL) ?
selobj->style->getFillPaintServer() :
selobj->style->getStrokePaintServer();