mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-02 03:52:05 +02:00
JSONViewer: removed unnecessary call to ShowJSONDocumentText because it is then called again in TJSONTab.DoTabChange and added BeginUpdate/EndUpdate
This commit is contained in:
parent
476a492d5b
commit
354f8e5959
@ -1637,7 +1637,6 @@ end;
|
||||
procedure TJSONTab.ShowJSONDocument;
|
||||
|
||||
begin
|
||||
ShowJSONDocumentText;
|
||||
With TVJSON.Items do
|
||||
begin
|
||||
BeginUpdate;
|
||||
@ -1678,9 +1677,14 @@ procedure TJSONTab.ShowJSONDocumentText;
|
||||
begin
|
||||
IF Assigned(Root) then
|
||||
begin
|
||||
FSyn.Text:=Root.FormatJSON();
|
||||
FSyn.Modified:=false;
|
||||
FSyn.CommandProcessor(ecRight,#0,Nil);
|
||||
FSyn.BeginUpdate;
|
||||
try
|
||||
FSyn.Text:=Root.FormatJSON();
|
||||
FSyn.Modified:=false;
|
||||
FSyn.CommandProcessor(ecRight,#0,Nil);
|
||||
finally
|
||||
FSyn.EndUpdate;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user