Skip to content

Commit

Permalink
set location
Browse files Browse the repository at this point in the history
  • Loading branch information
zkovari committed Oct 7, 2024
1 parent 6b920bd commit 9797815
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/python/plotlyst/view/widget/world/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,10 @@ def activate(self):
def highlight(self):
self.mapScene().highlightItem(self)

def setLocation(self, location: Location):
self._marker.ref = location.id
self.mapScene().markerChangedEvent(self)

def setColor(self, color: str):
self._marker.color = color
self._marker.color_selected = marker_selected_colors[color]
Expand Down Expand Up @@ -358,10 +362,6 @@ def __init__(self, marker: WorldBuildingMarker, parent=None):

self._checkRef()

def setLocation(self, location: Location):
self._marker.ref = location.id
self.mapScene().markerChangedEvent(self)

def setIcon(self, icon: str):
self._marker.icon = icon
self.refresh()
Expand Down Expand Up @@ -592,7 +592,7 @@ def showEvent(self, event: QShowEvent) -> None:


class WorldBuildingMapScene(QGraphicsScene):
showPopup = pyqtSignal(MarkerItem)
showPopup = pyqtSignal(BaseMapItem)
hidePopup = pyqtSignal()
cancelItemAddition = pyqtSignal()
itemAdded = pyqtSignal()
Expand Down Expand Up @@ -1014,7 +1014,7 @@ def _selectionChanged(self):
else:
self._markerEditor.setVisible(False)

def _showPopup(self, item: MarkerItem):
def _showPopup(self, item: BaseMapItem):
location = entities_registry.location(str(item.marker().ref))
if location:
self._popup.setText(location.name, location.summary)
Expand Down

0 comments on commit 9797815

Please sign in to comment.