core-5362 fix cancel in tool selection dialog