forked from Mirrors/openclonk
Qt Editor: Fix evaluation of ValueKey in enum option when changing child delegate value
parent
097ff2c9fb
commit
3c84f9e6f8
|
@ -802,11 +802,6 @@ void C4PropertyDelegateEnum::UpdateEditorParameter(C4PropertyDelegateEnum::Edito
|
|||
{
|
||||
// Showing current selection: From last_val assigned in SetEditorData
|
||||
parameter_val = editor->last_val;
|
||||
if (option.value_key)
|
||||
{
|
||||
C4PropList *props = editor->last_val.getPropList();
|
||||
if (props) props->GetPropertyByS(option.value_key.Get(), ¶meter_val);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -816,6 +811,12 @@ void C4PropertyDelegateEnum::UpdateEditorParameter(C4PropertyDelegateEnum::Edito
|
|||
// (note that actual setting is delayed by control queue and this may often the wrong value in some cases - the correct value will be shown on execution of the queue)
|
||||
SetOptionValue(editor->last_get_path, option);
|
||||
}
|
||||
// Resolve parameter value
|
||||
if (option.value_key)
|
||||
{
|
||||
C4PropList *props = editor->last_val.getPropList();
|
||||
if (props) props->GetPropertyByS(option.value_key.Get(), ¶meter_val);
|
||||
}
|
||||
// Show it
|
||||
editor->parameter_widget = option.adelegate->CreateEditor(factory, editor, QStyleOptionViewItem(), by_selection);
|
||||
if (editor->parameter_widget)
|
||||
|
|
Loading…
Reference in New Issue