Skip to content

Adding a hierarchy node without explicitly setting the color doesn't work

  1. Run in debug mode.
  2. Open a project with one photo, no segmentation ever attempted. The default region hierarchy is shown in the panel on the right, as expected.
  3. Right-click appendages, select New child label. A dialog appears, as expected.
  4. Fill in A5 as the name, but do not use Set color. Click OK. Program crashes:
Traceback (most recent call last):
  File "D:\work\arthropods\arthropoddescriber2repository\arthropod_describer_py\maphis\label_editor\label_editor.py", line 719, in handle_new_label_requested
    added_label: Node = self.state.label_hierarchy.add_child_label(parent, name, color.toTuple()[:3])
SystemError: <built-in method toTuple of PySide6.QtGui.QColor object at 0x000001BBFFDB7040> returned NULL without setting an error

Process finished with exit code 1

If the color is explicitly set, adding the node seems to work correctly.

Even if this isn't implemented/fixed, right-clicking the label list should at least be disabled in the release version.

Edited by Karel Štěpka