mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Memo editor fix: Changing the scrollbars invoke the OnChange event. Avoid thinking the text was really modified in that case.
This commit is contained in:
@ -82,13 +82,18 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmMemoEditor.btnWrapClick(Sender: TObject);
|
procedure TfrmMemoEditor.btnWrapClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
WasModified: Boolean;
|
||||||
begin
|
begin
|
||||||
Screen.Cursor := crHourglass;
|
Screen.Cursor := crHourglass;
|
||||||
|
// Changing the scrollbars invoke the OnChange event. We avoid thinking the text was really modified.
|
||||||
|
WasModified := FModified;
|
||||||
if memoText.ScrollBars = ssBoth then
|
if memoText.ScrollBars = ssBoth then
|
||||||
memoText.ScrollBars := ssVertical
|
memoText.ScrollBars := ssVertical
|
||||||
else
|
else
|
||||||
memoText.ScrollBars := ssBoth;
|
memoText.ScrollBars := ssBoth;
|
||||||
TToolbutton(Sender).Down := memoText.ScrollBars = ssVertical;
|
TToolbutton(Sender).Down := memoText.ScrollBars = ssVertical;
|
||||||
|
FModified := WasModified;
|
||||||
Screen.Cursor := crDefault;
|
Screen.Cursor := crDefault;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user