Commit a69d1b39 authored by Clément Fauconnier's avatar Clément Fauconnier

save SortOrder and SortKind changes

parent 17d8d095
...@@ -2069,6 +2069,8 @@ void UBDocumentController::onSortOrderChanged(bool order) ...@@ -2069,6 +2069,8 @@ void UBDocumentController::onSortOrderChanged(bool order)
int orderIndex = order ? UBDocumentController::DESC : UBDocumentController::ASC; int orderIndex = order ? UBDocumentController::DESC : UBDocumentController::ASC;
sortDocuments(kindIndex, orderIndex); sortDocuments(kindIndex, orderIndex);
UBSettings::settings()->documentSortOrder->setInt(orderIndex);
} }
void UBDocumentController::onSortKindChanged(int index) void UBDocumentController::onSortKindChanged(int index)
...@@ -2076,6 +2078,8 @@ void UBDocumentController::onSortKindChanged(int index) ...@@ -2076,6 +2078,8 @@ void UBDocumentController::onSortKindChanged(int index)
int orderIndex = mDocumentUI->sortOrder->isChecked() ? UBDocumentController::DESC : UBDocumentController::ASC; int orderIndex = mDocumentUI->sortOrder->isChecked() ? UBDocumentController::DESC : UBDocumentController::ASC;
sortDocuments(index, orderIndex); sortDocuments(index, orderIndex);
UBSettings::settings()->documentSortKind->setInt(index);
} }
QWidget* UBDocumentController::controlView() QWidget* UBDocumentController::controlView()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment