Skip to content

Commit

Permalink
Continuization: Delay before showing default behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
janezd committed Feb 12, 2023
1 parent 0063152 commit 1116c26
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Orange/widgets/data/owcontinuize.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ def __init__(self, valid_type):
valid_types=(valid_type, ), strict_type=True)

def data(self, index, role=Qt.DisplayRole):
if role == Qt.ToolTipRole:
return None
if role == self.FilterRole:
name = super().data(index, Qt.DisplayRole)
if not isinstance(name, str):
Expand Down Expand Up @@ -259,9 +261,12 @@ def __layout(self):
margins.setTop(def_height + 2 + src_height)
self.setViewportMargins(margins)

def enterEvent(self, _):
self.itemDelegate().set_default_hints(True)
self.viewport().update()
def event(self, ev):
if ev.type() == ev.ToolTip:
self.itemDelegate().set_default_hints(True)
self.viewport().update()
return True
return super().event(ev)

def leaveEvent(self, _):
self.itemDelegate().set_default_hints(False)
Expand Down

0 comments on commit 1116c26

Please sign in to comment.