Fixed crash
This commit is contained in:
@@ -43,8 +43,8 @@ class MapInfoPanel(QWidget):
|
||||
self.tileXInput.returnPressed.connect(self.goToPosition)
|
||||
self.tileYInput.returnPressed.connect(self.goToPosition)
|
||||
self.tileZInput.returnPressed.connect(self.goToPosition)
|
||||
self.parent.map.positionEvent.sub(self.updatePositionLabels)
|
||||
self.parent.mapData.onMapData.sub(self.onMapData)
|
||||
self.parent.map.onPositionChange.sub(self.updatePositionLabels)
|
||||
self.parent.map.onMapData.sub(self.onMapData)
|
||||
self.mapTitleInput.textChanged.connect(self.onMapNameChange)
|
||||
|
||||
# Initial label setting
|
||||
@@ -55,7 +55,7 @@ class MapInfoPanel(QWidget):
|
||||
x = int(self.tileXInput.text())
|
||||
y = int(self.tileYInput.text())
|
||||
z = int(self.tileZInput.text())
|
||||
map.moveTo(x, y, z)
|
||||
self.parent.map.moveTo(x, y, z)
|
||||
except ValueError:
|
||||
QMessageBox.warning(self, "Invalid Input", "Please enter valid integer coordinates.")
|
||||
|
||||
@@ -80,4 +80,4 @@ class MapInfoPanel(QWidget):
|
||||
self.mapTitleInput.setText(data.get("mapName", ""))
|
||||
|
||||
def onMapNameChange(self, text):
|
||||
self.parent.mapData.data['mapName'] = text
|
||||
self.parent.map.data['mapName'] = text
|
||||
Reference in New Issue
Block a user