Commit 4dfdbe9b authored by Clément Fauconnier's avatar Clément Fauconnier

reorder automatically renamed documents

parent 8ddcb6e1
......@@ -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);
}
......
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