Skip to content

Commit

Permalink
Fix entity graph item names
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelma committed Sep 11, 2023
1 parent 169aa77 commit e7e0dab
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions spinetoolbox/spine_db_editor/graphics_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def has_unique_key(self):

def _get_name(self):
for db_map, id_ in self.db_map_ids:
name = self._spine_db_editor.get_item_name(db_map, id_)
name = self._spine_db_editor.get_item_name(db_map, self.entity_type, id_)
if isinstance(name, str):
return name

Expand Down Expand Up @@ -491,6 +491,9 @@ def __init__(self, spine_db_editor, x, y, extent, db_map_ids):
def has_dimensions(self):
return True

def _has_name(self):
return False

def default_parameter_data(self):
"""Return data to put as default in a parameter table when this item is selected."""
if not self.db_map_ids:
Expand Down Expand Up @@ -617,7 +620,7 @@ def shape(self):
return path

def _has_name(self):
return bool(self.label_item.toPlainText())
return True

def _make_tool_tip(self):
if not self.first_id:
Expand Down

0 comments on commit e7e0dab

Please sign in to comment.