Changeset 8097:f5881746d6df in orange


Ignore:
Timestamp:
07/13/11 14:05:17 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
108401a6e2fb445793e0a17310f0f26f6a0f6506
Message:

Check if the textRect as returned by the style is valid in the LinkStyledItemDelegate. If not use the option.rect.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/OWGUI.py

    r8042 r8097  
    18991899            text = self.displayText(index.data(Qt.DisplayRole), QLocale.system()) 
    19001900            textRect = style.subElementRect(QStyle.SE_ItemViewItemText, option) 
     1901            if not textRect.isValid(): 
     1902                textRect = option.rect 
    19011903            margin = style.pixelMetric(QStyle.PM_FocusFrameHMargin, option) + 1 
    19021904            textRect = textRect.adjusted(margin, 0, -margin, 0) 
Note: See TracChangeset for help on using the changeset viewer.