This gives the line tool faster visual feedback, like the rectangle and
ellipse tools.
Details
- Reviewers
dkazakov - Group Reviewers
Krita - Commits
- R37:4abc1af37a47: Streamline guide for line tool
Diff Detail
- Repository
- R37 Krita
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Hi, Michael!
There is already preview in the line tool. It should be activated by Checking a "preview" checkbox in the tool options. We can discuss making it default, but we need painters input there.
Or your patch does anything different?
Hi Dmitry - you're right, I missed the existing option for a guideline decoration, so I removed that from the patch.
This patch now consists of a different change which is to alter the brush engine preview - now it wipes that clean when the mouse is moved, and when the preview is turned on, it waits for the user to hover the mouse before drawing a preview.
The result is fewer stale lines on canvas. It also looks a lot nicer with the guideline turned on than it did previously.
I thought this justified changing the default to showing the guideline decoration.
Actually, we've discussed this in irc a few times, and we feel that the toggled preview line should be on by default and the stoke preview line should be the one toggled...
This new version adds a toggle for the preview in addition to a toggle for the guideline. In other words, it is now possible to toggle each of them separately. The names are changed in the UI to reflect this distinction. The new default is to have both the preview and the guideline turned on.
what did you use to test on this? I am trying it with a mouse on my Windows 10 machine. The lines don't seem to be applying 90% of the time for some reason. I am on the krita-grids-kazakov branch, so maybe there is some weird conflict going on with that and all of the updated functionality he has.
Hi, @abrahams!
I have tested your patch. The idea of using clearPaint() + POSTPONE is nice and it make quite positive impression while using it.
There is only one critical bug present. When the mouse button is released, the stroke is not ended immediately, but is delayed. This make a really weird effect if you start painting the next stroke right after your previous stroke. Instead of starting a new line, the previous one will be modified.
Whwn the bug is fixed, I'm ok with pushing it into master.
plugins/tools/basictools/kis_tool_line.cc | ||
---|---|---|
113–117 | Probably, rename it into "Show Preview" to keep it consistent with the other option? |
endStroke() was returning early because it expect a stroke to be in progress. I think this is fixed now.