public void newTool(int tool, CPBrushInfo toolInfo) {
		if (curSelectedMode == curDrawMode) {
			curSelectedMode = drawingModes[toolInfo.strokeMode];
		}
		curDrawMode = drawingModes[toolInfo.strokeMode];

		if (!spacePressed && mouseIn) {
			brushPreview = true;

			Rectangle r = getBrushPreviewOval();
			r.grow(2, 2);
			if (oldPreviewRect != null) {
				r = r.union(oldPreviewRect);
				oldPreviewRect = null;
			}

			repaint(r.x, r.y, r.width, r.height);
		}
	}