AnchorDocking Docked forms sometimes overlap
- Lazarus/FPC Version: Lazarus 2.2.2 (rev lazarus_2_2_2) FPC 3.2.2 x86_64-linux-gtk2
- Operating System: openSUSE Tumbleweed
- CPU / Bitness: 64-bit
Note that this happens on multiple Linux distributions with both the QT5 and GTK2 widgetsets. Although not tested, I expect that you can reproduce this situation on different operating systems and with other widgetsets as well.
What happens
When you docked two or more forms on a TAnchorDockPanel
and then grab one by its dock header, you can do two things with it:
- Undock the form, which is expected.
- Dock the form on the entire panel, which is unexpected.
The second option seems incorrect, because it then overlaps all the other forms that were already docked, making these inaccessible. Refer to the attached screenshots to further illustrate this scenario.
What did you expect
After grabbing the form by its dock header, I expected that you can do the following things with it:
- Undock the form, which is expected.
- Dock the form adjacent to one of the other docked forms.
Steps to reproduce
I ran into this issue while using AnchorDocking in an application. However, you can reproduce the problem with the minidewithdockpanel
example application, which is included in the AnchorDocking component. It's easiest to use that one as a reference for reproducing the problem:
- Install the AnchorDocking package in the Lazarus IDE.
- Build and run the
minidewithdockpanel
application. - Grab the Debug Output form by its header and start dragging it.
- Right away the green colored dock destination rectangle covers the entire panel.
- If you then let go of the mouse button to dock it, it will incorrectly overlap the already docked forms on the panel.