Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
4dfdbe9b
Commit
4dfdbe9b
authored
Jul 29, 2019
by
Clément Fauconnier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reorder automatically renamed documents
parent
8ddcb6e1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
UBDocumentController.cpp
src/document/UBDocumentController.cpp
+9
-0
UBDocumentController.h
src/document/UBDocumentController.h
+2
-0
UBSortFilterProxyModel.cpp
src/document/UBSortFilterProxyModel.cpp
+1
-1
No files found.
src/document/UBDocumentController.cpp
View file @
4dfdbe9b
...
...
@@ -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
)
{
...
...
src/document/UBDocumentController.h
View file @
4dfdbe9b
...
...
@@ -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
();
...
...
src/document/UBSortFilterProxyModel.cpp
View file @
4dfdbe9b
...
...
@@ -4,7 +4,7 @@
UBSortFilterProxyModel
::
UBSortFilterProxyModel
()
:
QSortFilterProxyModel
()
{
setDynamicSortFilter
(
tru
e
);
setDynamicSortFilter
(
fals
e
);
setSortCaseSensitivity
(
Qt
::
CaseInsensitive
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment