Save Item only once when text is updated
Adjust AER to reflect changes in the RNO column Added AnnotationColor property Set Active or Inactive BackColor for StepRTB
This commit is contained in:
@@ -361,7 +361,13 @@ namespace Volian.Controls.Library
|
||||
Dictionary<int, ContentRoUsage> roUsgReplacements = BuildRoUsgReplacements(_MyItem.MyContent.ContentRoUsages);
|
||||
_MyItem.DTS = DateTime.Now;
|
||||
_MyItem.UserID = Environment.UserName;
|
||||
_MyItem.Save();
|
||||
// Do the Save once rather than multiple times
|
||||
bool saveAtOnce = false;
|
||||
// If it is a new Item, save it before the transitions and ROs are saved
|
||||
if (_MyItem.ItemID < 0)
|
||||
_MyItem.Save();
|
||||
else
|
||||
saveAtOnce = true;
|
||||
if (ctReplacements.Count > 0)
|
||||
{
|
||||
EditText = FixCtReplacements(EditText, ctReplacements);
|
||||
@@ -369,13 +375,15 @@ namespace Volian.Controls.Library
|
||||
foreach (ContentTransition ct in ctReplacements.Values)
|
||||
using (TransitionInfo tran = TransitionInfo.Get(ct.TransitionID))
|
||||
_MyItem.MyContent.FixTransitionText(tran);
|
||||
_MyItem.Save();
|
||||
saveAtOnce = true;
|
||||
}
|
||||
if (roUsgReplacements.Count > 0)
|
||||
{
|
||||
EditText = FixRoUsgReplacements(EditText, roUsgReplacements);
|
||||
_MyItem.Save();
|
||||
saveAtOnce = true;
|
||||
}
|
||||
if(saveAtOnce)
|
||||
_MyItem.Save();
|
||||
modtext = EditText;
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user