Skip to content

Crash on caling Score.undo() in the console #1879

@thibaudk

Description

@thibaudk

It seems to only be missing a caUndo check.

Adding this in src/plugins/score-plugin-js/JS/Qml/EditContext.cpp fixes it

void EditJsContext::undo()
{
  auto doc = ctx();
  if(!doc)
    return;

  auto& s{doc->document.commandStack()};
  if (s.canUndo()) s.undo(); 
}

It would be a quick fix, butt maybe I am missing something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions