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.48k stars 1.01k forks source link

Grid appears when opening a second file #1451

Closed fa201 closed 1 year ago

fa201 commented 2 years ago

Expected behavior

If the grid is off (not shown) on the current file then opening a second file should not change the setting on first file

Observed behavior

Opening the second file does change the grid setting on the first file.

Steps to reproduce or sample file

Open a drawing with the grid off Open another drawing or click on New. Initial drawing has the grid but the new drawing has not.

Operating System and LibreCAD version info

Version: 2.0.7-1810-geba14138 Compiler: GNU GCC 9.3.0 Compiled on: Nov 30 2021 Qt Version: 5.12.8 Boost Version: 1.71.0 System: Ubuntu 20.04.3 LTS

melwyncarlo commented 2 years ago

I don't think that this is a bug. Note that the grid settings are located within the Current Drawing Preferences, meaning that the settings apply only to the current drawing, and not to the other drawings.

jbergengh commented 2 years ago

Try the following steps to reproduce:

  1. Start LibreCAD
  2. File - New
  3. File - New
  4. File - New
  5. Drawings - Arrange - Tile Vertically
  6. Select each drawing in turn and toggle its Grid Display off
  7. Confirm none of the drawings are displaying a grid
  8. File - New
  9. Observe the newly created drawing has its grid display ON
  10. Here is the bug -> Observe one of the previously created drawings also had its grid display turned on.

The previously created drawing that gets its grid turned back on (in step 10) is the drawing that is active before step 8.

melwyncarlo commented 2 years ago

I still don't see it.

https://youtu.be/NcjNC8YlqHA

I'll check the master branch version tomorrow morning.

jbergengh commented 2 years ago

https://user-images.githubusercontent.com/55407804/145075228-cb00e897-85e6-47fc-8c2c-2f3b066c24eb.mp4

melwyncarlo commented 2 years ago

Got it now! Thank you very much! Turns out that the grid setting in the Current Drawing Preferences and the tool button are (though not meant to be) separate; they seem to do their own things. Upon disabling the grid in the preferences, the tool button does not get updated. This is clearly a bug related to linking. I'll fix it tomorrow morning.

fa201 commented 2 years ago

@jbergengh Thanks for the video, very clear.