Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
b2b38e5e
Commit
b2b38e5e
authored
Jan 26, 2010
by
Jakob Leben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt PL Model: don't emit currentChanged twice
parent
382b629a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.cpp
+3
-7
No files found.
modules/gui/qt4/components/playlist/playlist_model.cpp
View file @
b2b38e5e
...
...
@@ -655,16 +655,10 @@ void PLModel::rebuild( playlist_item_t *p_root, bool b_first )
assert
(
rootItem
);
/* Recreate from root */
updateChildren
(
rootItem
);
if
(
(
p_item
=
playlist_CurrentPlayingItem
(
p_playlist
))
)
currentItem
=
findByInput
(
rootItem
,
p_item
->
p_input
->
i_id
);
else
currentItem
=
NULL
;
PL_UNLOCK
;
/* And signal the view */
reset
();
emit
currentChanged
(
index
(
currentItem
,
0
)
);
}
void
PLModel
::
takeItem
(
PLItem
*
item
)
...
...
@@ -724,7 +718,10 @@ void PLModel::removeItem( PLItem *item )
void
PLModel
::
updateChildren
(
PLItem
*
root
)
{
playlist_item_t
*
p_node
=
playlist_ItemGetById
(
p_playlist
,
root
->
i_id
);
PLItem
*
oldCurrent
=
currentItem
;
updateChildren
(
p_node
,
root
);
if
(
currentItem
!=
oldCurrent
);
emit
currentChanged
(
index
(
currentItem
,
0
)
);
}
/* This function must be entered WITH the playlist lock */
...
...
@@ -739,7 +736,6 @@ void PLModel::updateChildren( playlist_item_t *p_node, PLItem *root )
if
(
p_item
&&
newItem
->
p_input
==
p_item
->
p_input
)
{
currentItem
=
newItem
;
emit
currentChanged
(
index
(
currentItem
,
0
)
);
}
if
(
p_node
->
pp_children
[
i
]
->
i_children
!=
-
1
)
updateChildren
(
p_node
->
pp_children
[
i
],
newItem
);
...
...
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