fix fold indicators
parent
b380959241
commit
914f987487
|
@ -114,14 +114,15 @@ void PatternEditorItemDelegate::paint(QPainter *painter, const QStyleOptionViewI
|
|||
//painter->fillRect(option.rect, Config::colorScheme.patternSelection);
|
||||
}
|
||||
|
||||
if (mdl->folded && p->fold > 1) {
|
||||
if (row > 0 && mdl->folded && p->fold > 1) {
|
||||
bool show = false;
|
||||
|
||||
int cc = index.column() % PatternEditorModel::colsPerChannel;
|
||||
int ch = (index.column() - cc) / PatternEditorModel::colsPerChannel;
|
||||
if (ch < static_cast<int>(p->numChannels())) {
|
||||
int rowEnd = row + p->fold;
|
||||
for (int i = row + 1; i < rowEnd; i++) {
|
||||
int rs = row + 1;
|
||||
int rowEnd = rs + p->fold;
|
||||
for (int i = rs + 1; i < rowEnd; i++) {
|
||||
QString v = index.siblingAtRow(i).data(Qt::DisplayRole).toString();
|
||||
if (!(v.isEmpty() or v == " - " or v == "- " or v == "» ")) { show = true; break; }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue