diff options
| author | John Smith <john.smith7545@yahoo.com> | 2012-08-01 07:53:08 +0000 |
|---|---|---|
| committer | John Smith <john.smith7545@yahoo.com> | 2012-08-01 07:53:08 +0000 |
| commit | bc8ef04f993b3f17c55dbcbeac7d942994eb05d1 (patch) | |
| tree | f3dcaef08b8b5cf62297e5be71af05efda6992af /src | |
| parent | Fix for 512247 : Show the direction in Object/Transform/Rotate (diff) | |
| download | inkscape-bc8ef04f993b3f17c55dbcbeac7d942994eb05d1.tar.gz inkscape-bc8ef04f993b3f17c55dbcbeac7d942994eb05d1.zip | |
Fix for 1029302 : Fill/Stroke dialog does not update on tool change
(bzr r11579)
Diffstat (limited to 'src')
| -rw-r--r-- | src/gradient-context.cpp | 1 | ||||
| -rw-r--r-- | src/widgets/fill-style.cpp | 18 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/gradient-context.cpp b/src/gradient-context.cpp index 7f7f1ac40..cf7d6a26f 100644 --- a/src/gradient-context.cpp +++ b/src/gradient-context.cpp @@ -696,6 +696,7 @@ sp_gradient_context_root_handler(SPEventContext *event_context, GdkEvent *event) if (event->button.state & GDK_SHIFT_MASK) { selection->toggle(event_context->item_to_select); } else { + drag->deselectAll(); selection->set(event_context->item_to_select); } } diff --git a/src/widgets/fill-style.cpp b/src/widgets/fill-style.cpp index fe24d0165..32619de1f 100644 --- a/src/widgets/fill-style.cpp +++ b/src/widgets/fill-style.cpp @@ -84,6 +84,7 @@ private: static void fillruleChangedCB( SPPaintSelector *psel, SPPaintSelector::FillRule mode, FillNStroke *self ); void selectionModifiedCB(guint flags); + void eventContextCB(SPDesktop *desktop, SPEventContext *eventcontext); void dragFromPaint(); void updateFromPaint(); @@ -99,6 +100,7 @@ private: sigc::connection selectChangedConn; sigc::connection subselChangedConn; sigc::connection selectModifiedConn; + sigc::connection eventContextConn; }; } // namespace Inkscape @@ -133,7 +135,8 @@ FillNStroke::FillNStroke( FillOrStroke kind ) : update(false), selectChangedConn(), subselChangedConn(), - selectModifiedConn() + selectModifiedConn(), + eventContextConn() { // Add and connect up the paint selector widget: psel = sp_paint_selector_new(kind); @@ -169,6 +172,7 @@ FillNStroke::~FillNStroke() selectModifiedConn.disconnect(); subselChangedConn.disconnect(); selectChangedConn.disconnect(); + eventContextConn.disconnect(); } /** @@ -197,11 +201,13 @@ void FillNStroke::setDesktop(SPDesktop *desktop) selectModifiedConn.disconnect(); subselChangedConn.disconnect(); selectChangedConn.disconnect(); + eventContextConn.disconnect(); } this->desktop = desktop; if (desktop && desktop->selection) { selectChangedConn = desktop->selection->connectChanged(sigc::hide(sigc::mem_fun(*this, &FillNStroke::performUpdate))); subselChangedConn = desktop->connectToolSubselectionChanged(sigc::hide(sigc::mem_fun(*this, &FillNStroke::performUpdate))); + eventContextConn = desktop->connectEventContextChanged(sigc::hide(sigc::bind(sigc::mem_fun(*this, &FillNStroke::eventContextCB), (SPEventContext *)NULL))); // Must check flags, so can't call performUpdate() directly. selectModifiedConn = desktop->selection->connectModified(sigc::hide<0>(sigc::mem_fun(*this, &FillNStroke::selectionModifiedCB))); @@ -211,6 +217,16 @@ void FillNStroke::setDesktop(SPDesktop *desktop) } /** + * Listen to this "change in tool" event, in case a subselection tool (such as Gradient or Node) selection + * is changed back to a selection tool - especially needed for selected gradient stops. + */ +void FillNStroke::eventContextCB(SPDesktop *desktop, SPEventContext *eventcontext) +{ + performUpdate(); +} + + +/** * Gets the active fill or stroke style property, then sets the appropriate * color, alpha, gradient, pattern, etc. for the paint-selector. * |
