Beispiel #1
0
bool MapEditorToolBase::mouseReleaseEvent(QMouseEvent* event, MapCoordF map_coord, MapWidget* widget)
{
	active_modifiers = Qt::KeyboardModifiers(event->modifiers() | (key_button_bar ? key_button_bar->activeModifiers() : 0));
	cur_pos = event->pos();
	cur_pos_map = map_coord;
	calcConstrainedPositions(widget);
	
	if (event->button() == Qt::LeftButton)
	{
		if (dragging)
		{
			finishDragging();
		}
		else
		{
			clickRelease();
		}
		return true;
	}
	else if (event->button() == Qt::RightButton)
	{
		// Do not show the ring menu when editing
		return editingInProgress();
	}
	else
	{
		return false;
	}
}
Beispiel #2
0
void DrawPointTool::dragFinish()
{
	setEditingInProgress(false);
	clickRelease();
}
void DrawPointTool::dragFinish()
{
	setEditingInProgress(false);
	clickRelease();
	angle_helper->setActive(false);
}