LCL: Get ComboBox.ItemIndex from Widgetset also when csDestroying. Needed by TIniPropStorage. Issue #28514, patch from Luca Olivetti.

git-svn-id: trunk@49674 -
This commit is contained in:
juha 2015-08-15 21:40:06 +00:00
parent 0cd6b5054b
commit 5747ff089c

View File

@ -906,8 +906,8 @@ end;
------------------------------------------------------------------------------}
function TCustomComboBox.GetItemIndex : integer;
begin
if not (csDestroying in ComponentState) and
not (csDestroyingHandle in ControlState) and HandleAllocated then
if not (csDestroyingHandle in ControlState) and HandleAllocated then
// WidgetSet must be called even when csDestroying for at least TIniPropStorage's needs.
FItemIndex:= TWSCustomComboBoxClass(WidgetSetClass).GetItemIndex(Self);
Result := FItemIndex;
end;