Running again after weak_ptr refactoring. No connecting of nodes atm. Copy/Paste might not work, too.

This commit is contained in:
Sebastian
2024-12-04 01:43:06 +01:00
parent 1fde652495
commit 036c6f4723
11 changed files with 150 additions and 104 deletions
+4 -6
View File
@@ -13,14 +13,12 @@ namespace VISEQ::APP {
return clipboard.back();
}
void copyNodes(GRAPH::NODES::VEC_WPTR_Node selected_nodes){
clipboard.emplace_back();
void copyNodes(GRAPH::NODES::VEC_SPTR_Node selected_nodes){
if(clipboard.size() == 20) clipboard.pop_back();
clipboard.emplace(clipboard.begin());
for(auto n : selected_nodes){
clipboard.back().push_back(n.lock());
n.lock().deselect();
clipboard.front().push_back(n);
}
//std::ranges::copy(selected_nodes.begin(), selected_nodes.end(), std::back_inserter(clipboard.back()));
//std::ranges::for_each(selected_nodes.begin(), selected_nodes.end(), [](GRAPH::NODES::SPTR_Node n){n->selected = false;});
}
};