mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
* Fix text editor getting original celltext instead of already modified text from inplace editor.
* Set modification flag on popup editor in that case. * Nukes duplicated error message from r2387 (see issue #1097).
This commit is contained in:
@ -844,7 +844,8 @@ procedure TInplaceEditorLink.DoButtonClick;
|
|||||||
begin
|
begin
|
||||||
FTextEditor := TfrmTextEditor.Create(FTree);
|
FTextEditor := TfrmTextEditor.Create(FTree);
|
||||||
FTextEditor.SetFont(FEdit.Font);
|
FTextEditor.SetFont(FEdit.Font);
|
||||||
FTextEditor.SetText(FTree.Text[FNode, FColumn]);
|
FTextEditor.SetText(FEdit.Text);
|
||||||
|
FTextEditor.Modified := FEdit.Text <> FTree.Text[FNode, FColumn];
|
||||||
FTextEditor.SetMaxLength(Self.FMaxLength);
|
FTextEditor.SetMaxLength(Self.FMaxLength);
|
||||||
FTextEditor.ShowModal;
|
FTextEditor.ShowModal;
|
||||||
end;
|
end;
|
||||||
|
@ -42,12 +42,12 @@ type
|
|||||||
DetectedLineBreaks,
|
DetectedLineBreaks,
|
||||||
SelectedLineBreaks: TLineBreaks;
|
SelectedLineBreaks: TLineBreaks;
|
||||||
procedure SetModified(NewVal: Boolean);
|
procedure SetModified(NewVal: Boolean);
|
||||||
property Modified: Boolean read FModified write SetModified;
|
|
||||||
public
|
public
|
||||||
function GetText: WideString; override;
|
function GetText: WideString; override;
|
||||||
procedure SetText(text: WideString); override;
|
procedure SetText(text: WideString); override;
|
||||||
procedure SetMaxLength(len: integer); override;
|
procedure SetMaxLength(len: integer); override;
|
||||||
procedure SetFont(font: TFont); override;
|
procedure SetFont(font: TFont); override;
|
||||||
|
property Modified: Boolean read FModified write SetModified;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -107,6 +107,9 @@ begin
|
|||||||
// TODO: Find out why the Delphi IDE insists hinting that this
|
// TODO: Find out why the Delphi IDE insists hinting that this
|
||||||
// property is ANSI when it is in fact a WideString.
|
// property is ANSI when it is in fact a WideString.
|
||||||
memoText.Text := text;
|
memoText.Text := text;
|
||||||
|
|
||||||
|
memoText.SelectAll;
|
||||||
|
Modified := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -175,10 +178,7 @@ begin
|
|||||||
// Fix label position:
|
// Fix label position:
|
||||||
lblTextLength.Top := tlbStandard.Top + (tlbStandard.Height-lblTextLength.Height) div 2;
|
lblTextLength.Top := tlbStandard.Top + (tlbStandard.Height-lblTextLength.Height) div 2;
|
||||||
SetWindowSizeGrip(Handle, True);
|
SetWindowSizeGrip(Handle, True);
|
||||||
memoText.SelectAll;
|
|
||||||
memoText.SetFocus;
|
memoText.SetFocus;
|
||||||
memoTextChange(Sender);
|
|
||||||
Modified := False;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user