diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2013-03-13 17:18:31 +0000 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2013-03-13 17:18:31 +0000 |
commit | 4aa86ed93eb477f89674abc4580d21987cb69442 (patch) | |
tree | f3ccd35545c29f591ef578c322fbbb3b8a764996 /examples | |
parent | 03bd6f043e2a6cda9ddc94e56fd1d39eccb348d7 (diff) | |
download | fpGUI-4aa86ed93eb477f89674abc4580d21987cb69442.tar.xz |
ide: Fixes the bug where IDE crashed when you load a second project.
Loading a first project was no problem. But as soon as you tried to
load a new (second) project, the IDE bombed out. This should be fixed
now.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/apps/ide/src/frm_main.pas | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/examples/apps/ide/src/frm_main.pas b/examples/apps/ide/src/frm_main.pas index 6dd31a31..92d5243e 100644 --- a/examples/apps/ide/src/frm_main.pas +++ b/examples/apps/ide/src/frm_main.pas @@ -617,11 +617,16 @@ var ts: TfpgTabSheet; i: integer; begin - for i := 0 to pcEditor.PageCount-1 do - begin - ts := pcEditor.Pages[0]; - pcEditor.RemoveTabSheet(ts); - ts.Free; + pcEditor.BeginUpdate; + try + for i := 0 to pcEditor.PageCount-1 do + begin + ts := pcEditor.Pages[0]; + pcEditor.RemoveTabSheet(ts); + ts.Free; + end; + finally + pcEditor.EndUpdate; end; end; |