// We can be sure that if we've come here, then either an active tool is
// being deactivated, or a new tool is being created. In either case, the
// old tool needs to be deleted.
// We can be sure that if we've come here, then either an active tool is
// being deactivated, or a new tool is being created. In either case, the
// old tool needs to be deleted.