Ejemplo n.º 1
0
void LayerMoveTool::tabletPressEvent(CanvasTabletEvent *event)
{
	PAINTFIELD_DEBUG << "pressed";
	_layer = currentLayer();
	if (_layer && _layer->isType<RasterLayer>() && !_layer->isLocked())
	{
		_layerIsDragged = true;
		addLayerDelegation(_layer);
		_dragStartPoint = event->data.pos.toQPoint();
		_lastKeys = _layer->tileKeys();
	}
}
Ejemplo n.º 2
0
void RectTool::updateSelected()
{
	auto layers = layerScene()->selection();
	
	clearLayerDelegation();
	
	d->selectedLayerInfos.clear();
	
	for (const auto &layer : layers)
	{
		Data::LayerInfo info;
		info.setOriginalLayer(layer);
		
		if (layer->isType<AbstractRectLayer>() || layer->isType<RasterLayer>())
			addLayerDelegation(layer);
		
		d->selectedLayerInfos << info;
	}
	
	updateGraphicsItems();
}