summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/fill-style.cpp6
-rw-r--r--src/widgets/paint-selector.cpp1
2 files changed, 6 insertions, 1 deletions
diff --git a/src/widgets/fill-style.cpp b/src/widgets/fill-style.cpp
index 5a7256d83..f1342f3de 100644
--- a/src/widgets/fill-style.cpp
+++ b/src/widgets/fill-style.cpp
@@ -556,8 +556,12 @@ void FillNStroke::updateFromPaint()
}
if (!vector) {
+ SPGradient *gr = sp_gradient_vector_for_object(document, desktop, SP_OBJECT(i->data), kind == FILL);
+ if ( gr && (psel->mode == SPPaintSelector::MODE_SWATCH) ) {
+ gr->setSwatch();
+ }
sp_item_set_gradient(SP_ITEM(i->data),
- sp_gradient_vector_for_object(document, desktop, SP_OBJECT(i->data), kind == FILL),
+ gr,
gradient_type, kind == FILL);
} else {
sp_item_set_gradient(SP_ITEM(i->data), vector, gradient_type, kind == FILL);
diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp
index 8759854a0..a569d00bb 100644
--- a/src/widgets/paint-selector.cpp
+++ b/src/widgets/paint-selector.cpp
@@ -1102,6 +1102,7 @@ static void sp_paint_selector_set_mode_swatch(SPPaintSelector *psel, SPPaintSele
gtk_frame_set_label(GTK_FRAME(psel->frame), _("Swatch fill"));
}
+
#ifdef SP_PS_VERBOSE
g_print("Swatch req\n");
#endif