Changeset 8098:d72575a75978 in orange


Ignore:
Timestamp:
07/13/11 14:32:16 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
c81e397040fe16542c327dd2bdfc527f98eb71f5
Message:

Check if the textRect as returned by the style is valid in the LinkStyledItemDelegate (this time in linkRect method). If not use the option.rect.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/OWGUI.py

    r8097 r8098  
    18511851        self.initStyleOption(option, index) 
    18521852        textRect = style.subElementRect(QStyle.SE_ItemViewItemText, option) 
     1853        if not textRect.isValid(): 
     1854            textRect = option.rect 
    18531855        margin = style.pixelMetric(QStyle.PM_FocusFrameHMargin, option) + 1 
    18541856        textRect = textRect.adjusted(margin, 0, -margin, 0) 
Note: See TracChangeset for help on using the changeset viewer.