From 7bb9ec16f98dfa8bf56af2d0be7e920dea0a11d9 Mon Sep 17 00:00:00 2001 From: Kathy Date: Tue, 7 Apr 2020 14:55:20 +0000 Subject: [PATCH] B2020-051: Paste (ctrl-v) of mathtype equation was allowed into a procedure step --- PROMS/Volian.Controls.Library/StepRTB.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PROMS/Volian.Controls.Library/StepRTB.cs b/PROMS/Volian.Controls.Library/StepRTB.cs index f617007f..80b55408 100644 --- a/PROMS/Volian.Controls.Library/StepRTB.cs +++ b/PROMS/Volian.Controls.Library/StepRTB.cs @@ -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);