Skip to content

Commit

Permalink
Merge branch 'release/9.1' into LT-18682
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeOliver28 authored Oct 1, 2024
2 parents 6776733 + ba50e63 commit f9824fb
Show file tree
Hide file tree
Showing 10 changed files with 625 additions and 177 deletions.
11 changes: 8 additions & 3 deletions Src/LexText/LexTextControls/PatternView.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
Expand Down Expand Up @@ -134,11 +134,16 @@ protected override void OnKeyDown(KeyEventArgs e)
/// <param name="e"></param>
protected override void OnKeyPress(KeyPressEventArgs e)
{
if (e.KeyChar == (char) Keys.Back)
e.Handled = true;
if (e.KeyChar == (char)Keys.Back || e.KeyChar == (char)Keys.Delete)
{
if (RemoveItemsRequested != null)
RemoveItemsRequested(this, new RemoveItemsRequestedEventArgs(false));
e.Handled = true;
}
else
{
// Ignore all other characters (fixes LT-21888).
return;
}
base.OnKeyPress(e);
}
Expand Down
2 changes: 1 addition & 1 deletion Src/LexText/Morphology/AffixRuleFormulaControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ private bool DisplayVariableOption(object option)
private bool DisplayColumnOption(object option)
{
SelectionHelper sel = SelectionHelper.Create(m_view);
if (sel.IsRange)
if (sel == null || sel.IsRange)
return false;

int cellId = GetCell(sel);
Expand Down
8 changes: 7 additions & 1 deletion Src/LexText/Morphology/RuleFormulaControl.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015 SIL International
// Copyright (c) 2015 SIL International
// This software is licensed under the LGPL, version 2.1 or later
// (http://www.gnu.org/licenses/lgpl-2.1.html)

Expand Down Expand Up @@ -569,6 +569,12 @@ private void m_insertionControl_Insert(object sender, InsertEventArgs e)
var redo = string.Format(MEStrings.ksRuleRedoInsert, option);

SelectionHelper sel = SelectionHelper.Create(m_view);
if (sel == null)
{
// The selection can become invalid because of an undo (see LT-20588).
m_insertionControl.UpdateOptionsDisplay();
return;
}
int cellId = -1;
int cellIndex = -1;
switch (option.Type)
Expand Down
9 changes: 7 additions & 2 deletions Src/LexText/ParserCore/HCLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,11 @@ private void LoadLanguage()
RewriteRule hcRegRule = LoadRewriteRule(regRule);
if (hcRegRule == null)
continue;
m_morphophonemic.PhonologicalRules.Add(hcRegRule);
// Choose which stratum the phonological rules apply on.
if (!m_notOnClitics)
m_clitic.PhonologicalRules.Add(hcRegRule);
else
m_morphophonemic.PhonologicalRules.Add(hcRegRule);
m_language.PhonologicalRules.Add(hcRegRule);
}
break;
Expand All @@ -250,9 +252,12 @@ private void LoadLanguage()
if (metaRule.LeftSwitchIndex != -1 && metaRule.RightSwitchIndex != -1)
{
MetathesisRule hcMetaRule = LoadMetathesisRule(metaRule);
m_morphophonemic.PhonologicalRules.Add(hcMetaRule);

// Choose which stratum the phonological rules apply on.
if (!m_notOnClitics)
m_clitic.PhonologicalRules.Add(hcMetaRule);
else
m_morphophonemic.PhonologicalRules.Add(hcMetaRule);
m_language.PhonologicalRules.Add(hcMetaRule);
}
break;
Expand Down
2 changes: 1 addition & 1 deletion Src/MasterVersionInfo.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FWMAJOR=9
FWMINOR=2
FWREVISION=3
FWREVISION=4
FWBETAVERSION=Alpha
4 changes: 2 additions & 2 deletions Src/xWorks/CssGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1262,12 +1262,12 @@ internal static List<StyleDeclaration> GenerateCssStyleFromLcmStyleSheet(string
string customBullet = exportStyleInfo.BulletInfo.m_bulletCustom;
declaration.Add(new Property("content") { Term = new PrimitiveTerm(UnitType.String, customBullet) });
}
else if (BulletSymbolsCollection.ContainsKey(exportStyleInfo.NumberScheme.ToString()))
else if (BulletSymbolsCollection.ContainsKey(numScheme))
{
string selectedBullet = BulletSymbolsCollection[numScheme];
declaration.Add(new Property("content") { Term = new PrimitiveTerm(UnitType.String, selectedBullet) });
}
else if (NumberingStylesCollection.ContainsKey(exportStyleInfo.NumberScheme.ToString()))
else if (NumberingStylesCollection.ContainsKey(numScheme))
{
if (node != null)
{
Expand Down
Loading

0 comments on commit f9824fb

Please sign in to comment.