mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
r21808: - Fix a nasty bug in the finite state machine that allowed an event from a
non-handled widget to be processed as if the event originated from a handled
widget. This was allowing the appear event for the module's canvas in
Mimir's Net Manager (an event which was not handled) to load the tree,
followed by the tree appear event (intended to be handled, albeit
incorrectly -- see subsequent check-in of Mimir's Fsm.js) to again load the
tree, thus the double entry.
Wow, the above paragraph is really hard to read. :-)
(This used to be commit 512dc61e84
)
This commit is contained in:
parent
676a04a056
commit
3330a53acc
@ -220,6 +220,13 @@ qx.Proto.replaceState = function(state, bDispose)
|
||||
// Save the old state object, so we can return it to be disposed
|
||||
var oldState = this._states[stateName];
|
||||
|
||||
// Ensure the old state exists. Otherwise, shouldn't be using replaceState()
|
||||
if (! oldState)
|
||||
{
|
||||
throw new Error("Can not replace state " + stateName + ": " +
|
||||
"no existing state of that name.");
|
||||
}
|
||||
|
||||
// Replace the old state with the new state object.
|
||||
this._states[stateName] = state;
|
||||
|
||||
@ -227,7 +234,7 @@ qx.Proto.replaceState = function(state, bDispose)
|
||||
if (bDispose)
|
||||
{
|
||||
// Yup. Mark it to be disposed.
|
||||
oldState._needDispose;
|
||||
oldState._bNeedDispose = true;
|
||||
}
|
||||
|
||||
return oldState;
|
||||
@ -787,6 +794,18 @@ qx.Proto._run = function(event)
|
||||
}
|
||||
|
||||
action = e[friendly];
|
||||
|
||||
// Do we handle this event type for the widget from which it originated?
|
||||
if (! action)
|
||||
{
|
||||
// Nope.
|
||||
if (debugEvents)
|
||||
{
|
||||
this.debug(this.getName() + ": Event '" + event.getType() + "'" +
|
||||
" not handled for target " + friendly + ". Ignoring.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -946,7 +965,7 @@ qx.Proto._run = function(event)
|
||||
currentState.getAutoActionsAfterOnexit()(this);
|
||||
|
||||
// If this state has been replaced and we're supposed to dispose it...
|
||||
if (currentState._needDispose)
|
||||
if (currentState._bNeedDispose)
|
||||
{
|
||||
// ... then dispose it now that it's no longer in use
|
||||
currentState.dispose();
|
||||
|
Loading…
Reference in New Issue
Block a user