From 0775308066ae69b3e39eae043efde45371014bb9 Mon Sep 17 00:00:00 2001 From: David Vierra Date: Wed, 16 Sep 2015 05:30:15 -1000 Subject: [PATCH] Cleanup --- src/mcedit2/editortools/brush/__init__.py | 2 +- src/mceditlib/relight/__init__.py | 6 +++++- src/mceditlib/selection/__init__.py | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/mcedit2/editortools/brush/__init__.py b/src/mcedit2/editortools/brush/__init__.py index 92858fc..6fbd783 100644 --- a/src/mcedit2/editortools/brush/__init__.py +++ b/src/mcedit2/editortools/brush/__init__.py @@ -245,7 +245,7 @@ class BrushModeWidget(QtGui.QComboBox): self.setCurrentIndex(currentIndex) finally: self.adding = False - + def indexDidChange(self): if self.adding: return diff --git a/src/mceditlib/relight/__init__.py b/src/mceditlib/relight/__init__.py index 25be32b..d924f62 100644 --- a/src/mceditlib/relight/__init__.py +++ b/src/mceditlib/relight/__init__.py @@ -6,6 +6,9 @@ import logging log = logging.getLogger(__name__) +updateLightsByCoord = updateLightsInSelection = NotImplemented + + def setMethod(name): if name == "pure": from mceditlib.relight import pure_python @@ -20,9 +23,10 @@ def setMethod(name): from mceditlib.relight import with_sections setModule(with_sections) + def setModule(mod): global updateLightsByCoord, updateLightsInSelection updateLightsByCoord = mod.updateLightsByCoord updateLightsInSelection = mod.updateLightsInSelection -setMethod("cython") \ No newline at end of file +setMethod("cython") diff --git a/src/mceditlib/selection/__init__.py b/src/mceditlib/selection/__init__.py index 7fdc05f..f07da11 100644 --- a/src/mceditlib/selection/__init__.py +++ b/src/mceditlib/selection/__init__.py @@ -14,7 +14,8 @@ log = logging.getLogger(__name__) class ISelection(object): """ - Interface for block selections that can have any shape. Used by block_copy and block_fill. + Interface for block selections that can have any shape. Used by copy and fill + operations, among others. BoundingBox is the only provider for now.