Changeset View
Changeset View
Standalone View
Standalone View
plugins/quickopen/expandingtree/expandingwidgetmodel.cpp
Show First 20 Lines • Show All 339 Lines • ▼ Show 20 Line(s) | 336 | } else if( v.canConvert<QString>() ) { | |||
---|---|---|---|---|---|
340 | edit->resize(200, 50); //Make the widget small so it embeds nicely. | 340 | edit->resize(200, 50); //Make the widget small so it embeds nicely. | ||
341 | m_expandingWidgets[idx] = edit; | 341 | m_expandingWidgets[idx] = edit; | ||
342 | } else { | 342 | } else { | ||
343 | m_expandingWidgets[idx] = nullptr; | 343 | m_expandingWidgets[idx] = nullptr; | ||
344 | } | 344 | } | ||
345 | } | 345 | } | ||
346 | 346 | | |||
347 | //Eventually partially expand the row | 347 | //Eventually partially expand the row | ||
348 | if( !expanded && firstColumn(treeView()->currentIndex()) == idx && !isPartiallyExpanded(idx) ) | 348 | if( !expanded && firstColumn(treeView()->currentIndex()) == idx && (isPartiallyExpanded(idx) == ExpandingWidgetModel::ExpansionType::NotExpanded) ) | ||
349 | rowSelected(idx); //Partially expand the row. | 349 | rowSelected(idx); //Partially expand the row. | ||
350 | 350 | | |||
351 | emit dataChanged(idx, idx); | 351 | emit dataChanged(idx, idx); | ||
352 | 352 | | |||
353 | if(treeView()) | 353 | if(treeView()) | ||
354 | treeView()->scrollTo(idx); | 354 | treeView()->scrollTo(idx); | ||
355 | } | 355 | } | ||
356 | } | 356 | } | ||
▲ Show 20 Lines • Show All 173 Lines • Show Last 20 Lines |