B2012-397 – fixed pasted logic with respect to the default (v button) setting and the two paste options
This commit is contained in:
parent
570e2813bf
commit
2a6ff5d0b3
@ -1031,7 +1031,8 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
#endregion
|
||||
#region Home Tab
|
||||
private bool _PastePlainText = false;
|
||||
private bool _PastePlainTextOvrRide = false;
|
||||
private bool _PasteStepTextOvrRide = false;
|
||||
private void btnPaste_Click(object sender, EventArgs e)
|
||||
{
|
||||
StartGridEditing(SelectionOption.End);
|
||||
@ -1053,17 +1054,20 @@ namespace Volian.Controls.Library
|
||||
cmb.SelectedText = myDO.GetData(DataFormats.UnicodeText).ToString();
|
||||
else if (myDO.GetDataPresent(DataFormats.Text))
|
||||
cmb.SelectedText = myDO.GetData(DataFormats.Text).ToString();
|
||||
_PastePlainText = false;
|
||||
_PastePlainTextOvrRide = false;
|
||||
_PasteStepTextOvrRide = false;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
SaveErrorInLogProblemWithType(ctrl);
|
||||
_PastePlainText = false;
|
||||
_PastePlainTextOvrRide = false;
|
||||
_PasteStepTextOvrRide = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (myDO.GetDataPresent(DataFormats.Rtf) && !_PastePlainText && !PastePlainTextSetting)
|
||||
//if (myDO.GetDataPresent(DataFormats.Rtf) && !_PastePlainTextOvrRide && !PastePlainTextSetting)
|
||||
if (myDO.GetDataPresent(DataFormats.Rtf) && (_PasteStepTextOvrRide || (!_PastePlainTextOvrRide && !PastePlainTextSetting)))
|
||||
{
|
||||
string tmpForLink = myDO.GetData(DataFormats.Rtf).ToString();
|
||||
tmpForLink = Regex.Replace(tmpForLink, @"#Link:ReferencedObject:[0-9]+ ", @"#Link:ReferencedObject:<NewID> ");
|
||||
@ -1087,7 +1091,8 @@ namespace Volian.Controls.Library
|
||||
//myRtb.SelectedText = myDO.GetData(DataFormats.Text).ToString();
|
||||
}
|
||||
if (myRtb.SelectionLength == 0 && myRtb is StepRTB) myRtb.SelectionFont = (myRtb as StepRTB).MyStyleFont.WindowsFont;
|
||||
_PastePlainText = false;
|
||||
_PastePlainTextOvrRide = false;
|
||||
_PasteStepTextOvrRide = false;
|
||||
}
|
||||
|
||||
private void SaveErrorInLogProblemWithType(Control ctrl)
|
||||
@ -2449,7 +2454,14 @@ namespace Volian.Controls.Library
|
||||
private void btnPasteText_Click(object sender, EventArgs e)
|
||||
{
|
||||
StartGridEditing(SelectionOption.End);
|
||||
_PastePlainText = true;
|
||||
_PastePlainTextOvrRide = true;
|
||||
btnPaste_Click(sender, e);
|
||||
}
|
||||
|
||||
private void btnPasteStepText_Click(object sender, EventArgs e)
|
||||
{
|
||||
StartGridEditing(SelectionOption.End);
|
||||
_PasteStepTextOvrRide = true;
|
||||
btnPaste_Click(sender, e);
|
||||
}
|
||||
|
||||
|
BIN
PROMS/Volian.Controls.Library/StepTabRibbon.designer.cs
generated
BIN
PROMS/Volian.Controls.Library/StepTabRibbon.designer.cs
generated
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user