Ungroup layers (#465)

* WIP handling corner cases, like ungrouping subfolders

* Resolved hanging

* Fix recursive ungrouping

* Functional, corner case free Ungroup. Small Undo issue & warnings

* Update layertree upon undo

* Also update  layerdata upon redo

* Add some polish

* Resolved TODOs

* Oops didn't save all after rename, ha.

Co-authored-by: Dennis <dennis@kobert.dev>
This commit is contained in:
Oliver Davies
2022-01-07 15:53:12 -08:00
committed by Keavon Chambers
parent aa9770092f
commit 8e35424c43
7 changed files with 111 additions and 35 deletions

View File

@@ -261,6 +261,7 @@ impl Default for Mapping {
entry! {action=DocumentsMessage::Copy(User), key_down=KeyC, modifiers=[KeyControl]},
entry! {action=DocumentsMessage::Cut(User), key_down=KeyX, modifiers=[KeyControl]},
entry! {action=DocumentMessage::GroupSelectedLayers, key_down=KeyG, modifiers=[KeyControl]},
entry! {action=DocumentMessage::UngroupSelectedLayers, key_down=KeyG, modifiers=[KeyControl, KeyShift]},
// Nudging
entry! {action=DocumentMessage::NudgeSelectedLayers(-SHIFT_NUDGE_AMOUNT, -SHIFT_NUDGE_AMOUNT), key_down=KeyArrowUp, modifiers=[KeyShift, KeyArrowLeft]},
entry! {action=DocumentMessage::NudgeSelectedLayers(SHIFT_NUDGE_AMOUNT, -SHIFT_NUDGE_AMOUNT), key_down=KeyArrowUp, modifiers=[KeyShift, KeyArrowRight]},