how to save last tool selection?
Hello. Does anyone know how I can save and restore the last tool selection on startup? You might ask why bother, but for my use case, I want Inkscape to always start out with the eraser tool selected when I'm using the eraser end of my pen (event source GDK_SOURCE_ERASER), to save me from having to tap the erase tool with the eraser end of the pen.
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?
Appreciate your help, Yale
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,
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,
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,
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,
On Sun, 2013-10-20 at 23:22 -0700, Yale Zhang wrote:
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.
I wonder how it works in Gimp. They do the same thing, but with the same bug.
Martin,
This used to work fine a while ago. I can't remember the last time I used my tablet, but remember helping JonCruz test it.
I don't recall if it's enabled by default, but there was some relevant setting for it in the preferences dialog.
Cheers, Josh On Oct 21, 2013 4:58 AM, "Martin Owens" <doctormo@...400...> wrote:
On Sun, 2013-10-20 at 23:22 -0700, Yale Zhang wrote:
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.
I wonder how it works in Gimp. They do the same thing, but with the same bug.
Martin,
October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clk... _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
participants (3)
-
Josh Andler
-
Martin Owens
-
Yale Zhang