save SortOrder and SortKind changes

preferencesAboutTextFull
Clément Fauconnier 6 years ago
parent 17d8d0957c
commit a69d1b39f1
  1. 4
      src/document/UBDocumentController.cpp

@ -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)
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()

Loading…
Cancel
Save