This commit is contained in:
parent
2071e3bb18
commit
e5ccc5604e
@ -301,6 +301,7 @@ namespace Volian.Controls.Library
|
|||||||
private bool StepTransition(int TransId)
|
private bool StepTransition(int TransId)
|
||||||
{
|
{
|
||||||
if (_MyItemInfo == null) return false;
|
if (_MyItemInfo == null) return false;
|
||||||
|
_MyItemInfo.MyContent.RefreshContentTransitions();
|
||||||
foreach (TransitionInfo trans in _MyItemInfo.MyContent.ContentTransitions)
|
foreach (TransitionInfo trans in _MyItemInfo.MyContent.ContentTransitions)
|
||||||
if (trans.TransitionID == TransId)
|
if (trans.TransitionID == TransId)
|
||||||
return trans.MyItemToID.IsStep;
|
return trans.MyItemToID.IsStep;
|
||||||
@ -330,6 +331,7 @@ namespace Volian.Controls.Library
|
|||||||
#region SaveData
|
#region SaveData
|
||||||
public bool Save(RichTextBox rtb)
|
public bool Save(RichTextBox rtb)
|
||||||
{
|
{
|
||||||
|
//int savSelStart = rtb.SelectionStart;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//FormatInfo formatInfo = _MyItemInfo.ActiveFormat;
|
//FormatInfo formatInfo = _MyItemInfo.ActiveFormat;
|
||||||
@ -342,7 +344,6 @@ namespace Volian.Controls.Library
|
|||||||
Console.WriteLine("Save Failed because text changed outside of this edit session.");
|
Console.WriteLine("Save Failed because text changed outside of this edit session.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
string modtext = RtfToDbText(rtb.Rtf);
|
string modtext = RtfToDbText(rtb.Rtf);
|
||||||
// if there are links, we'll need to do extra processing to see if
|
// if there are links, we'll need to do extra processing to see if
|
||||||
// there were additions, deletions or modifications.
|
// there were additions, deletions or modifications.
|
||||||
@ -355,12 +356,10 @@ namespace Volian.Controls.Library
|
|||||||
// now get new text into displaytext elements for comparison for links:
|
// now get new text into displaytext elements for comparison for links:
|
||||||
//RtfToDisplayTextElements(rtb.Rtf);
|
//RtfToDisplayTextElements(rtb.Rtf);
|
||||||
RtfToDisplayTextElements(modtext);
|
RtfToDisplayTextElements(modtext);
|
||||||
|
|
||||||
// Compare ro/transition lists and delete or add any to the item for any ros/transitions that have been
|
// Compare ro/transition lists and delete or add any to the item for any ros/transitions that have been
|
||||||
// added/deleted or modified.
|
// added/deleted or modified.
|
||||||
ProcessRoTranChanges(_MyItem, origList);
|
ProcessRoTranChanges(_MyItem, origList);
|
||||||
EditText = DteToString();
|
EditText = DteToString();
|
||||||
|
|
||||||
// if new transitions/ros, we need to 'fix' the string in the embedded link to contain the
|
// if new transitions/ros, we need to 'fix' the string in the embedded link to contain the
|
||||||
// transition or usage record.
|
// transition or usage record.
|
||||||
Dictionary<int, ContentTransition> ctReplacements = BuildCtReplacements(_MyItem.MyContent.ContentTransitions);
|
Dictionary<int, ContentTransition> ctReplacements = BuildCtReplacements(_MyItem.MyContent.ContentTransitions);
|
||||||
@ -404,6 +403,7 @@ namespace Volian.Controls.Library
|
|||||||
Console.WriteLine("DisplayText Save Failed with error: {0} - {1}\r\n{2}", ex.GetType().Name, ex.Message, ex.StackTrace);
|
Console.WriteLine("DisplayText Save Failed with error: {0} - {1}\r\n{2}", ex.GetType().Name, ex.Message, ex.StackTrace);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
//rtb.SelectionStart = savSelStart;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
private string DteToString()
|
private string DteToString()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user