Fix chunk loading origin not updating after changing dimensions
Offscreen views were being added to chunkLoader clients and controlling the load order...
This commit is contained in:
parent
0c897f397c
commit
4a54d0f5a4
@ -971,8 +971,14 @@ class EditorTab(QtGui.QWidget):
|
|||||||
def dimensionDidChange(self, dim):
|
def dimensionDidChange(self, dim):
|
||||||
for view in self.views:
|
for view in self.views:
|
||||||
view.setDimension(dim)
|
view.setDimension(dim)
|
||||||
|
# EditorSession has a new loader now, so re-add minimap and current view
|
||||||
|
|
||||||
|
self.editorSession.loader.addClient(self.miniMap)
|
||||||
|
view = self.currentView()
|
||||||
|
if view is not None:
|
||||||
self.editorSession.loader.addClient(view)
|
self.editorSession.loader.addClient(view)
|
||||||
|
|
||||||
|
|
||||||
def toolDidChange(self, tool):
|
def toolDidChange(self, tool):
|
||||||
if tool.toolWidget:
|
if tool.toolWidget:
|
||||||
self.toolOptionsArea.takeWidget() # setWidget gives ownership to the scroll area
|
self.toolOptionsArea.takeWidget() # setWidget gives ownership to the scroll area
|
||||||
@ -1021,7 +1027,10 @@ class EditorTab(QtGui.QWidget):
|
|||||||
|
|
||||||
:rtype: mcedit2.worldview.worldview.WorldView
|
:rtype: mcedit2.worldview.worldview.WorldView
|
||||||
"""
|
"""
|
||||||
return self.viewStack.currentWidget().worldView
|
widget = self.viewStack.currentWidget()
|
||||||
|
if widget is None:
|
||||||
|
return None
|
||||||
|
return widget.worldView
|
||||||
|
|
||||||
def showViewFrame(self, frame):
|
def showViewFrame(self, frame):
|
||||||
center = self.currentView().viewCenter()
|
center = self.currentView().viewCenter()
|
||||||
|
@ -194,8 +194,6 @@ class WorldView(QGLWidget):
|
|||||||
self.matrixNode = scenegraph.MatrixNode()
|
self.matrixNode = scenegraph.MatrixNode()
|
||||||
self._updateMatrices()
|
self._updateMatrices()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
self.matrixNode.addChild(self.loadableChunksNode)
|
self.matrixNode.addChild(self.loadableChunksNode)
|
||||||
self.matrixNode.addChild(self.worldScene)
|
self.matrixNode.addChild(self.worldScene)
|
||||||
self.matrixNode.addChild(self.overlayNode)
|
self.matrixNode.addChild(self.overlayNode)
|
||||||
|
@ -423,8 +423,7 @@ class WorldEditor(object):
|
|||||||
log.info("Dim %s: Found %d chunks in %0.2f seconds.",
|
log.info("Dim %s: Found %d chunks in %0.2f seconds.",
|
||||||
dimName,
|
dimName,
|
||||||
len(chunkPositions),
|
len(chunkPositions),
|
||||||
time.time() -
|
time.time() - start)
|
||||||
start)
|
|
||||||
self._allChunks[dimName] = chunkPositions
|
self._allChunks[dimName] = chunkPositions
|
||||||
|
|
||||||
def chunkCount(self, dimName):
|
def chunkCount(self, dimName):
|
||||||
|
Reference in New Issue
Block a user