Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
a57ca1b3
Commit
a57ca1b3
authored
Jan 17, 2005
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cache last FindItem request to speed up bulk-addings
parent
c3f5011d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
modules/gui/wxwindows/playlist.cpp
modules/gui/wxwindows/playlist.cpp
+13
-2
modules/gui/wxwindows/wxwindows.h
modules/gui/wxwindows/wxwindows.h
+4
-0
No files found.
modules/gui/wxwindows/playlist.cpp
View file @
a57ca1b3
...
...
@@ -377,6 +377,8 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
return
;
}
p_saved_item
=
NULL
;
/* Update the playlist */
Rebuild
();
...
...
@@ -655,7 +657,7 @@ void Playlist::RemoveItem( int i )
/**********************************************************************
* Search functions (internal
* Search functions (internal
)
**********************************************************************/
/* Find a wxItem from a playlist_item */
...
...
@@ -667,6 +669,11 @@ wxTreeItemId Playlist::FindItem( wxTreeItemId root, playlist_item_t *p_item )
wxTreeItemId
item
=
treectrl
->
GetFirstChild
(
root
,
cookie
);
wxTreeItemId
child
;
if
(
p_item
==
p_saved_item
&&
saved_tree_item
.
IsOk
()
)
{
return
saved_tree_item
;
}
p_wxcurrent
=
(
PlaylistItem
*
)
treectrl
->
GetItemData
(
root
);
if
(
!
p_item
)
...
...
@@ -685,6 +692,8 @@ wxTreeItemId Playlist::FindItem( wxTreeItemId root, playlist_item_t *p_item )
p_wxcurrent
=
(
PlaylistItem
*
)
treectrl
->
GetItemData
(
item
);
if
(
p_wxcurrent
->
p_item
==
p_item
)
{
saved_tree_item
=
item
;
p_saved_item
=
p_item
;
return
item
;
}
if
(
treectrl
->
ItemHasChildren
(
item
)
)
...
...
@@ -692,6 +701,8 @@ wxTreeItemId Playlist::FindItem( wxTreeItemId root, playlist_item_t *p_item )
wxTreeItemId
search
=
FindItem
(
item
,
p_item
);
if
(
search
.
IsOk
()
)
{
saved_tree_item
=
search
;
p_saved_item
=
p_item
;
return
search
;
}
}
...
...
modules/gui/wxwindows/wxwindows.h
View file @
a57ca1b3
...
...
@@ -883,6 +883,10 @@ private:
wxTreeItemId
FindItemByName
(
wxTreeItemId
,
wxString
,
wxTreeItemId
,
vlc_bool_t
*
);
wxTreeItemId
saved_tree_item
;
playlist_item_t
*
p_saved_item
;
/* Custom events */
void
OnPlaylistEvent
(
wxCommandEvent
&
event
);
...
...
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