Skip to content

Commit

Permalink
[Fix] Items in sample widget unsortable (except set-name)
Browse files Browse the repository at this point in the history
  • Loading branch information
saif-el committed Feb 2, 2021
1 parent 5c0923e commit 86bd374
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/mzroll/numeric_treewidgetitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ bool NumericTreeWidgetItem::operator<( const QTreeWidgetItem & other ) const
int sortCol = treeWidget()->sortColumn();

// hack to prevent sorting of child tree-widget items (such as isotopes that
// need to have a fixed sort order
if (parent() != nullptr && sortCol != 1)
// need to have a fixed sort order)
if (parent() != nullptr && type() == 0 && sortCol != 1)
return false;

QString thisText = text(sortCol);
Expand Down

0 comments on commit 86bd374

Please sign in to comment.