Replace Blocks now respects the "In Selection" checkbox

This commit is contained in:
David Vierra 2015-06-07 00:23:01 -10:00
parent d3187b2d73
commit 5f941735c2

View File

@ -247,8 +247,10 @@ class FindReplaceBlocks(QtCore.QObject):
def doReplace(self):
replacements = self.getReplacements()
command = SimpleRevisionCommand(self.editorSession, "Replace")
selection = self.editorSession.currentDimension.bounds
# selection = self.editorSession.currentSelection
if self.dialog.replaceBlocksInSelectionCheckbox.isChecked():
selection = self.editorSession.currentSelection
else:
selection = self.editorSession.currentDimension.bounds
with command.begin():
task = self.editorSession.currentDimension.fillBlocksIter(selection, replacements, updateLights=False)
showProgress("Replacing...", task)