[patch] When ObjectInspector is docked to MainBar, the Paste-Command goes to SourceEditor
Original Reporter info from Mantis: SunyD @soner-a
-
Reporter name: Soner
Original Reporter info from Mantis: SunyD @soner-a
- Reporter name: Soner
Description:
If you dock ObjectInspector to MainBar than paste-command-key (strg-v and others) in property-edits are ignored and Lazarus paste the text in Source-Editor. I use AnchorDocking-Package.
It must be 2 lines added in Main.pp-DoSourceEditorCommand procedure (look for "//<-- ADD THIS LINE HERE" ):
Main.pp --------------------------
procedure TMainIDE.DoSourceEditorCommand(EditorCommand: integer;
CheckFocus: boolean; FocusEditor: boolean);
//...........
// check if focus is on MainIDEBar or on SourceEditor
if CheckFocus then
begin
CurFocusControl:=FindOwnerControl(GetFocus);
while (CurFocusControl<>nil) and (CurFocusControl<>MainIDEBar)
and not (CurFocusControl is TSourceNotebook)
// THE LINES ABOVE ARE TO GUIDE YOU
and not (CurFocusControl is TObjectInspectorDlg) //<-- ADD THIS LINE HERE
// THE LINES DOWN ARE TO GUIDE YOU
do
CurFocusControl:=CurFocusControl.Parent;
end;
if Assigned(CurFocusControl)
// THE LINES ABOVE ARE TO GUIDE YOU
and not (CurFocusControl is TObjectInspectorDlg) //<-- ADD THIS LINE HERE
// THE LINES DOWN ARE TO GUIDE YOU
then
begin // MainIDEBar or SourceNotebook has focus -> find active source editor
//...........
Steps to reproduce:
- Install AnchorDocking-Component
- Dock ObjectInspector to MainBar
- Copy some Text in Clipboard.
- Click in Formular-Designer one Component, so Form itself.
- Go in ObjectInspector Form's Caption property.
- Edit Caption, Press Ctrl+V -Key to paste TExt from ClipBoard
- Lazarus paste the text in SourceEditor not in Caption-Editor.
Additional information:
I use Lazarus 1.3 Svn-Rev.:46679 fpc 2.6.4 WindowsXp 32Bit.
But failure is independent from OS and Widgetset.
Mantis conversion info:
- Mantis ID: 27165
- Build: Laz1.3; Svn-Rev.:46679
- Fixed in revision: 48096 (#72b9421f)