diff options
-rw-r--r-- | ui/qt/models/enabled_protocols_model.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ui/qt/models/enabled_protocols_model.cpp b/ui/qt/models/enabled_protocols_model.cpp index c807975dd5..db98dc2a03 100644 --- a/ui/qt/models/enabled_protocols_model.cpp +++ b/ui/qt/models/enabled_protocols_model.cpp @@ -451,7 +451,14 @@ bool EnabledProtocolsProxyModel::lessThan(const QModelIndex &left, const QModelI EnabledProtocolItem* right_item = static_cast<EnabledProtocolItem*>(right.internalPointer()); if ((left_item != NULL) && (right_item != NULL)) { - int compare_ret = left_item->name().compare(right_item->name(), Qt::CaseInsensitive); + + int compare_ret = 0; + + if (left.column() == EnabledProtocolsModel::colProtocol ) + compare_ret = left_item->name().compare(right_item->name(), Qt::CaseInsensitive); + else if ( left.column() == EnabledProtocolsModel::colDescription ) + compare_ret = left_item->description().compare(right_item->description(), Qt::CaseInsensitive); + if (compare_ret < 0) return true; } |