Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Fix ReadOnlyCollectionsModel tooltip logic (Widgets/Variable Explorer) #21193

Merged
merged 1 commit into from
Jul 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions spyder/widgets/collectionseditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,6 @@ def data(self, index, role=Qt.DisplayRole):
if not index.isValid():
return to_qvariant()
value = self.get_value(index)
if role == Qt.ToolTipRole and index.column() == 3:
return value['view']
elif role == Qt.ToolTipRole:
return value
if index.column() == 4 and role == Qt.DisplayRole:
# TODO: Check the effect of not hiding the column
# Treating search scores as a table column simplifies the
Expand All @@ -428,6 +424,8 @@ def data(self, index, role=Qt.DisplayRole):
display = to_text_string(value)
else:
display = value
if role == Qt.ToolTipRole:
return display
if role == Qt.UserRole:
if isinstance(value, NUMERIC_TYPES):
return to_qvariant(value)
Expand Down