mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-28 01:08:12 +08:00
Make duplicating folders also duplicate its children (#1178)
* Latest changes * Add layer attempt * layer tree is now correct after duplicating layers * Latest changes * Latest Changes * Recursive idea * Moving Layers to Dup Folder - not done * latest changes * latest progress * Latest Changes * Latest Changes * Latest Changes * Latest * Latest * Latest * Duplicating Folders works * Initial Refactoring * Ready for QA * Doesn't select all the children after duplicate anymore * First pass code review with major cleanup * Removed unused next_asssignment_id function and updated FolderLayer struct * Removed unused logic * First iteration of cleaning up the code * Added Ollie's suggestions * Code review cleanup --------- Co-authored-by: Ollie Dolan <olliedolan10@gmail.com> Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Ollie Dolan
Keavon Chambers
parent
88c4713e75
commit
7acf41530e
@@ -11,8 +11,12 @@ pub enum DocumentResponse {
|
||||
FolderChanged {
|
||||
path: Vec<LayerId>,
|
||||
},
|
||||
AddSelectedLayer {
|
||||
additional_layers: Vec<Vec<LayerId>>,
|
||||
},
|
||||
CreatedLayer {
|
||||
path: Vec<LayerId>,
|
||||
is_selected: bool,
|
||||
},
|
||||
DeletedLayer {
|
||||
path: Vec<LayerId>,
|
||||
@@ -21,6 +25,11 @@ pub enum DocumentResponse {
|
||||
LayerChanged {
|
||||
path: Vec<LayerId>,
|
||||
},
|
||||
MoveSelectedLayersTo {
|
||||
folder_path: Vec<LayerId>,
|
||||
insert_index: isize,
|
||||
reverse_index: bool,
|
||||
},
|
||||
DeletedSelectedManipulatorPoints,
|
||||
}
|
||||
|
||||
@@ -29,10 +38,12 @@ impl fmt::Display for DocumentResponse {
|
||||
match self {
|
||||
DocumentResponse::DocumentChanged { .. } => write!(f, "DocumentChanged"),
|
||||
DocumentResponse::FolderChanged { .. } => write!(f, "FolderChanged"),
|
||||
DocumentResponse::AddSelectedLayer { .. } => write!(f, "AddSelectedLayer"),
|
||||
DocumentResponse::CreatedLayer { .. } => write!(f, "CreatedLayer"),
|
||||
DocumentResponse::LayerChanged { .. } => write!(f, "LayerChanged"),
|
||||
DocumentResponse::DeletedLayer { .. } => write!(f, "DeleteLayer"),
|
||||
DocumentResponse::DeletedSelectedManipulatorPoints { .. } => write!(f, "DeletedSelectedManipulatorPoints"),
|
||||
DocumentResponse::MoveSelectedLayersTo { .. } => write!(f, "MoveSelectedLayersTo"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user