Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions Src/Utilities/AlloVarGen/AllomorphGeneratorDll/AlloGenFormBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1091,9 +1091,17 @@ protected virtual void lBoxOperations_SelectedIndexChanged(object sender, EventA
if (ActionOp.ReplaceOpRefs.Count == 0)
{
// need at least one replace action
Replace replace = CreateNewReplace();
AlloGens.AddReplaceOp(replace);
lBoxReplaceOps.Items.Add(replace);
if (AlloGens.ReplaceOperations.Count > 0)
{
ActionOp.ReplaceOpRefs.Add(AlloGens.ReplaceOperations.ElementAt(0).Guid);
}
else
{
Replace replace = CreateNewReplace();
AlloGens.AddReplaceOp(replace);
lBoxReplaceOps.Items.Add(replace);
}
MarkAsChanged(true);
}
StemName = ActionOp.StemName;
tbStemName.Text = StemName.Name;
Expand All @@ -1105,13 +1113,23 @@ protected virtual void lBoxOperations_SelectedIndexChanged(object sender, EventA
protected void RefreshReplaceListBox()
{
lBoxReplaceOps.Items.Clear();
List<string> brokenRefs = new List<string>();
foreach (string guid in ReplaceOpRefs)
{
Replace replace = AlloGens.FindReplaceOp(guid);
if (replace != null)
{
lBoxReplaceOps.Items.Add(replace);
}
else
{
brokenRefs.Add(guid);
}
}
foreach (string guid in brokenRefs)
{
ReplaceOpRefs.Remove(guid);
MarkAsChanged(true);
}
if (ReplaceOpRefs.Count > 0)
lBoxReplaceOps.SetSelected(0, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@
<value>8, 19</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>488, 172</value>
<value>823, 255</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Match for forms containing...</value>
Expand Down
Loading