IDE: Fix an invalid integer error after changing color in object inspector. Issue #20158, patch from August Klein

git-svn-id: trunk@32623 -
This commit is contained in:
juha 2011-10-02 19:10:27 +00:00
parent a7bfcf6c9b
commit 3217168f80
2 changed files with 8 additions and 1 deletions

View File

@ -311,7 +311,10 @@ begin
end;
procedure TColorPropertyEditor.GetValues(Proc: TGetStrProc);
var
CValue: Longint;
begin
if not IdentToColor(GetVisualValue, CValue) then Proc(GetVisualValue);
GetColorValues(Proc);
end;

View File

@ -2871,7 +2871,11 @@ begin
if FCurrentEdit=ValueEdit then
ValueEdit.Text:=NewValue
else if FCurrentEdit=ValueComboBox then
ValueComboBox.Text:=NewValue
begin
ValueComboBox.Text:=NewValue;
if ValueComboBox.Style=csOwnerDrawVariable then
Exclude(FStates,pgsGetComboItemsCalled);
end
else if FCurrentEdit=ValueCheckBox then begin
ValueCheckBox.Caption:=NewValue;
ValueCheckBox.Checked:=NewValue='True';