OK, problem found. GTK is returning the wrong source type (GDK_SOURCE_PEN instead of GDK_SOURCE_ERASER) for the eraser tool. I'll hard code a work around for now and report the problem on GNOME's bugzilla.
On Sun, Oct 20, 2013 at 10:57 PM, Yale Zhang <yzhang1985@...400...> wrote:
OK, I think I know what to do. Apparently, selecting the eraser as the default tool is already implemented in desktop-events.cpp: 617
case GDK_SOURCE_ERASER: toolToUse[devName] = TOOLS_ERASER;
But it's not working. I'll do some debugging and find out.
On Sun, Oct 20, 2013 at 10:30 PM, Yale Zhang <yzhang1985@...400...> wrote:
Martin, thanks for your interest. I thought I was going to be the only customer. Yes, I'm willing to implement it but can you or someone point me to which files I should look at? My experience with the Inkscape code so far has been limited to vectorizing (SSE intrinsics) the turbulence generator and IIR filtering (I haven't checked in either, but plan to).
On Sun, Oct 20, 2013 at 10:13 PM, Martin Owens <doctormo@...400...>wrote:
On Sun, 2013-10-20 at 21:31 -0700, Yale Zhang wrote:
Is there any reason why this isn't the default behavior? If saving the tool selection isn't implemented, can someone show how to programatically change the tool selection for the eraser to be the eraser?
This is a feature I would enjoy having too. But it will require some code to tie events and identity of the input device to the tool in use.
It shouldn't be done with the startup of inkscape, but more dynamically with the re-selection of the right tool from the event as it happened.
Yale, are you able/interested in looking into the code and finding out how to do the feature?
Martin Owens,