- Reference lists can now also be applied to a particular favorites list as the target

e.g. copy the main program numbers from a Samsung list to the "Fav A" list of a Philips TV
- After applying the initial order, the previous first channel no longer stays selected (only the new first channel)
This commit is contained in:
Horst Beham
2021-09-07 19:32:22 +02:00
parent 4625b62f8f
commit b1964f61d9
3 changed files with 25 additions and 6 deletions

View File

@@ -171,6 +171,7 @@ namespace ChanSort.Ui
internal Editor Editor { get; private set; }
internal ChannelList CurrentChannelList { get; private set; }
internal int SubListIndex => this.subListIndex;
private GridView EditorGridView => this.miSplitView.Down ? this.gviewLeft : this.gviewRight;
@@ -690,6 +691,12 @@ namespace ChanSort.Ui
{
this.DataRoot.ApplyCurrentProgramNumbers();
this.RefreshGrid(this.gviewLeft, this.gviewRight);
// reset selection otherweise the previously focused row will still be selected as well as the new first row
this.gviewLeft.ClearSelection();
this.gviewLeft.FocusedRowHandle = 0;
this.gviewRight.ClearSelection();
this.gviewRight.FocusedRowHandle = 0;
}
this.gviewRight.FocusedRowHandle = 0;

View File

@@ -140,23 +140,30 @@ namespace ChanSort.Ui
}
}
// select target
// fill target
this.comboTarget.EditValue = null;
this.comboTarget.Properties.Items.Clear();
foreach (var list in main.DataRoot.ChannelLists)
{
if (list.Channels.Count == 0)
continue;
if (list.IsMixedSourceFavoritesList)
if (!list.IsMixedSourceFavoritesList)
this.comboTarget.Properties.Items.Add(new ListOption(list, 0, list.ShortCaption));
if (!main.DataRoot.MixedSourceFavorites || list.IsMixedSourceFavoritesList)
{
for (int i = 1; i <= main.DataRoot.FavListCount; i++)
this.comboTarget.Properties.Items.Add(new ListOption(list, i, list.ShortCaption + (i == 0 ? "" : " - " + list.GetFavListCaption(i - 1, true))));
}
else
}
// set current list/sublist from the main form as the target
foreach (ListOption option in this.comboTarget.Properties.Items)
{
if (option.ChannelList == main.CurrentChannelList && option.PosIndex == main.SubListIndex)
{
this.comboTarget.Properties.Items.Add(new ListOption(list, 0, list.ShortCaption));
if (main.CurrentChannelList == list)
this.comboTarget.SelectedIndex = this.comboTarget.Properties.Items.Count - 1;
this.comboTarget.SelectedItem = option;
break;
}
}
if (this.comboTarget.SelectedIndex < 0 && this.comboTarget.Properties.Items.Count > 0)

View File

@@ -1,6 +1,11 @@
ChanSort Change Log
===================
2021-09-07
- added turkish readme
- Reference lists can now also be applied to a particular favorites list as the target
e.g. copy the main program numbers from a Samsung list to the "Fav A" list of a Philips TV
2021-09-06
- Philips: fixes for ChannelMap_100, 105 and 110 formats
- Philips: support for FLASH/*.bin DVB-T/C and preset DVB-S lists (mgr_chan_s_pkg.db)