From f0c509d82fe00636071e05b31cda9c5fde4d1db4 Mon Sep 17 00:00:00 2001 From: David Vierra Date: Fri, 24 Jun 2016 05:02:41 -1000 Subject: [PATCH] SimpleCommandPlugin now gets the dimension and selection --- src/mcedit2/plugins/command.py | 6 ++++-- src/plugins/simple_options.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mcedit2/plugins/command.py b/src/mcedit2/plugins/command.py index b04e0d2..790d4ee 100644 --- a/src/mcedit2/plugins/command.py +++ b/src/mcedit2/plugins/command.py @@ -89,9 +89,11 @@ class SimpleCommandPlugin(CommandPlugin): if result == QtGui.QDialog.Accepted: command = SimpleRevisionCommand(self.editorSession, self.displayName) with self.editorSession.beginCommand(command): - self.perform(self.editorSession.worldEditor, dialog.getOptions()) + self.perform(self.editorSession.currentDimension, + self.editorSession.currentSelection, + dialog.getOptions()) - def perform(self, world, options): + def perform(self, dimension, selection, options): raise NotImplementedError diff --git a/src/plugins/simple_options.py b/src/plugins/simple_options.py index c7d9cbd..fc0eab3 100644 --- a/src/plugins/simple_options.py +++ b/src/plugins/simple_options.py @@ -90,7 +90,7 @@ class SimpleOptionsDemo(SimpleCommandPlugin): } ] - def perform(self, world, options): + def perform(self, dimension, selection, options): lines = [] for key in [ 'myIntOption',