Leyart / aseprite

Automatically exported from code.google.com/p/aseprite
0 stars 0 forks source link

Eyedropper tool changes in gui.xml not working #347

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
---What steps will reproduce the problem?
1. Go to gui.xml and change:

<tool id="pencil"
            text="Pencil Tool"
            ink="paint"
            controller="freehand"
            pointshape="pen"
            intertwine="as_lines"
            tracepolicy="accumulative"
            />

to

tool id="pencil"
            text="Pencil Tool"
            ink_left="paint"
            ink_right="pick_fg"
            controller="freehand"
            pointshape="pen"
            intertwine="as_lines"
            tracepolicy="accumulative"
            />

2. Open the application and try right clicking with the pencil tool.
3. Observe that the background color is changed.

---What is the expected output? What do you see instead?

Since I set ink_right to "pick_fg", it is expected that a right mouse click 
would change the current color used for drawing.  I was trying to do this so I 
could select a color using right click, like in many other art software.

---What version of the product are you using? On what operating system?

I am using 0.9.5 on Windows 7.

---*Please provide any additional information below. If the program crashed on
Windows, you can attach the aseprite-memory.dmp file generated in the same
location where aseprite.exe is.*

I believe the bug is caused by these lines of code at line 225 in 
standby_state.cpp:

// Call the eyedropper command
  if (clickedInk->isEyedropper()) {
    Command* eyedropper_cmd =
      CommandsModule::instance()->getCommandByName(CommandId::Eyedropper);

    Params params;
    params.set("target", msg->right() ? "background": "foreground");

    UIContext::instance()->executeCommand(eyedropper_cmd, &params);
    return true;
  }

Rather than getting msg->right(), I think its supposed to be using the current 
Ink.

Original issue reported on code.google.com by n.watso...@gmail.com on 22 Feb 2014 at 4:10

GoogleCodeExporter commented 9 years ago
Thanks for this bug report. Fixed: 
https://github.com/aseprite/aseprite/commit/43b2be4f0d89c95035293198b2734bfb7c9b
4226

Original comment by davidcapello on 24 Feb 2014 at 11:10