reorder automatically renamed documents

preferencesAboutTextFull
Clément Fauconnier 5 years ago
parent 8ddcb6e17e
commit 4dfdbe9b72
  1. 9
      src/document/UBDocumentController.cpp
  2. 2
      src/document/UBDocumentController.h
  3. 2
      src/document/UBSortFilterProxyModel.cpp

@ -1592,6 +1592,7 @@ void UBDocumentTreeItemDelegate::commitAndCloseEditor()
if (lineEditor) {
emit commitData(lineEditor);
//emit closeEditor(lineEditor);
emit UBApplication::documentController->reorderDocumentsRequested();
}
}
@ -1680,6 +1681,7 @@ UBDocumentController::UBDocumentController(UBMainWindow* mainWindow)
setupToolbar();
connect(this, SIGNAL(exportDone()), mMainWindow, SLOT(onExportDone()));
connect(this, SIGNAL(documentThumbnailsUpdated(UBDocumentContainer*)), this, SLOT(refreshDocumentThumbnailsView(UBDocumentContainer*)));
connect(this, SIGNAL(reorderDocumentsRequested()), this, SLOT(reorderDocuments()));
}
UBDocumentController::~UBDocumentController()
@ -2070,6 +2072,13 @@ void UBDocumentController::refreshDateColumns()
}
}
void UBDocumentController::reorderDocuments()
{
int kindIndex = mDocumentUI->sortKind->currentIndex();
int orderIndex = mDocumentUI->sortOrder->isChecked() ? UBDocumentController::DESC : UBDocumentController::ASC;
sortDocuments(kindIndex, orderIndex);
}
void UBDocumentController::sortDocuments(int kind, int order)
{

@ -426,10 +426,12 @@ class UBDocumentController : public UBDocumentContainer
signals:
void exportDone();
void reorderDocumentsRequested();
public slots:
void createNewDocument();
void refreshDateColumns();
void reorderDocuments();
//issue 1629 - NNE - 20131105
void createNewDocumentInUntitledFolder();

@ -4,7 +4,7 @@
UBSortFilterProxyModel::UBSortFilterProxyModel():
QSortFilterProxyModel()
{
setDynamicSortFilter(true);
setDynamicSortFilter(false);
setSortCaseSensitivity(Qt::CaseInsensitive);
}

Loading…
Cancel
Save