LibreCAD / LibreCAD

LibreCAD is a cross-platform 2D CAD program written in C++17. It can read DXF/DWG files and can write DXF/PDF/SVG files. It supports point/line/circle/ellipse/parabola/spline primitives. The user interface is highly customizable, and has dozens of translations.
http://librecad.org/
Other
4.37k stars 1k forks source link

Toggling layer visibility scrolls layer list to active layer #1515

Closed michalg0x5a closed 2 years ago

michalg0x5a commented 2 years ago

Currently layer list scrolls back to the bottom of the list (the active layer). In my opinion it would be better to leave the scroll position as-is. If a drawing contains large number of layers (twenty or more), than it is hard to explore the drawing, because if wrong layer was hidden, then the user needs to scroll back to its position in layer list and to toggle its visibility again. If the scroll position stayed as is, than it would be much quicker.

Expected behavior

If layerwidget contains many layers (scroll bar is visible), then simple toggling of layer visibility shouldn't change the scroll position.

Observed behavior

Toggling layer visibility (or lock, print, construction layer) resets the scroll position to the active layer. The behaviour is irritating especially for drawings containing large number of layers (e.g. maps) opened for exploration.

Steps to reproduce or sample file

Steps to reproduce:

  1. Add enough layers for layerwidget to show scroll bar.
  2. Scroll to the bottom of the layer list.
  3. Select (activate) last layer. obraz
  4. Scroll the list to first item. obraz
  5. Toggle first item visibility (toggling lock, print and construction has the same effect). obraz

Operating System and LibreCAD version info

Fedora Linux 35 (x86_64), LibreCAD commit 5d331c8bf51031f46989a5ce3350c59508505289 (almost certain that issue is also present in 2.2.0-rc3).

dellus commented 2 years ago

There is the same issue with the Block List.