public void addUnit(core.GroupOfUnits unit, List<core.GroupOfUnits> list, QListWidget widget)
	{
		boolean found = false;
		int i=0;
		for (core.GroupOfUnits u: list) {
			if (u.type == unit.type) {
				u.setNumber(u.getNumber() + unit.getNumber());
				widget.item(i).setText(u.type.name + " ("+u.getNumber()+")");
				found = true;
				break;
			}
			++i;
		}
		if (!found) {
			list.add(unit);
			widget.addItem(unit.type.name + " ("+unit.getNumber()+")");
		}
	}