fix the rename process by set focus to playlist

This commit is contained in:
tramhao 2021-02-01 14:23:06 +08:00
parent 59cecbaf23
commit 6fee79eb52
2 changed files with 6 additions and 2 deletions

View File

@ -119,8 +119,10 @@ func (g *Gomu) setFocusPanel(panel Panel) {
if g.prevPanel == nil {
return
}
g.setUnfocusPanel(g.prevPanel)
if g.prevPanel != panel {
g.setUnfocusPanel(g.prevPanel)
}
}
// Safely write the IsSuspend state, IsSuspend is used to indicate if we

View File

@ -510,6 +510,8 @@ func renamePopup(node *AudioFile) {
gomu.pages.RemovePage(popupId)
gomu.popups.pop()
gomu.playlist.refresh()
gomu.setFocusPanel(gomu.playlist)
gomu.prevPanel = gomu.playlist
case tcell.KeyEsc:
gomu.pages.RemovePage(popupId)