diff --git a/spinetoolbox/spine_db_manager.py b/spinetoolbox/spine_db_manager.py
index 3cde2b24a..9d8218c9f 100644
--- a/spinetoolbox/spine_db_manager.py
+++ b/spinetoolbox/spine_db_manager.py
@@ -805,8 +805,7 @@ def tool_tip_data_from_parsed(parsed_data):
else:
tool_tip_data = None
if isinstance(tool_tip_data, str):
- fm = QFontMetrics(QFont("", 0))
- tool_tip_data = fm.elidedText(tool_tip_data, Qt.ElideRight, 800)
+ tool_tip_data = "" + tool_tip_data + ""
return tool_tip_data
def _format_list_value(self, db_map, item_type, value, list_value_id):
diff --git a/tests/test_SpineDBManager.py b/tests/test_SpineDBManager.py
index d072f0f88..da4f77441 100644
--- a/tests/test_SpineDBManager.py
+++ b/tests/test_SpineDBManager.py
@@ -157,11 +157,11 @@ def test_time_series_in_tool_tip_role(self):
value = TimeSeriesFixedResolution("2019-07-12T08:00", ["7 hours", "12 hours"], [1.1, 2.2, 3.3], False, False)
self.db_mngr.get_item.side_effect = _make_get_item_side_effect(*to_database(value))
formatted = self.get_value(Qt.ItemDataRole.ToolTipRole)
- self.assertEqual(formatted, "Start: 2019-07-12 08:00:00, resolution: [7h, 12h], length: 3")
+ self.assertEqual(formatted, "Start: 2019-07-12 08:00:00, resolution: [7h, 12h], length: 3")
value = TimeSeriesVariableResolution(["2019-07-12T08:00", "2019-07-12T16:00"], [0.0, 100.0], False, False)
self.db_mngr.get_item.side_effect = _make_get_item_side_effect(*to_database(value))
formatted = self.get_value(Qt.ItemDataRole.ToolTipRole)
- self.assertEqual(formatted, "Start: 2019-07-12T08:00:00, resolution: variable, length: 2")
+ self.assertEqual(formatted, "Start: 2019-07-12T08:00:00, resolution: variable, length: 2")
def test_broken_value_in_display_role(self):
value = b"dubbidubbidu"
@@ -179,7 +179,7 @@ def test_broken_value_in_tool_tip_role(self):
value = b"diibadaaba"
self.db_mngr.get_item.side_effect = _make_get_item_side_effect(value, None)
formatted = self.get_value(Qt.ItemDataRole.ToolTipRole)
- self.assertTrue(formatted.startswith('Could not decode the value'))
+ self.assertTrue(formatted.startswith('Could not decode the value'))
class TestAddItems(unittest.TestCase):