mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 14:29:33 +02:00
OI: Revert r49480 #27f9198058 and update text value in OI control in a better way. Issue #23918.
git-svn-id: trunk@49489 -
This commit is contained in:
parent
5e208cb2dd
commit
fe64bb3834
@ -1221,6 +1221,8 @@ begin
|
||||
if (not ASelection.ForceUpdate) and FSelection.IsEqual(ASelection) then exit;
|
||||
|
||||
OldSelectedRowPath:=PropertyPath(ItemIndex);
|
||||
if FCurrentEdit = ValueEdit then
|
||||
ValueEditExit(Self);
|
||||
ItemIndex:=-1;
|
||||
ClearRows;
|
||||
FSelection.Assign(ASelection);
|
||||
@ -1553,7 +1555,8 @@ var CurRow: TOIPropertyGridRow;
|
||||
begin
|
||||
if (pgsUpdatingEditControl in FStates) or not IsCurrentEditorAvailable then exit;
|
||||
CurRow:=Rows[FItemIndex];
|
||||
SetRowValue(true);
|
||||
if paAutoUpdate in CurRow.Editor.GetAttributes then
|
||||
SetRowValue(true);
|
||||
end;
|
||||
|
||||
procedure TOICustomPropertyGrid.ValueEditMouseUp(Sender: TObject;
|
||||
|
@ -110,6 +110,9 @@ type
|
||||
one component is selected. Some properties are not
|
||||
appropriate for multi-selection (e.g. the Name
|
||||
property).
|
||||
paAutoUpdate: Causes the SetValue method to be called on each
|
||||
change made to the editor instead of after the change
|
||||
has been approved (e.g. the Caption property).
|
||||
paReadOnly: Value is not allowed to change. But if paDialog is set
|
||||
a Dialog can change the value. This disables only the
|
||||
edit and combobox in the object inspector.
|
||||
@ -231,6 +234,7 @@ type
|
||||
paDynamicSubProps,
|
||||
paDialog,
|
||||
paMultiSelect,
|
||||
paAutoUpdate,
|
||||
paSortList,
|
||||
paReadOnly,
|
||||
paRevertable,
|
||||
@ -5180,7 +5184,7 @@ end;
|
||||
|
||||
function TCaptionPropertyEditor.GetAttributes: TPropertyAttributes;
|
||||
begin
|
||||
Result := [paMultiSelect, paRevertable];
|
||||
Result := [paMultiSelect, paAutoUpdate, paRevertable];
|
||||
end;
|
||||
|
||||
{ TStringsPropertyEditor }
|
||||
@ -5267,7 +5271,7 @@ end;
|
||||
|
||||
function TStringMultilinePropertyEditor.GetAttributes: TPropertyAttributes;
|
||||
begin
|
||||
Result := [paMultiSelect, paDialog, paRevertable];
|
||||
Result := [paMultiSelect, paDialog, paRevertable, paAutoUpdate];
|
||||
end;
|
||||
|
||||
{ TCursorPropertyEditor }
|
||||
|
Loading…
Reference in New Issue
Block a user