Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Fix the events having their values reset when selecting a different event #3913

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class ChartEditorEventDataToolbox extends ChartEditorBaseToolbox
return;
}

chartEditorState.eventDataToPlace = {};
buildEventDataFormFromSchema(toolboxEventsDataGrid, schema, chartEditorState.eventKindToPlace);

if (!_initializing && chartEditorState.currentEventSelection.length > 0)
Expand All @@ -98,6 +99,8 @@ class ChartEditorEventDataToolbox extends ChartEditorBaseToolbox
{
super.refresh();

toolboxEventsEventKind.pauseEvent(UIEvent.CHANGE, true);

var newDropdownElement = ChartEditorDropdowns.findDropdownElement(chartEditorState.eventKindToPlace, toolboxEventsEventKind);

if (newDropdownElement == null)
Expand Down Expand Up @@ -156,6 +159,8 @@ class ChartEditorEventDataToolbox extends ChartEditorBaseToolbox
}
}
}

toolboxEventsEventKind.resumeEvent(UIEvent.CHANGE, true, true);
}

var lastEventKind:String = 'unknown';
Expand All @@ -170,8 +175,6 @@ class ChartEditorEventDataToolbox extends ChartEditorBaseToolbox
// Clear the frame.
target.removeAllComponents();

chartEditorState.eventDataToPlace = {};

for (field in schema)
{
if (field == null) continue;
Expand Down Expand Up @@ -264,7 +267,7 @@ class ChartEditorEventDataToolbox extends ChartEditorBaseToolbox
var value = event.target.value;
if (field.type == ENUM)
{
value = event.target.value.value;
value = event.target.value?.value;
}
else if (field.type == BOOL)
{
Expand Down
Loading