[Lazarus] I found an AnchorDockingDsgn package bug?

Michael W. Vogel m-w-vogel at gmx.de
Sun Jun 16 23:43:43 CEST 2019

Am 14.06.2019 um 23:51 schrieb leyba bronstain via lazarus:
> After installing the AnchorDockingDsgn package for Win7 x64, I noticed
> a strange IDE behavior. If you dock any other window to the Source
> Code Editor in the manner shown in the figure, then it becomes
> impossible to close any tab of the Source Code Editor using the mouse
> (using the shortcuts, the tab is closed correctly). It's a bug?
> See more here:
> https://forum.lazarus.freepascal.org/index.php/topic,45728.0.html

Yes, I can confirm that problem.

The SourceEditor doesn't have a default PopupMenu, it is created on
MouseUp. So the AnchorDockingPageControl is opening its PopupMenu. I
could recreate the problem in a simple app.

Imho a simple workaround could be to create a dummy PopupMenu for
SourceEditor, something like the added patch.

Can you please open a bug report on Mantis?!

-------------- next part --------------
Index: ide/sourceeditor.pp
--- ide/sourceeditor.pp	(revision 61401)
+++ ide/sourceeditor.pp	(working copy)
@@ -657,6 +657,7 @@
     FNotebook: TExtendedNotebook;
     FBaseCaption: String;
+    FDummyPopupMenu: TPopupMenu;
     FIsClosing: Boolean;
     FSrcEditsSortedForFilenames: TAvlTree; // TSourceEditorInterface sorted for Filename
     TabPopUpMenu, SrcPopUpMenu, DbgPopUpMenu: TPopupMenu;
@@ -6557,6 +6558,8 @@
     OnTabEndDrag     := @NotebookEndDrag;
+    FDummyPopupMenu := TPopupMenu.Create(Self);
+    PopupMenu := FDummyPopupMenu;
     debugln('[TSourceNotebook.CreateNotebook] D');

More information about the lazarus mailing list