public void mouseReleased(MouseEvent me)
    {
        if (this.isEnabled())
        {
            if (tools.getSelectedDrawingTool() == Toolset.TOOL_SELECTION)
            {
                undo();
            }
            if (!this.wasDragged)
            {
                if (selection.height != 0 && selection.width != 0)
                {
                    addUndo();
                    flattenSelection();
                }
                this.selection = new Rectangle();
            }
            fireChanged();
        }
    }