Drawpile intermixes selections, transforms, pasted images and even partial selections into a single amalgamation that's very hard to understand and work with. It will also obliterate your selection when you switch tools or misclick, which is particularly annoying because they don't participate in the undo stack and so you can't get them back.
The system needs to be tossed and rewritten entirely, with proper separation between all those different concepts and making selections persistent and present in the undo history.
Tracking work:
[x] Implement selections in the paint engine
[x] Make the zoom tool not use a selection to preview its rectangle
[x] Make rectangle and lasso selection tool emit selection commands
[x] Allow toggling anti-aliasing
[x] Generate selection outlines
[x] When drawing on the builtin server, disguise the new commands as PutImage messages.
[x] Add a new main window menu point "Selection", because sticking it all into "Edit" would make that menu ginormous
[x] Implement select all action
[x] Implement deselect action
[x] Implement invert selection action
[x] Implement select by layer bounds action
[x] Implement layer to selection action
[x] Implement selection fill actions
[x] Add separate transform tool
[x] Implement moving, scaling, rotating, skewing and distorting the transform
[x] Implement applying transforms
[x] Transform selections after applying transform
[x] Add action to transform selection and then switch back
[x] Add mirror, flip, fit to view, apply and cancel buttons to transform tool settings
[x] Add transform button to selection tool settings
[x] Properly restrict available actions depending on presence of selections and transforms
[x] Click selection to start transforming it
[x] Double-click outside of transform to apply it
[x] Implement cut and copy
[x] Implement paste
[x] Implement stamp (doesn't mix with undo and redo well, but alas)
[x] Implement undo and redo of transform steps
[x] Hide selections when they don't apply to the current tool
[x] Handle permissions properly
[x] Backport scene stuff to scene::CanvasView
[x] Create follow-up issue for using selections as fill tool bounds
[x] Create follow-up issue for drawing onto and filling selections as if they were a layer (compatibility: use blend modes to indicate that the layer id is referring to a selection id, older clients will ignore that)
[x] Create follow-up issue for fast/accurate preview switch
Drawpile intermixes selections, transforms, pasted images and even partial selections into a single amalgamation that's very hard to understand and work with. It will also obliterate your selection when you switch tools or misclick, which is particularly annoying because they don't participate in the undo stack and so you can't get them back.
The system needs to be tossed and rewritten entirely, with proper separation between all those different concepts and making selections persistent and present in the undo history.
Tracking work: