1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-21 16:55:01 -05:00

Simba: Fix tab closing depending on the Sender.

This commit is contained in:
Merlijn Wajer 2011-02-23 14:44:24 +01:00
parent 1265e35aef
commit abcb1065e6

View File

@ -1637,8 +1637,13 @@ end;
procedure TSimbaForm.ActionCloseTabExecute(Sender: TObject); procedure TSimbaForm.ActionCloseTabExecute(Sender: TObject);
begin begin
if(PageControl1.PageCount > 1)then if(PageControl1.PageCount > 1) then
Self.DeleteTab(TTabSheet(Sender).TabIndex,false) begin
if Sender is TTabSheet then
Self.DeleteTab(TTabSheet(Sender).TabIndex,false)
else
Self.DeleteTab(PageControl1.TabIndex,false)
end
else else
Self.ClearScript; //DeleteTab would take care of this already, but yeah, it's neater this way. Self.ClearScript; //DeleteTab would take care of this already, but yeah, it's neater this way.
end; end;