Fixed selected object ordering

This commit is contained in:
Yousef Khadadeh 2025-12-31 10:06:26 +03:00
parent 9d752af00c
commit b688c39e68
6 changed files with 52 additions and 68 deletions

View file

@ -62,16 +62,6 @@ const DrawingProgramLayerListItem& DrawingProgramLayerManager::get_layer_root()
return *layerTreeRoot;
}
void DrawingProgramLayerManager::erase_component_set(const std::unordered_set<CanvasComponentContainer::ObjInfo*>& compsToErase) {
std::unordered_map<DrawingProgramLayerListItem*, std::vector<CanvasComponentContainer::ObjInfoIterator>> idsToEraseInSpecificLayers;
for(auto& c : compsToErase)
idsToEraseInSpecificLayers[c->obj->parentLayer].emplace_back(c->obj->objInfo);
for(auto& [layerListItem, netObjSetToErase] : idsToEraseInSpecificLayers) {
auto& layerComponentList = layerListItem->get_layer().components;
layerComponentList->erase_list(layerComponentList, netObjSetToErase);
}
}
bool DrawingProgramLayerManager::component_passes_layer_selector(CanvasComponentContainer::ObjInfo* c, LayerSelector layerSelector) {
switch(layerSelector) {
case LayerSelector::ALL_VISIBLE_LAYERS: