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

Prevent adding transtions where states are not added #80

Closed
wants to merge 1 commit into from

Conversation

syntheticpp
Copy link
Contributor

Current recursive adding of states does not work.

The old code tries to catch this,

  QState *parentState = state->parentState();
  if (parentState) {
    addStateOnly(parentState); // be sure that parent is added first
  }

but this does not work, because a unadded state could be used in addTransition(), then the graphs shows dangling states.

@krf
Copy link
Contributor

krf commented Apr 17, 2014

Hm, actually I'd like to get rid off the filtering on the server-side completely, so I don't really want to add even more code handling this here.

Isn't the following hunk the only code needed to fix this issue for you?

+  // TODO also show targetless transitions
+  if (!targetState)
+      return;

@krf krf added this to the 2.0.2 milestone Apr 17, 2014
@krf krf added the bug label Apr 17, 2014
@krf krf self-assigned this Apr 17, 2014
@syntheticpp
Copy link
Contributor Author

No, the problem is that existsing states are reported in the wrong order.

@syntheticpp
Copy link
Contributor Author

Just discovered KDSME, looks very nice within Gammary!

But this patch is still needed.

(I wonder how simple your state charts must be, or maybe you just don't dogfood yourself.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants