Fix livewire crashing out of bounds
Summary:
I implemented Option 1 mentioned in the comments of T29591, adding a condition to the EditableContourTool statemachine that only lets the user draw when on the correct plane. From what I can see, this fixes the reported crash, since there is no more interaction with other planes.
There is still somewhat weird behavior when starting to draw (with held mouse button) in one window, moving the mouse to another window, and releasing the mouse button. After this, moving the mouse back to the initial window does not show a connection to the previous point (which should lie outside the window). But I think this is outside of the scope of this task, since there is no crashing and the actions needed to produce this are very uncommon, and a nice solution (e.g. finishing the draw at the edge of the window) would be some more work.
Test Plan: Try to reproduce the bug from T29591 and drawing in other windows (after starting a contour) in general.
Reviewers: O1 MITK Reviewer Group I, floca
Reviewed By: O1 MITK Reviewer Group I, floca
Differential Revision: https://phabricator.mitk.org/D854