Skip to content

Confusing error with 'Transform annotations' when there is no main selection #1963

@petebankhead

Description

@petebankhead

Bug report

Describe the bug

See https://forum.image.sc/t/tranform-annotations-not-working-in-qupath/115432

To Reproduce

Steps to reproduce the behavior:

  1. Open an image
  2. Create multiple annotations
  3. Turn on selection mode, and use this to select all the annotations
  4. Run Objects → Annotations → Transform annotations...
  5. See the error

Expected behavior

Either a more informative error, or using selection mode ensures that a 'main' selection is also made.

Desktop (please complete the following information):

  • OS: All
  • QuPath Version: v0.6.0 (presumably earlier as well)

Additional context

I'm not sure if there are other commands that assume if getSelectedObjects() isn't empty, then getSelectedObject() is non-null.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions