fix docking issues

- editor cant be disassociated from the menu
- a fix exists for the 3rd part component, but will be only applied if it's accepted by the people in charge (to consider when building CE from source).
- the fix will be applied in the next CE binary release (even if not  officially cherry merged to the Lazarus components).

fix #13
fix #4

waiting for that a widget must not undocked (right click) before getting closed.
This commit is contained in:
Basile Burg 2015-06-19 02:38:41 +02:00
parent 22fcf8a02f
commit fed331360c
2 changed files with 9 additions and 0 deletions

View File

@ -6,6 +6,7 @@ inherited CEEditorWidget: TCEEditorWidget
Caption = 'Source editor'
ClientHeight = 406
ClientWidth = 465
OnCloseQuery = FormCloseQuery
inherited Back: TPanel
Height = 406
Width = 465

View File

@ -34,6 +34,7 @@ type
macRecorder: TSynMacroRecorder;
editorStatus: TStatusBar;
mnuEditor: TPopupMenu;
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
procedure mnuedCopyClick(Sender: TObject);
procedure mnuedCutClick(Sender: TObject);
procedure mnuEditorPopup(Sender: TObject);
@ -139,6 +140,13 @@ begin
fErrList.Free;
inherited;
end;
procedure TCEEditorWidget.FormCloseQuery(Sender: TObject; var CanClose: boolean);
begin
// grants the window not to be undocked.
// additional fix, depend on of http://bugs.freepascal.org/view.php?id=28325
CanClose := Parent = nil;
end;
{$ENDREGION}
{$REGION ICEMultiDocObserver ---------------------------------------------------}