Skip to content

Undo causes File widget to fail #329

@ajdapretnar

Description

@ajdapretnar

Unfortunately, I've no idea what exactly happened. I've had a workflow, where I undid several steps (Cmd+Z). This included removing the File widget from the canvas. Then, I manually added File back, which triggered the error. I cannot reproduce it with simple steps.
Reporting just in case.

-------------------------------------------------------------------------------
QLayout: Attempting to add QLayout "" to ErrorReporting "", which already has a layout
QLayout: Attempting to add QLayout "" to ErrorReporting "", which already has a layout
-------------------------- AttributeError Exception ---------------------------
Traceback (most recent call last):
  File "/Users/ajda/orange/orange-canvas-core/orangecanvas/application/canvasmain.py", line 1635, in save_swp
    self.save_swp_to(swpname)
  File "/Users/ajda/orange/orange-canvas-core/orangecanvas/application/canvasmain.py", line 1645, in save_swp_to
    undoDiff = [UndoCommand.from_QUndoCommand(undoStack.command(i))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ajda/orange/orange-canvas-core/orangecanvas/application/canvasmain.py", line 1645, in <listcomp>
    undoDiff = [UndoCommand.from_QUndoCommand(undoStack.command(i))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ajda/orange/orange-canvas-core/orangecanvas/document/commands.py", line 73, in from_QUndoCommand
    qc.__parent = parent
    ^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute '_UndoCommand__parent'
-------------------------------------------------------------------------------

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions