fix, possible pagecontrol error when all page closed

This commit is contained in:
Basile Burg 2016-01-30 06:33:32 +01:00
parent 01724a5a9e
commit f0fd280c6d
1 changed files with 3 additions and 2 deletions

View File

@ -234,6 +234,7 @@ begin
fContent.OnDragOver:=value;
fTabs.OnDragOver:=value;
end;
procedure TCEPageControl.setOnDragDrop(value: TDragDropEvent);
begin
if fOnDragDrop = value then
@ -365,10 +366,10 @@ begin
fPages.Delete(index);
fTabs.Tabs.Delete(index);
updateButtonsState;
if fPages.Count = 0 then
exit;
fPageIndex:=-1;
updateButtonsState;
setPageIndex(fPageIndex);
end;