B2017-048, B2017-052, B2017-055 ROs sometimes have two start tokens which make them uneditable.
This commit is contained in:
parent
ab7d3b4c66
commit
dc6468155f
@ -481,7 +481,6 @@ namespace Volian.Controls.Library
|
|||||||
public void RefreshDisplay(bool activeMode)
|
public void RefreshDisplay(bool activeMode)
|
||||||
{
|
{
|
||||||
if (IsExperimenting) return;
|
if (IsExperimenting) return;
|
||||||
//Volian.Base.Library.HWndCounter.GetWindowHandlesForCurrentProcess(this.Handle, "RefreshDisplay 1");
|
|
||||||
ActiveMode = activeMode;
|
ActiveMode = activeMode;
|
||||||
OnAdjustTableWidth(this, new StepRTBTableWidthEventArgs(true));
|
OnAdjustTableWidth(this, new StepRTBTableWidthEventArgs(true));
|
||||||
//Volian.Base.Library.HWndCounter.GetWindowHandlesForCurrentProcess(this.Handle, "RefreshDisplay 2");
|
//Volian.Base.Library.HWndCounter.GetWindowHandlesForCurrentProcess(this.Handle, "RefreshDisplay 2");
|
||||||
@ -1148,12 +1147,29 @@ namespace Volian.Controls.Library
|
|||||||
string indentStr = @"\fi" + match.Groups[1].Value + @"\li" + match.Groups[2].Value;
|
string indentStr = @"\fi" + match.Groups[1].Value + @"\li" + match.Groups[2].Value;
|
||||||
Rtf = Rtf.Replace(@"\pard", @"\pard" + indentStr);
|
Rtf = Rtf.Replace(@"\pard", @"\pard" + indentStr);
|
||||||
}
|
}
|
||||||
|
// B2017-048, B2017-052, B2017-055 ROs sometimes have two start tokens which make them uneditable.
|
||||||
|
newRtf = newRtf.Replace("<START]<START]", "<START]");
|
||||||
|
//Point linkIssues = FindLinkIssues(newRtf);
|
||||||
|
//if (linkIssues.X != linkIssues.Y)
|
||||||
|
// newRtf = FixBadLinks(newRtf,linkIssues);
|
||||||
SelectedRtf = _LastRtf = newRtf;
|
SelectedRtf = _LastRtf = newRtf;
|
||||||
_lastReadOnly = ReadOnly;
|
_lastReadOnly = ReadOnly;
|
||||||
}
|
}
|
||||||
FindAllLinks();
|
FindAllLinks();
|
||||||
if (txt == "") SelectionFont = FormatFont;
|
if (txt == "") SelectionFont = FormatFont;
|
||||||
}
|
}
|
||||||
|
//private string FixBadLinks(string newRtf, Point linkIssues)
|
||||||
|
//{
|
||||||
|
// Console.WriteLine("Bad Link rtf = Starts={0}, Ends={1}, \"{2}\"", linkIssues.X,linkIssues.Y, newRtf);
|
||||||
|
// //Volian.Base.Library.vlnStackTrace.ShowStack();
|
||||||
|
// return newRtf;
|
||||||
|
//}
|
||||||
|
//private static Point FindLinkIssues(string rtf)
|
||||||
|
//{
|
||||||
|
// MatchCollection mcStart = Regex.Matches(rtf, @"\<START\]");
|
||||||
|
// MatchCollection mcEnd = Regex.Matches(rtf, @"\[END\>");
|
||||||
|
// return new Point(mcStart.Count, mcEnd.Count);
|
||||||
|
//}
|
||||||
public void SetTableGridCellRTFPrefix(Font myfont)
|
public void SetTableGridCellRTFPrefix(Font myfont)
|
||||||
{
|
{
|
||||||
if (_FormatFont == null)
|
if (_FormatFont == null)
|
||||||
@ -1575,6 +1591,8 @@ namespace Volian.Controls.Library
|
|||||||
#region TextAndContentsEvents
|
#region TextAndContentsEvents
|
||||||
void StepRTB_TextChanged(object sender, EventArgs e)
|
void StepRTB_TextChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
//if (Rtf.Contains("<START]<START]"))
|
||||||
|
// Volian.Base.Library.vlnStackTrace.ShowStackLocal(2, 10, "Start Start ItemID={0}", MyItemInfo.ItemID);
|
||||||
if (_InitializingRTB || _IsExperimenting) return;
|
if (_InitializingRTB || _IsExperimenting) return;
|
||||||
// Was setting _IsDirty to true here, but this was getting called from
|
// Was setting _IsDirty to true here, but this was getting called from
|
||||||
// 'dotnetbar' when text was NOT Changed. So _IsDirty was made into
|
// 'dotnetbar' when text was NOT Changed. So _IsDirty was made into
|
||||||
|
Loading…
x
Reference in New Issue
Block a user