OpenTTD

Tasklist

FS#5284 - Ctrl+Click on a sign in the sign list window to edit it

Attached to Project: OpenTTD
Opened by Sébastien Brissaud (sbr) - Saturday, 01 September 2012, 08:53 GMT
Last edited by andythenorth (andythenorth) - Saturday, 02 September 2017, 12:08 GMT
Type Feature Request
Category Interface
Status With patch
Assigned To No-one
Operating System All
Severity Very Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

This patch allow to edit a sign by Ctrl+Clicking it on the sign list window.
This permit to rename/delete a sign if it's not visible on the main viewport or if signs aren't displayed at all.

Please find attached a patch against r24502.
This task depends upon

Comment by Ingo von Borstel (planetmaker) - Sunday, 02 September 2012, 09:14 GMT
I very much like the idea of being able to edit and delete signs from the sign list.

Comparing with other lists, a ctrl+click will open an extra viewport centred on the object though. Thus what about this:
ctrl+click opens the viewport
double click opens the edit capability
Comment by Sébastien Brissaud (sbr) - Sunday, 02 September 2012, 17:21 GMT
Opening an extra viewport on Ctrl+click is consistent with the rest of the UI and should be the way to go. At first, I also found the use of double click to edit sign as a good idea.

However when double clicking, two events are send to the window: an OnClick(pt, widget, click_count = 1) for the first click of the double click and another OnClick(pt, widget, click_count = 2) when the second click of the double click occurs. Thus when double clicking on a sign, the main viewport is moved to the sign location before the opening of the edit window.

I've then split the patch in two parts, one for the Ctrl+click part and the other for the double click part.
I'll also try to find a way to launch the edit window without moving the main viewport.

Please find attached these two patches against r24508.
Comment by Sébastien Brissaud (sbr) - Tuesday, 04 September 2012, 11:14 GMT
Another proposition to edit signs from the sign list window :
- Click the company icon to edit the sign;
- Click the sign name center the main viewport on the sign position;

Please find attached these two patches against r24510.
Comment by andythenorth (andythenorth) - Saturday, 02 September 2017, 07:40 GMT
Patch 00 fails to apply on r27908, .rej attached

openttd-trunk(master)$ curl https://bugs.openttd.org/task/5284/getfile/8548/sign-list_00ctrl-click-open-extra-viewport_r24510.patch | patch -p1
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2194 100 2194 0 0 14279 0 --:--:-- --:--:-- --:--:-- 14339
patching file src/lang/english.txt
Hunk #1 FAILED at 2749.
1 out of 1 hunk FAILED -- saving rejects to file src/lang/english.txt.rej
patching file src/signs_gui.cpp
Hunk #2 succeeded at 238 with fuzz 1 (offset -15 lines).
Hunk #3 succeeded at 374 (offset -25 lines).

Loading...