getLayers() from a layerComposition

This commit is contained in:
jrkb 2023-04-22 13:48:02 +02:00
parent 9a7b3edc9e
commit cfe9d56e65
2 changed files with 4 additions and 0 deletions

View file

@ -167,6 +167,9 @@ void LayerComposition::removeLayer(const LayerID & id){
layers.erase(id);
}
const unordered_map <LayerID, shared_ptr <Layer> > & LayerComposition::getLayers(){
return layers;
}
shared_ptr <Layer> LayerComposition::getLayer(const LayerID & layerID){
return layers[layerID];
}

View file

@ -28,6 +28,7 @@ class LayerComposition {
void findOrCreateNewMomForLayer(shared_ptr <Layer> layer,
ComboIdentifier idealMom);
void removeLayer(const LayerID & id); // TODO: make bool, to catch nonexisting
const unordered_map <LayerID, shared_ptr <Layer> > & getLayers();
shared_ptr <Layer> getLayer(const LayerID & layerID);
const unordered_map <ComboIdentifier, shared_ptr <AtlasLayerCombo> > & getAtlasLayerCombos() const;
void setVFlip(bool vFlip);