Skip to content
Snippets Groups Projects
Commit 1747a89e authored by Albert Gräf's avatar Albert Gräf
Browse files

Fix the findbox regression, part 3.

Make Ctrl+F work if the canvas is in edit mode. In this case,
canvas_key(), upon receiving the Ctrl keydown event from the Ctrl+F
shortcut, temporarily switches to run mode, but never gets the
corresponding keyup event which goes to the findbox, so temporary run
mode remains in effect when the findbox opens.

This shouldn't actually be much of a problem, but the real trouble is
that while canvas_key() informs the GUI about the change to run mode, it
doesn't update the state of the canvas-local gl_edit variable
accordingly. So when dofind() switches on edit mode later, the engine
still thinks that it's in edit mode and thus doesn't trigger the
necessary update.

The easy fix is to just update gl_edit in canvas_key() when edit mode is
temporarily disabled.
parent 12ab314b
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment