OSDN Git Service
(root)
/
timidity41
/
timidity41.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
90e9f28
)
Fix w32g_uniq_playlist() to correctly update playlist_ctrl->selected
author
Starg
<starg@users.osdn.me>
Mon, 28 Dec 2020 00:45:17 +0000
(09:45 +0900)
committer
Starg
<starg@users.osdn.me>
Mon, 28 Dec 2020 00:45:17 +0000
(09:45 +0900)
interface/w32g_playlist.c
patch
|
blob
|
history
diff --git
a/interface/w32g_playlist.c
b/interface/w32g_playlist.c
index
2fd39d1
..
cf86788
100644
(file)
--- a/
interface/w32g_playlist.c
+++ b/
interface/w32g_playlist.c
@@
-1021,6
+1021,7
@@
int w32g_uniq_playlist(int *is_selected_removed)
for (i = 0; i < n - 1; i++)
{
int save_n;
+ int n_sel_advance = 0;
/* remove list[i] from list[i+1 .. n-1] */
j1 = j2 = i + 1;
@@
-1043,10
+1044,10
@@
int w32g_uniq_playlist(int *is_selected_removed)
!*is_selected_removed)
{
*is_selected_removed = 1;
-
playlist_ctrl->selected = j1
;
- }
+
n_sel_advance++
;
+
}
if (j2 < playlist_ctrl->selected)
-
playlist_ctrl->selected--
;
+
n_sel_advance++
;
if (j2 < cursel)
cursel--;
}
@@
-1057,6
+1058,7
@@
int w32g_uniq_playlist(int *is_selected_removed)
}
j2++;
}
+ playlist_ctrl->selected -= n_sel_advance;
}
if (nremoved)
{