public void mouseDragged(MouseEvent me)
    {
        if (this.isEnabled())
        {
            this.wasDragged = true;
            int tool = tools.getSelectedDrawingTool();
            if (!(tool == Toolset.TOOL_EYEDROPER
                || tool == Toolset.TOOL_PAINT_BUCKET || tool == Toolset.TOOL_PENCIL)
                || tool == Toolset.TOOL_SELECTION)
            {
                // other tools need to be undo'd before drawing again
                undo(false);
                addUndo();
            }
            doTool(sx, sy, getImgXY(me.getX()), getImgXY(me.getY()));

            getNewImage();
        }
    }