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

AlbCursorElement can be a child of a BlTextElement but with its parent set to nil #17

Open
plantec opened this issue Jul 21, 2022 · 1 comment

Comments

@plantec
Copy link
Collaborator

plantec commented Jul 21, 2022

No description provided.

@plantec
Copy link
Collaborator Author

plantec commented Jul 23, 2022

Clicking on the cursor does not produce any effect because the event is rejected.
Try this:

  • click on a word,
  • then double click without changing the mouse position to be exactly over the visual cursor.
    Normally, the whole word should be selected and it is not.

The visual cursor element is an instance of BlElement subclass: #AlbCursorElement.
It shows the cursor when editing..
Its model is managed by a AlbTextEditorCursor (it gives the position)
When a cursor position changes then, the actual AlbCursolElement is removed from its parent and a new AlbCursorElement is created (by a AlbCursorStencil) and then added as a child of the AlbTextElement under editing.

The bogue is as follow:
Sometimes a cursor element can have nil as its parent whereas it is drawn, this means that it is in the children array of an AlbTextElement.
Thus, the cursor element state is incorrect because a child BlElement must always point to its parent through the value of it parent instance variable.

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

No branches or pull requests

1 participant