Fixed problem where symbols were not showing properly.
This commit is contained in:
parent
3e135d8deb
commit
f2ba882506
@ -228,12 +228,11 @@ namespace Volian.Controls.Library
|
|||||||
//Console.WriteLine("'font',{0}", Font);
|
//Console.WriteLine("'font',{0}", Font);
|
||||||
//if(Text == "")SelectionFont = Font; // Initialize SelectionFont
|
//if(Text == "")SelectionFont = Font; // Initialize SelectionFont
|
||||||
RTBAPI.SetLineSpacing(this, RTBAPI.ParaSpacing.PFS_EXACT);
|
RTBAPI.SetLineSpacing(this, RTBAPI.ParaSpacing.PFS_EXACT);
|
||||||
|
ReadOnly = EpMode == E_EditPrintMode.Print || VwMode == E_ViewMode.View || edit == false;
|
||||||
AddRtfText(vlntxt.StartText);
|
AddRtfText(vlntxt.StartText);
|
||||||
//AddRtfStyles();
|
//AddRtfStyles();
|
||||||
// set readonly based on initial modes, however, these may change if
|
// set readonly based on initial modes, however, these may change if
|
||||||
// user selected view mode.
|
// user selected view mode.
|
||||||
ReadOnly = !(EpMode == E_EditPrintMode.Edit && VwMode == E_ViewMode.Edit);
|
|
||||||
if (!ReadOnly && !edit) ReadOnly = true;
|
|
||||||
ClearUndo();
|
ClearUndo();
|
||||||
// RHM: 20101122 - Not sure why the RightMargin is set. The following line was added in Rev 23
|
// RHM: 20101122 - Not sure why the RightMargin is set. The following line was added in Rev 23
|
||||||
// in May of 2008.
|
// in May of 2008.
|
||||||
@ -715,6 +714,7 @@ namespace Volian.Controls.Library
|
|||||||
#endregion
|
#endregion
|
||||||
#region AddRtfTextAndStyles
|
#region AddRtfTextAndStyles
|
||||||
private string _LastRtf = "";
|
private string _LastRtf = "";
|
||||||
|
private bool _lastReadOnly = false;
|
||||||
private void AddRtfText(string txt)
|
private void AddRtfText(string txt)
|
||||||
{
|
{
|
||||||
//Console.WriteLine("ItemID:{0}", MyItemInfo.ItemID);
|
//Console.WriteLine("ItemID:{0}", MyItemInfo.ItemID);
|
||||||
@ -725,13 +725,14 @@ namespace Volian.Controls.Library
|
|||||||
_RtfPrefix = selectedRtfSB.ToString();
|
_RtfPrefix = selectedRtfSB.ToString();
|
||||||
selectedRtfSB.Append(txt);
|
selectedRtfSB.Append(txt);
|
||||||
string newRtf = selectedRtfSB.ToString() + "}";
|
string newRtf = selectedRtfSB.ToString() + "}";
|
||||||
if(newRtf != _LastRtf)
|
if(newRtf != _LastRtf || ReadOnly != _lastReadOnly)
|
||||||
{
|
{
|
||||||
//Console.WriteLine("ItemID:{0}\r\nOld:'{1}'\r\nNew:'{2}'\r\n", MyItemInfo.ItemID, Rtf, newRtf);
|
//Console.WriteLine("ItemID:{0}\r\nOld:'{1}'\r\nNew:'{2}'\r\n", MyItemInfo.ItemID, Rtf, newRtf);
|
||||||
this.ContentsResized -=new ContentsResizedEventHandler(StepRTB_ContentsResized);
|
this.ContentsResized -=new ContentsResizedEventHandler(StepRTB_ContentsResized);
|
||||||
Text = "";
|
Text = "";
|
||||||
this.ContentsResized += new ContentsResizedEventHandler(StepRTB_ContentsResized);
|
this.ContentsResized += new ContentsResizedEventHandler(StepRTB_ContentsResized);
|
||||||
SelectedRtf = _LastRtf = newRtf;
|
SelectedRtf = _LastRtf = newRtf;
|
||||||
|
_lastReadOnly = ReadOnly;
|
||||||
}
|
}
|
||||||
FindAllLinks();
|
FindAllLinks();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user