[kepler-dev] [Bug 5703] GUI bug - Deleting an Actor with connected port causes a diamond relation to be created.
bugzilla-daemon at ecoinformatics.org
bugzilla-daemon at ecoinformatics.org
Fri Sep 7 10:27:53 PDT 2012
http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5703
Christopher Brooks <cxh at eecs.berkeley.edu> changed:
What |Removed |Added
----------------------------------------------------------------------------
Hours Worked| |8
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #4 from Christopher Brooks <cxh at eecs.berkeley.edu> 2012-09-07 10:27:53 PDT ---
Fixed by Edward:
I've checked in a change that I hope fixes the problem we were
chasing today. The cause is interesting...
When we edit a model, the editor constructs a MoML string for
the edit actions. E.g., to remove a Display actor, it says:
<deleteEntity name="Display"/>
It passes this string to a MoMLChangeRequest, and calls
requestChange() to request that the change be executed.
If the model is not running, then the change request will
be executed immediately within the requestChange() method.
However, executing a change request may result in additional
changes being requested... E.g., an additional change may
be requested to remove a relation.
Before my checkin, that second change request was NOT being
executed immediately. It would just sit in a queue until
it was time execute another change request (e.g., move an
actor).
The new code in NamedObj is now also simpler:
public void requestChange(ChangeRequest change) {
NamedObj container = getContainer();
if (container != null) {
container.requestChange(change);
} else {
// Synchronize to make sure we don't modify
// the list of change requests while some other
// thread is also trying to read or modify it.
synchronized (_changeLock) {
// Queue the request.
// Create the list of requests if it doesn't already exist
if (_changeRequests == null) {
_changeRequests = new LinkedList<ChangeRequest>();
}
_changeRequests.add(change);
}
if (!_deferChangeRequests) {
executeChangeRequests();
}
}
}
--
Configure bugmail: http://bugzilla.ecoinformatics.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
More information about the Kepler-dev
mailing list