Skip to content

Commit

Permalink
Merge ElucidataInc#1348 from saifulbkhan/fix_sample_widget_sort
Browse files Browse the repository at this point in the history
[Fix] Items in sample widget unsortable (except set-name)
  • Loading branch information
saif-el authored Feb 2, 2021
2 parents 5c0923e + 86bd374 commit 50571a8
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 50571a8

Please sign in to comment.