public void mousePressed(MouseEvent me)
    {
        if (this.isEnabled())
        {
            this.wasDragged = false;
            sx = getImgXY(me.getX());
            sy = getImgXY(me.getY());
            selx = selection.x;
            sely = selection.y;
            if (tools.getSelectedDrawingTool() == Toolset.TOOL_SELECTION)
            {
                isMakingSelect = ((!(selection.width > 0 && selection.height > 0)) || !(selection
                    .contains(sx, sy)));
            }
            if (!(tools.getSelectedDrawingTool() == Toolset.TOOL_EYEDROPER))
            {
                addUndo();
            }

            doTool(sx, sy, sx, sy);
        }
    }