Skip to content

Commit

Permalink
if the map isn't reversable, then don't have a fit about not doing th…
Browse files Browse the repository at this point in the history
…e reverse conversion in the TECkit map editor
  • Loading branch information
bobeaton committed Dec 1, 2024
1 parent 9c7bffd commit 9c0c539
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ApplicationName>SILConverters</ApplicationName>
<SafeApplicationName>SILConverters</SafeApplicationName>
<TruncatedVersion>5.3</TruncatedVersion>
<VersionNumber>5.3.0.0</VersionNumber>
<VersionNumber>5.3.1.0</VersionNumber>
<UpgradeCode>8A50226C-84D0-4CAF-AF8F-B0284643C415</UpgradeCode>
<Year>2024</Year>
<Manufacturer>SIL International</Manufacturer>
Expand Down
29 changes: 17 additions & 12 deletions src/TECkit Mapping Editor/TECkit Mapping Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -671,22 +671,27 @@ private void textBoxSample_TextChanged(object sender, EventArgs e)

private void textBoxSampleForward_TextChanged(object sender, EventArgs e)
{
UpdateTextChanged(this.textBoxSampleForward, this.textBoxSampleReverse, m_aEC, false);
if (!m_bSampleChangedByTyping)
UpdateUnicodeDetails(this.textBoxSampleForward);
m_bSampleChangedByTyping = false;

string strTooltip = null;
if (textBoxSample.Text == textBoxSampleReverse.Text)
if (!EncConverters.IsUnidirectional(m_aEC.ConversionType))
{
this.labelRoundtrip.Text = cstrRoundTripDefaultLabel;
strTooltip = "Round-trip value matches!";
UpdateTextChanged(this.textBoxSampleForward, this.textBoxSampleReverse, m_aEC, false);
if (!m_bSampleChangedByTyping)
UpdateUnicodeDetails(this.textBoxSampleForward);
m_bSampleChangedByTyping = false;

if (textBoxSample.Text == textBoxSampleReverse.Text)
{
this.labelRoundtrip.Text = cstrRoundTripDefaultLabel;
strTooltip = "Round-trip value matches!";
}
else
{
labelRoundtrip.Text = "*** " + cstrRoundTripDefaultLabel;
strTooltip = "Round-trip value doesn't match!";
}
}
else
{
labelRoundtrip.Text = "*** " + cstrRoundTripDefaultLabel;
strTooltip = "Round-trip value doesn't match!";
}
strTooltip = "Map doesn't round-trip.";

strTooltip += String.Format("{0}{0}Left-side:\t{1}{0}Right-side:\t{2}{0}Roundtrip:\t{3}",
Environment.NewLine,
Expand Down

0 comments on commit 9c0c539

Please sign in to comment.