This commit is contained in:
parent
ca50815d38
commit
1d6fb249c7
@ -386,26 +386,28 @@ namespace DataLoader
|
||||
}
|
||||
ds.Dispose();
|
||||
da.Dispose();
|
||||
// now read in the HLS's and set their config to the appropriate foldout:
|
||||
int cnt = 1;
|
||||
foreach (int hlsItemId in FloatingFoldoutHLS)
|
||||
// now read in the HLS's and set their config to the appropriate foldout.
|
||||
// stpFoldSeq contains 16 bit step to foldout associations, i.e. an integer step
|
||||
// number (ordinal) and string sequence of foldout.
|
||||
// FloatingFoldoutHLS contains each 16bit ordinal step number (all steps, whether
|
||||
// they have a foldout or not) and the associated itemid in 32bit
|
||||
// FoldoutStpSeq contains all foldouts, i.e. the string representing the sequence
|
||||
// number if 16bit and the resulting 32bit itemid.
|
||||
foreach (KeyValuePair<int, string> kvp in stpFoldSeq)
|
||||
{
|
||||
int hlsItemId = FloatingFoldoutHLS[kvp.Key-1]; // -1 for indexes starting at 0 (not 1)
|
||||
using (Item itmF = Item.Get(hlsItemId))
|
||||
{
|
||||
// be sure that the dictionaries contain the key.
|
||||
// Some data may be 'corrupt' and not have the appropriate linkages
|
||||
// to floating foldouts.
|
||||
if (stpFoldSeq.ContainsKey(cnt))
|
||||
if (FoldoutStpSeq.ContainsKey(kvp.Value))
|
||||
{
|
||||
string fldstr = stpFoldSeq[cnt];
|
||||
if (FoldoutStpSeq.ContainsKey(fldstr))
|
||||
{
|
||||
int fldItemId = FoldoutStpSeq[fldstr];
|
||||
ConfigInfo ciFold = new ConfigInfo(itmF.MyContent.Config);
|
||||
ciFold.AddItem("Step", "FloatingFoldout", fldItemId.ToString());
|
||||
itmF.MyContent.Config = ciFold.ToString();
|
||||
itmF.Save();
|
||||
}
|
||||
int fldItemId = FoldoutStpSeq[kvp.Value];
|
||||
ConfigInfo ciFold = new ConfigInfo(itmF.MyContent.Config);
|
||||
ciFold.AddItem("Step", "FloatingFoldout", fldItemId.ToString());
|
||||
itmF.MyContent.Config = ciFold.ToString();
|
||||
itmF.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user