Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
2c2eef52
Commit
2c2eef52
authored
Nov 17, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: correctly display the right treeView columns
Close #2082
parent
cd62d6f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
19 deletions
+24
-19
modules/gui/qt4/components/playlist/standardpanel.cpp
modules/gui/qt4/components/playlist/standardpanel.cpp
+24
-19
No files found.
modules/gui/qt4/components/playlist/standardpanel.cpp
View file @
2c2eef52
...
...
@@ -306,25 +306,6 @@ void StandardPLPanel::createTreeView()
/* setModel after setSortingEnabled(true), or the model will sort immediately! */
getSettings
()
->
beginGroup
(
"Playlist"
);
if
(
getSettings
()
->
contains
(
"headerStateV2"
)
)
{
treeView
->
header
()
->
restoreState
(
getSettings
()
->
value
(
"headerStateV2"
).
toByteArray
()
);
}
else
{
for
(
int
m
=
1
,
c
=
0
;
m
!=
COLUMN_END
;
m
<<=
1
,
c
++
)
{
treeView
->
setColumnHidden
(
c
,
!
(
m
&
COLUMN_DEFAULT
)
);
if
(
m
==
COLUMN_TITLE
)
treeView
->
header
()
->
resizeSection
(
c
,
200
);
else
if
(
m
==
COLUMN_DURATION
)
treeView
->
header
()
->
resizeSection
(
c
,
80
);
}
}
getSettings
()
->
endGroup
();
/* Connections for the TreeView */
CONNECT
(
treeView
,
activated
(
const
QModelIndex
&
),
this
,
activate
(
const
QModelIndex
&
)
);
...
...
@@ -361,6 +342,7 @@ void StandardPLPanel::changeModel( bool b_ml )
void
StandardPLPanel
::
showView
(
int
i_view
)
{
bool
b_treeViewCreated
=
false
;
switch
(
i_view
)
{
...
...
@@ -389,7 +371,10 @@ void StandardPLPanel::showView( int i_view )
case
TREE_VIEW
:
{
if
(
treeView
==
NULL
)
{
createTreeView
();
b_treeViewCreated
=
true
;
}
currentView
=
treeView
;
break
;
}
...
...
@@ -397,6 +382,26 @@ void StandardPLPanel::showView( int i_view )
changeModel
(
false
);
/* Restoring the header Columns must come after changeModel */
if
(
b_treeViewCreated
)
{
assert
(
treeView
);
if
(
getSettings
()
->
contains
(
"Playlist/headerStateV2"
)
)
{
treeView
->
header
()
->
restoreState
(
getSettings
()
->
value
(
"Playlist/headerStateV2"
).
toByteArray
()
);
}
else
{
for
(
int
m
=
1
,
c
=
0
;
m
!=
COLUMN_END
;
m
<<=
1
,
c
++
)
{
treeView
->
setColumnHidden
(
c
,
!
(
m
&
COLUMN_DEFAULT
)
);
if
(
m
==
COLUMN_TITLE
)
treeView
->
header
()
->
resizeSection
(
c
,
200
);
else
if
(
m
==
COLUMN_DURATION
)
treeView
->
header
()
->
resizeSection
(
c
,
80
);
}
}
}
viewStack
->
setCurrentWidget
(
currentView
);
browseInto
();
gotoPlayingItem
();
...
...
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