Remember selected position for each folder/tab (#859)
* Remember Last Tab Position * Remember Last Tab Position * Remember Last Tab Position * Remember Last Tab Position * Remember Last Tab Position
This commit is contained in:
1 parent
80274d1a04
commit
6deb5acbc8
4 files changed
+64
-16
No files matched your search
@@ -299,9 +299,16 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
public void LeaveSelectedCategory()
|
||||
{
|
||||
// Stefan1200: This was implemented with the pull request #359 and is the reason for the bug described in issue #390.
|
||||
// Currently disabled until we know if this is still needed or we find a better solution!
|
||||
// _LeaveCategory();
|
||||
if (!CBase.Songs.IsInCategory())
|
||||
return;
|
||||
|
||||
int oldCategory = CBase.Songs.GetCurrentCategoryIndex();
|
||||
_LeaveCategory();
|
||||
|
||||
if (oldCategory >= 0 && oldCategory < CBase.Songs.GetNumCategories())
|
||||
SetSelectedCategory(oldCategory);
|
||||
else if (CBase.Songs.GetNumCategories() > 0)
|
||||
SetSelectedCategory(0);
|
||||
}
|
||||
|
||||
public virtual void UnloadSkin() {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#region license
|
||||
#region license
|
||||
// This file is part of Vocaluxe.
|
||||
//
|
||||
// Vocaluxe is free software: you can redistribute it and/or modify
|
||||
@@ -358,7 +358,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
case Keys.Back:
|
||||
if (CBase.Songs.IsInCategory() && catChangePossible)
|
||||
{
|
||||
_LeaveCategory();
|
||||
LeaveSelectedCategory();
|
||||
keyEvent.Handled = true;
|
||||
}
|
||||
break;
|
||||
@@ -510,7 +510,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
if (CBase.Songs.IsInCategory() && CBase.Songs.GetNumCategories() > 0 && CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON &&
|
||||
songOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
_LeaveCategory();
|
||||
LeaveSelectedCategory();
|
||||
return true;
|
||||
}
|
||||
if (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF && !songOptions.Selection.PartyMode)
|
||||
@@ -611,8 +611,6 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
protected override void _LeaveCategory()
|
||||
{
|
||||
base._LeaveCategory();
|
||||
|
||||
SetSelectedCategory(0);
|
||||
_UpdateListIfRequired();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#region license
|
||||
#region license
|
||||
// This file is part of Vocaluxe.
|
||||
//
|
||||
// Vocaluxe is free software: you can redistribute it and/or modify
|
||||
@@ -349,7 +349,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
case Keys.Back:
|
||||
if (CBase.Songs.IsInCategory() && catChangePossible)
|
||||
{
|
||||
_LeaveCategory();
|
||||
LeaveSelectedCategory();
|
||||
keyEvent.Handled = true;
|
||||
}
|
||||
break;
|
||||
@@ -499,7 +499,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
if (CBase.Songs.IsInCategory() && CBase.Songs.GetNumCategories() > 0 && CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON &&
|
||||
songOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
_LeaveCategory();
|
||||
LeaveSelectedCategory();
|
||||
return true;
|
||||
}
|
||||
if (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF && !songOptions.Selection.PartyMode)
|
||||
@@ -576,8 +576,6 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
protected override void _LeaveCategory()
|
||||
{
|
||||
base._LeaveCategory();
|
||||
|
||||
SetSelectedCategory(0);
|
||||
_UpdateListIfRequired();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user