Straighten with two times right click?

When I’m away from home, I sometimes edit on my laptop.
However I find it a bit difficult to use the straighten tool with the touchpad as it requires to click+drag.

Is there a way to change it so that I can do right click, draw the line and then right click again to release the tool?

I share your annoyance, and I can propose a workaround. If you open the rotation and perspective module, you can click the pencil icon to manually draw perspective lines. Then draw one with the left mouse button. You can move the end points as many times as you like, until you are satisfied. It might take a couple tries if you have no mouse but you don’t have to start over to change it. It’s also good for fine tuning, such as when you want to use a model as the vertical reference and you need to estimate their center of gravity.

Then (from the manual):
Ctrl+click on any of the [bottom] icons to apply a rotation without the lens shift.

Thank you for your suggestion.

Unfortunately this doesn’t work.
It requires that you draw four lines in total, 2 horizontal and 2 vertical in order to use the buttons.

image

In addition it still requires click+drag to draw the lines.

It seems the left button is for vertical lines and the center button is for horizontal lines (currently two needed, not four). Nonetheless, I’ll try to fix needing two lines in the next release. After that you will be able to create and adjust a line precisely (by zooming in if needed), then perform the rotation. There is more UI enhancement that could be done for this module, but I’ll have a look at that later, if my first small fix is accepted.

1 Like

@Nebucatnetzer It would help if you make a feature request on the dt issues page, if possible. Explain the problem (if your touchpad is like mine, single click is more accurate than click and drag), and maybe a solution you’d like. Maybe single clicking twice should create a line. If that’s not acceptable to the DT team, I see in the R&P module you can already single click to create points, and you can click and drag one point to connect it to… nothing. Snapping the line to end at the other existing point seems to not be implemented. If that were implemented, you would click to create the two ends of the fit line, then click and drag between them to connect them.

An alternative approach: enable the grid overlay (so that you have horizontal references) and use the slider or a shortcut to rotate as needed.

2 Likes

Yeah, just make sure the grid is dense enough. I also used this technique for something in the past

I can do that (probably on Monday).
If you, at a later point, then have a public repository, I should be able to build and test the changes as well.

A good suggestion and would work as a workaround but no where near as comfortable as creating a line and letting Darktable figure it out.

Yeah, but I’m afraid it’s as good as it gets – I personally don’t think that the two-right-click option is going to get added.

I wonder, is using a mouse (any type, really) not an option? I can imagine even the cheapest mouse would make a lot of things easier to handle

Yes sitting in a train, using a mouse is not an option.
Besides even with a mouse click+drag could be awkward for certain people with disabilities.

It doesn’t have to be a a two times right click option.

I could imagine to use the pencil icon and then click two times to create a line between the two points instead of dragging.

1 Like

Maybe as a little help for someone else.
I’m using Kanata on my notebook and I had the idea that I could use it to configure two of my keyboard keys as mouse buttons.
So I remapped e and r to act as left and right mouse button when I hold them.

I haven’t tested it extensively yet but it might help with making the click and drag gesture easier on a laptop.

If only a little rotation is required then I find alt+[ or alt+] works very well. Or am I missing the point?

Defining a straight line is helpful for visual illusions where photo always looks tilted. Like that it’s more objective without being too complicated