This commit is contained in:
parent
2071e3bb18
commit
e5ccc5604e
@ -301,6 +301,7 @@ namespace Volian.Controls.Library
|
||||
private bool StepTransition(int TransId)
|
||||
{
|
||||
if (_MyItemInfo == null) return false;
|
||||
_MyItemInfo.MyContent.RefreshContentTransitions();
|
||||
foreach (TransitionInfo trans in _MyItemInfo.MyContent.ContentTransitions)
|
||||
if (trans.TransitionID == TransId)
|
||||
return trans.MyItemToID.IsStep;
|
||||
@ -330,6 +331,7 @@ namespace Volian.Controls.Library
|
||||
#region SaveData
|
||||
public bool Save(RichTextBox rtb)
|
||||
{
|
||||
//int savSelStart = rtb.SelectionStart;
|
||||
try
|
||||
{
|
||||
//FormatInfo formatInfo = _MyItemInfo.ActiveFormat;
|
||||
@ -342,7 +344,6 @@ namespace Volian.Controls.Library
|
||||
Console.WriteLine("Save Failed because text changed outside of this edit session.");
|
||||
return false;
|
||||
}
|
||||
|
||||
string modtext = RtfToDbText(rtb.Rtf);
|
||||
// if there are links, we'll need to do extra processing to see if
|
||||
// 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:
|
||||
//RtfToDisplayTextElements(rtb.Rtf);
|
||||
RtfToDisplayTextElements(modtext);
|
||||
|
||||
// Compare ro/transition lists and delete or add any to the item for any ros/transitions that have been
|
||||
// added/deleted or modified.
|
||||
ProcessRoTranChanges(_MyItem, origList);
|
||||
EditText = DteToString();
|
||||
|
||||
// if new transitions/ros, we need to 'fix' the string in the embedded link to contain the
|
||||
// transition or usage record.
|
||||
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);
|
||||
return false;
|
||||
}
|
||||
//rtb.SelectionStart = savSelStart;
|
||||
return true;
|
||||
}
|
||||
private string DteToString()
|
||||
|
Loading…
x
Reference in New Issue
Block a user