Beispiel #1
0
			void dirty_clear() const noexcept
				{
				m_bounding_rect_old=boundingRectangle();
				auto l=layers();
				if(l!=nullptr)
					{(*l)[layerIndex()].dirty(false);}
				}
bool LayerContainer::removeLayer(Layer* layer)
{
    int index = layerIndex(layer);

    if ( index < 0 || index > layers_.size() )
        return false;

    parentDocument()->pushCommand(new command::RemoveLayer(
        tr("Remove Layer"), this, layer, index
    ));

    return true;
}
bool LayerContainer::removeLayerRaw(Layer* layer)
{
    int index = layerIndex(layer);

    if ( index < 0 || index > layers_.size() )
        return false;

    layers_.removeAt(index);

    onRemoveLayer(layer);

    disconnect(layer, &LayerContainer::layerAdded, this, &LayerContainer::layerAdded);
    disconnect(layer, &LayerContainer::layerRemoved, this, &LayerContainer::layerRemoved);

    emit layerRemoved(layer, this, index);

    return true;
}
Beispiel #4
0
			void dirty_set() noexcept
				{
				auto l=layers();
				if(l!=nullptr)
					{(*l)[layerIndex()].dirty(true);}
				}