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):
|
||||
for view in self.views:
|
||||
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)
|
||||
|
||||
|
||||
def toolDidChange(self, tool):
|
||||
if tool.toolWidget:
|
||||
self.toolOptionsArea.takeWidget() # setWidget gives ownership to the scroll area
|
||||
@ -1021,7 +1027,10 @@ class EditorTab(QtGui.QWidget):
|
||||
|
||||
: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):
|
||||
center = self.currentView().viewCenter()
|
||||
|
@ -194,8 +194,6 @@ class WorldView(QGLWidget):
|
||||
self.matrixNode = scenegraph.MatrixNode()
|
||||
self._updateMatrices()
|
||||
|
||||
|
||||
|
||||
self.matrixNode.addChild(self.loadableChunksNode)
|
||||
self.matrixNode.addChild(self.worldScene)
|
||||
self.matrixNode.addChild(self.overlayNode)
|
||||
|
@ -423,8 +423,7 @@ class WorldEditor(object):
|
||||
log.info("Dim %s: Found %d chunks in %0.2f seconds.",
|
||||
dimName,
|
||||
len(chunkPositions),
|
||||
time.time() -
|
||||
start)
|
||||
time.time() - start)
|
||||
self._allChunks[dimName] = chunkPositions
|
||||
|
||||
def chunkCount(self, dimName):
|
||||
|
Reference in New Issue
Block a user