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
38fe327e
Commit
38fe327e
authored
Nov 19, 2018
by
Clément Fauconnier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed the focus behavior after deletion
parent
5ed13efe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
16 deletions
+4
-16
UBDocumentController.cpp
src/document/UBDocumentController.cpp
+4
-16
No files found.
src/document/UBDocumentController.cpp
View file @
38fe327e
...
...
@@ -1298,7 +1298,6 @@ void UBDocumentTreeView::setSelectedAndExpanded(const QModelIndex &pIndex, bool
selectionModel
()
->
select
(
proxy
->
mapFromSource
(
indexCurrentDoc
),
QItemSelectionModel
::
Rows
|
sel
);
while
(
indexCurrentDoc
.
parent
().
isValid
())
{
setExpanded
(
indexCurrentDoc
.
parent
(),
pExpand
);
indexCurrentDoc
=
indexCurrentDoc
.
parent
();
...
...
@@ -1680,7 +1679,7 @@ void UBDocumentController::selectDocument(UBDocumentProxy* proxy, bool setAsCurr
if
(
proxy
!=
mBoardController
->
selectedDocument
())
// only if wanted Document is different from document actually on Board, // ALTI/AOU - 20140217
{
//issue 1629 - NNE - 20131105 : When set a current document, change in the board controller
mBoardController
->
setActiveDocumentScene
(
proxy
,
0
,
fals
e
,
onImport
);
mBoardController
->
setActiveDocumentScene
(
proxy
,
0
,
tru
e
,
onImport
);
}
}
...
...
@@ -2278,7 +2277,6 @@ void UBDocumentController::deleteMultipleItems(QModelIndexList indexes, UBDocume
break
;
}
}
updateActions
();
}
void
UBDocumentController
::
deleteSingleItem
(
QModelIndex
currentIndex
,
UBDocumentTreeModel
*
docModel
)
...
...
@@ -2341,7 +2339,6 @@ void UBDocumentController::deleteSingleItem(QModelIndex currentIndex, UBDocument
break
;
}
}
updateActions
();
}
//N/C - NNE - 20140410
...
...
@@ -2377,12 +2374,7 @@ void UBDocumentController::moveIndexesToTrash(const QModelIndexList &list, UBDoc
if
(
proxy
)
{
setDocument
(
proxy
);
UBApplication
::
boardController
->
setActiveDocumentScene
(
proxy
,
0
,
true
);
docModel
->
setCurrentDocument
(
proxy
);
selectionModel
->
select
(
sibling
,
QItemSelectionModel
::
ClearAndSelect
);
selectDocument
(
proxy
,
true
);
deleteCurrentScene
=
false
;
}
...
...
@@ -2396,11 +2388,7 @@ void UBDocumentController::moveIndexesToTrash(const QModelIndexList &list, UBDoc
if
(
proxy
)
{
setDocument
(
proxy
);
UBApplication
::
boardController
->
setActiveDocumentScene
(
proxy
,
0
,
true
);
docModel
->
setCurrentDocument
(
proxy
);
selectionModel
->
select
(
sibling
,
QItemSelectionModel
::
ClearAndSelect
);
selectDocument
(
proxy
,
true
);
deleteCurrentScene
=
false
;
}
...
...
@@ -2410,7 +2398,7 @@ void UBDocumentController::moveIndexesToTrash(const QModelIndexList &list, UBDoc
else
{
UBDocumentProxy
*
proxy
=
docModel
->
proxyForIndex
(
currentScene
);
se
tDocument
(
proxy
);
se
lectDocument
(
proxy
,
true
);
}
docModel
->
moveIndexes
(
list
,
docModel
->
trashIndex
());
...
...
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