B2016-023: For enhanced, display pasted steps in edit window if editor is open

B2016-025: Ribbon button enabling for enhanced support
This commit is contained in:
2016-01-29 15:03:43 +00:00
parent b087ce9996
commit 948fe7f1de
3 changed files with 50 additions and 23 deletions

View File

@@ -1123,7 +1123,20 @@ namespace Volian.Controls.Library
// for now (Jan 2016 - initial implementation of enhanced document support) do NOT paste any step (MyCopyStep) that has enhanced data associated
// with it unless pasting within a enhanced source document. The reason is that code would need to handle clearing the pasted enhanced config
// data if it is pasted into a non-enhanced location.
if ((!MyItemInfo.IsEnhancedSection && !MyItemInfo.IsEnhancedStep) && tmp.MyDisplayTabControl.MyCopyStep.IsEnhancedStep)
StepConfig stepToCfg = null;
bool fromSourceHasEnhancedLinks = false;
bool toSourceHasEnhancedLinks = false;
if (tmp.MyDisplayTabControl.MyCopyStep.IsHigh)
{
stepToCfg = tmp.MyDisplayTabControl.MyCopyStep.MyConfig as StepConfig;
if (stepToCfg.MyEnhancedDocuments != null && stepToCfg.MyEnhancedDocuments.Count > 0 && stepToCfg.MyEnhancedDocuments[0].Type != 0) fromSourceHasEnhancedLinks = true;
if (MyItemInfo.IsHigh)
{
stepToCfg = MyItemInfo.MyConfig as StepConfig;
if (stepToCfg.MyEnhancedDocuments != null && stepToCfg.MyEnhancedDocuments.Count > 0 && stepToCfg.MyEnhancedDocuments[0].Type != 0) toSourceHasEnhancedLinks = true;
}
}
if ((!MyItemInfo.IsEnhancedSection && !MyItemInfo.IsEnhancedStep && !toSourceHasEnhancedLinks) && fromSourceHasEnhancedLinks)
{
btnPasteBefore.Enabled = btnCMPasteBefore.Enabled = false;
btnPasteAfter.Enabled = btnCMPasteAfter.Enabled = false;
@@ -1133,7 +1146,7 @@ namespace Volian.Controls.Library
// enhanced: if 'from' step is not enhanced, only allow paste before/after
if (MyItemInfo.IsHigh && !MyItemInfo.IsEnhancedStep)
{
StepConfig stepToCfg = MyItemInfo.MyConfig as StepConfig;
stepToCfg = MyItemInfo.MyConfig as StepConfig;
if (stepToCfg.MyEnhancedDocuments != null && stepToCfg.MyEnhancedDocuments.Count>0 && stepToCfg.MyEnhancedDocuments[0].Type != 0)
{
// Current selected step is source (i.e. has enhanced links to enhanced steps)