B2020-051: Paste (ctrl-v) of mathtype equation was allowed into a procedure step

This commit is contained in:
Kathy Ruffing 2020-04-07 14:55:20 +00:00
parent 0b6ca223db
commit 7bb9ec16f9

View File

@ -2223,6 +2223,9 @@ namespace Volian.Controls.Library
{
hasEquation = true;
}
/// B2020-051: Don't allow pasting of a mathtype equation into an item that isn't the correct type
if (iData.GetDataPresent("Embed Source")) hasEquation = true; // mathtype
if (MyItemInfo != null && MyItemInfo.IsRtfRaw && MyItemInfo.FormatStepData.Type.ToUpper().Contains("EQUATION") && !hasEquation)
{
FlexibleMessageBox.Show("Cannot paste non-equation data into an equation step type.", "Invalid data", MessageBoxButtons.OK);