Skip to content

Editor Copy command does not work #35

Description

@jayrulez

Select objects in the editor viewport, hit Space button, then select "Copy" from the list.
You will get a error notification: There is no 'ClipboardEvent' available to run the command 'Copy'.

The clipboard changes broke the copy command in the editor.
These methods in EditorCommands:

void SaveSelectionToClipboard(Editor* editor, Space* space);
void LoadObjectFromClipboard(Editor* editor, Space* space);

Were changed to

void SaveSelectionToClipboard(ClipboardEvent* event, Space* space);
void LoadObjectFromClipboard(ClipboardEvent* event, Space* space);

The problem with this is in EditorCommands.hpp:Commands2::Execute:

  void Execute(Command* command, CommandManager* manager) override
  {
    pt0* param0 = manager->GetContext()->Get<pt0>();
    pt1* param1 = manager->GetContext()->Get<pt1>();

    if (param0 == NULL)
      return CommandFailed(command, ZilchTypeId(pt0));

    if (param1 == NULL)
      return CommandFailed(command, ZilchTypeId(pt1));

    mFunction(param0, param1);
  }

This line

pt0* param0 = manager->GetContext()->Get<pt0>();

will return NULL since pt0 will be ClipboardEvent.
It's responsible for the second part of this issue #11.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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