Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLMC
Commits
07c343c1
Commit
07c343c1
authored
Jan 15, 2010
by
Christophe Courtaut
Browse files
Now collapse all but last selected path in import.
parent
7d775ce0
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Gui/import/ImportController.cpp
View file @
07c343c1
...
...
@@ -271,6 +271,7 @@ ImportController::reject()
m_preview
->
stop
();
m_mediaListController
->
cleanAll
();
Library
::
getInstance
()
->
deleteTemporaryMedias
();
collapseAllButCurrentPath
();
done
(
Rejected
);
}
...
...
@@ -280,9 +281,24 @@ ImportController::accept()
m_mediaListController
->
cleanAll
();
Library
::
getInstance
()
->
importDone
();
m_preview
->
stop
();
collapseAllButCurrentPath
();
done
(
Accepted
);
}
void
ImportController
::
collapseAllButCurrentPath
()
{
m_ui
->
treeView
->
collapseAll
();
QStringList
paths
;
for
(
QDir
directory
(
m_currentlyWatchedDir
);
!
directory
.
isRoot
();
directory
.
cdUp
()
)
paths
.
prepend
(
directory
.
absolutePath
()
);
while
(
paths
.
count
()
>
0
)
{
m_ui
->
treeView
->
setCurrentIndex
(
m_filesModel
->
index
(
paths
.
takeFirst
()
)
);
m_ui
->
treeView
->
setExpanded
(
m_ui
->
treeView
->
currentIndex
()
,
true
);
}
}
void
ImportController
::
mediaDeletion
(
const
QUuid
&
uuid
)
{
...
...
src/Gui/import/ImportController.h
View file @
07c343c1
...
...
@@ -66,6 +66,7 @@ class ImportController : public QDialog
private:
void
saveCurrentPath
();
void
restoreCurrentPath
();
void
collapseAllButCurrentPath
();
Ui
::
ImportController
*
m_ui
;
PreviewWidget
*
m_preview
;
StackViewController
*
m_stackNav
;
...
...
Write
Preview
Supports
Markdown
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