Drag'n'drop from swatches doesn't always work

Bug #447385 reported by Pablo Trabajos on 2009-10-09
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Inkscape
Medium
Adonis Papaderos

Bug Description

Selecting colors from swatches dock works always but drag'n'dropping has unreliable results. Sometimes the color given to the object is black, sometimes blue, and the next click works as expected... sometimes. Tested with 0.47pre3, WinXP SP3.

Steps:
1-Create a rectangle and keep it selected.
2-Open swatches palette (Shift+Ctrl+W).
3-Click on swatches. Observe how everything works as expected.
4-Now try drag'n'drop and observe how the colors applied are not ok.

Same happens from the swatches palette at the bottom. I was going to record a screencast but Camtasia interferes with drag'n'drop.

su_v (suv-lp) on 2009-10-09
tags: added: color ui
su_v (suv-lp) wrote :

not reproduced with Inkscape 0.46+devel r22436 on OS X 10.5.8 (new preferences file)
there is however a difference in behavior depending on fill / stroke and their status:

Fill:
any color: drag'n'drop works as expected from color palette and swatches dialog
Unset: fill is rendered black, drag'n'drop from palette or from swatches dialog works as expected
None: fill has been removed, no drag'n'drop is accepted from palette or swatches.

Stroke:
any color: drag'n'drop works as expected from color palette and swatches dialog
Unset: stroke is not rendered, drag'n'drop from palette or from swatches dialog sets it to new color, resets width to 1
None: stroke has been removed, but drag'n'drop is accepted from palette or swatches and adds the stroke back, resets width to 1

I don't know if this intended behavior but part of it seems logical to me: you can't drop a color when the fill has been removed ('No paint'), but with the click on a color swatch you can assign a new color to the fill. However I don't understand why a removed stroke can be re-added by drag'n'drop.

Pablo Trabajos (pajarico) wrote :

> None: fill has been removed, no drag'n'drop is accepted from palette or swatches
I noticed this too. However, unlike you, I think the correct behavior would be to allow to drop a color onto an unfilled object.

Will wait till someone on windows can test this.

> However, unlike you, I think the correct behavior
> would be to allow to drop a color onto an unfilled object.
Agreed. I expanded the tests (after adding the comment ;-) to several
selected objects: it is not possible to re-color any object fill, once
you dropped the 'X' on it because clicking a swatch applies the color to
all selected objects. You have to de-select all, then select the
unfilled and click a swatch to assign a fill color. Breaks the
convenient drag'n'drop workflow for single objects within a bigger
selection.

jazzynico (jazzynico) wrote :

Reproduced on Windows XP sp3, Inkscape revision 22384. Works fine with 0.46.

Changed in inkscape:
importance: Undecided → Medium
status: New → Confirmed
tags: added: regression
jazzynico (jazzynico) wrote :

No problem with an old 21624 snapshot (June).
Now I can only drag and drop white and no-fill. All other colors are dropped black.

su_v (suv-lp) wrote :

win32 only?

jazzynico (jazzynico) wrote :

Also reproduced on Ubuntu 9.04, inkscape 22463.

I've noticed something else: only #FF and #00 values are dropped correctly.

Example:
#FF0000 -> correct (red)
#000000 -> correct (black)
#FFFFFF -> correct (white)
#FF00FF -> correct (fuchsia)
#FF8080 -> #FF0000 applied
#FEFEFE -> #000000 applied
#808080 -> #000000 applied
...

Pablo Trabajos (pajarico) wrote :

Could you look into this, Jon?

Changed in inkscape:
assignee: nobody → Jon A. Cruz (jon-joncruz)
Pablo Trabajos (pajarico) wrote :

This bug is still there. Any news, Jon?

Pablo Trabajos (pajarico) wrote :

(on r9412)

Adonis Papaderos (ado-papas) wrote :

I seems that there is a problem converting colors on systems that have different decimal point. This patch uses glib for the convertion.

jazzynico (jazzynico) wrote :

Fix committed in the trunk, revision 9919.

Changed in inkscape:
assignee: Jon A. Cruz (jon-joncruz) → Adonis Papaderos (ado-papas)
milestone: none → 0.49
status: Confirmed → Fix Committed
Changed in inkscape:
milestone: 0.49 → 0.48.1
jazzynico (jazzynico) wrote :

Committed in the 0.48.x branch, revision 9733.

jazzynico (jazzynico) on 2011-03-05
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers