From 43519ed46697c28f90abe47d3b480f9bc9372c6e Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Fri, 2 Jul 2010 01:18:10 -0700 Subject: Rough pass of Fill-n-Stroke swatch conversion. (bzr r9553) --- src/widgets/fill-style.cpp | 6 +++++- src/widgets/paint-selector.cpp | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/widgets') 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 -- cgit v1.2.3