jongough / ocpn_draw_pi

OpenCPN general drawing plug in
7 stars 17 forks source link

RFE : Windows 10, Draw windows too narrow vertically and impossible to enlarge. And how to select certain objects by their name to hide or show them? #538

Open Gilletarom opened 9 months ago

Gilletarom commented 9 months ago

Hello Jon,

It's been a long time since I reported anything to you about the DRAW plugin. What I have to indicate concerns the main window of the plugin.

I would like to be able to easily select all those which have a name starting with the same letters to move them from the visible state to the invisible stage, or the opposite with a button dedicated to this.

Would it be possible for you to bring this flexibility to the manipulation of objects, boundaries or others, when there are very many of them?

Thanks in advance. Gilletarom.

Gilletarom commented 9 months ago

2023-11-20 16_13_57-OpenCPN 5 8 4-0

Really, as said in the first comment, there is more than 250 boundary ! Very not usable to select one or more boundary !

jongough commented 9 months ago

Have you tried clicking on the 'Nom du chemin' column header? This should sort the list by the names, a second click will reverse the sort.

jongough commented 9 months ago

At the moment I am working on getting OD dialogs compatible with the latest OCPN. There are a few underlaying changes needed to OD. When I get this working I can look at adding a button to make the selected items visible/invisible.

jongough commented 9 months ago

There is now a beta version of OD, 1.8.41.0, as well as an alpha version of same that should be installable. This version includes the ability to resize the dialog box by dragging the frame and the list boxes have scrollbars if needed. Can you please give this a go and see if it helps with your problem.

Gilletarom commented 9 months ago

Hello JON,

Windows 10 / Well done, the installation of the beta version of 1.18.41.0 was done correctly. I was able to zoom the window down and to the left. And the elevator works properly. So, this first part of my request is satisfied.

Thank you.

Gilletarom commented 9 months ago

Jon, This concerns the WeatherRouting plugin. Currently, WR considers active and inactive boundaries the same. WR prevents weather-route from crossing them. I'm going to ask Dave to differentiate the role of active boundaries from those that are not active. More precisely :

To understand my idea: I chose to manually build boundaries around all areas with less than 4 meters of water. But on the coasts of my region, the water height varies with the tide. At certain times, I can pass through these areas. If I could hide the boundaries surrounding these areas and if WR was able to no longer take these boundaries into account, I would be able to obtain weather routes adapted to the tides.

This explains to you why, in OD, I need to choose, easily, to hide or not, certain boundaries even if in periods of very low tides, the water level is less than 4 meters. (4 meters is my choice, others besides me could choose another minimum water level.)

Another idea would be to differentiate the boundaries based on the color of the line surrounding them. This would make it possible to have a criterion on visibility and a criterion on depth very locally. But if Dave could implement visibility/invisibility, that would be good.

jongough commented 9 months ago

The ODAPI already has BoundaryState as one of the variables that are set or looked for. So WR should be able to ask/search for boundaries in a particular state, Active/Inactive/Any, which seems to be what you are looking for. There is no API to change the settings of a boundary, that has to be done via the GUI and dialog boxes.

Gilletarom commented 9 months ago

Jon,

I have several things that come to mind.

jongough commented 9 months ago

The view button controls of they are shown or not. The activate/deactivate does not affect visibility, but changes the 'state' of the objects. There is a new version of OD, 1.8.43.0, in both alpha and beta, which allows single and multiselect of paths and the activate/deactivate of the selected group. The first boundary selected determines whether the button says activate or deactivate. If it is the wrong way, just click the button again.

Is this closer to what you wanted?

Gilletarom commented 9 months ago

Hello Jon,

As always, you are fast and efficient. Well done.

If I understand correctly how it works, modify it:

BUT :

An idea : Replace the caption “Activate” with the caption “Selection: Activate” and similarly replace the caption “Deactivate” with “Selection: Deactivate”.

And what's more, I observed a small BUG:

Gilletarom.

Gilletarom commented 9 months ago

Hello Jon,

I also note that in version 1.8.43.0, the "view" button does not work.

jongough commented 9 months ago

I am not sure what you mean by the "view" button. There is a "Center View" which centers the object selected in the center of the screen and zooms to it. There is also a "Properties" button which shows the properties of the object. Both of these only work with a single item selected. If multiple items are selected then neither button is available.

There is now a version 1.8.44.0 which includes keeping the size of the dialog when you click the Activate/Deactivate button. However, if you close and reopen the dialog, or switch to another tab in the dialog the size is reset to the original size. i.e. the change to the size is temporary.

The button label does what it says. The first object selected sets the state of the button. If the inverse is required then the button needs to be hit again. The button only becomes available if one or more objects are selected in the list, so it should be obvious what is going to happen. Adding more text to the button would change its size and, I don't think, improve usability.