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)
|
||||
{
|
||||
if (IsExperimenting) return;
|
||||
//Volian.Base.Library.HWndCounter.GetWindowHandlesForCurrentProcess(this.Handle, "RefreshDisplay 1");
|
||||
ActiveMode = activeMode;
|
||||
OnAdjustTableWidth(this, new StepRTBTableWidthEventArgs(true));
|
||||
//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;
|
||||
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;
|
||||
_lastReadOnly = ReadOnly;
|
||||
}
|
||||
FindAllLinks();
|
||||
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)
|
||||
{
|
||||
if (_FormatFont == null)
|
||||
@ -1575,6 +1591,8 @@ namespace Volian.Controls.Library
|
||||
#region TextAndContentsEvents
|
||||
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;
|
||||
// Was setting _IsDirty to true here, but this was getting called from
|
||||
// 'dotnetbar' when text was NOT Changed. So _IsDirty was made into
|
||||
@ -2171,7 +2189,7 @@ namespace Volian.Controls.Library
|
||||
return;
|
||||
}
|
||||
// if inserting anything other than equation, be sure that an equation is not in the buffer:
|
||||
else if (hasEquation && (MyItemInfo == null || (MyItemInfo != null && !MyItemInfo.IsRtfRaw && !MyItemInfo.FormatStepData.Type.ToUpper().Contains("EQUATION"))))
|
||||
else if (hasEquation && (MyItemInfo==null || (MyItemInfo != null && !MyItemInfo.IsRtfRaw && !MyItemInfo.FormatStepData.Type.ToUpper().Contains("EQUATION"))))
|
||||
{
|
||||
MessageBox.Show("Cannot paste equation data into an non-equation step type.", "Invalid data", MessageBoxButtons.OK);
|
||||
//richTextBox1.Dispose();
|
||||
|
Loading…
x
Reference in New Issue
Block a user