Fix Move Tool to work correctly with Instant Preview
There were multiple problems:
- We couldn't search for a "node under cursor" in the GUI thread,
because Lod0 plane may be not ready yet (because currrently running
LodN stroke hasn't finished yet). Therefore, the node selection should
happen in the stroke itself.
- It leads to the fact that the stroke can be ended without doing
any work (when no nodes are found), hence we now have
MoveStrokeStrategy::sigStrokeStartedEmpty
- Since we don't have the list of nodes to process before the stroke
is actually started, we cannot properly decide whether we can use LodN
in MoveStrokeStrategy::createLodClone(). Therefore, we use pessimistic
approach there: if the tool uses "layer under cursor" and the image has
at least one non-lod-supporting node (e.g. a shape layer or a selection
mask), then LodN mode is disabled.
- The patch also fixes a bug in MoveSelectionStrokeStrategy, which
caused it to return wrong handles rect in LodN mode.
BUG:400484