This commit is contained in:
@@ -320,6 +320,12 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
CleanUpClosedItems();
|
||||
if (myItemInfo == null) return null;
|
||||
// if this is an auto table of contents section, don't edit it:
|
||||
if (myItemInfo.IsAutoTOCSection)
|
||||
{
|
||||
MessageBox.Show("This is an automatically generated 'Table of Contents' section. It is not editable. It is generated during Print.", "Item not Editable", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return SelectedDisplayTabItem;
|
||||
}
|
||||
_MyBar = GetParentBar(myItemInfo); // Get the docking bar associated with this item.
|
||||
if (myItemInfo.MyContent.MyEntry == null) // If it is a Word document open in step editor
|
||||
return OpenStepTabPage(myItemInfo);
|
||||
@@ -432,7 +438,12 @@ namespace Volian.Controls.Library
|
||||
public void CloseWordItem(ItemInfo myItemInfo, bool isBeingDeleted)
|
||||
{
|
||||
CleanUpClosedItems();
|
||||
string key = "Doc - " + myItemInfo.MyContent.MyEntry.MyDocument.DocID.ToString();
|
||||
string key = "Doc - ";
|
||||
// there is no entry if it is an auto table of contents:
|
||||
if (myItemInfo.MyContent.MyEntry != null)
|
||||
key = key + myItemInfo.MyContent.MyEntry.MyDocument.DocID.ToString();
|
||||
else
|
||||
key = key + "0";
|
||||
DisplayTabItem myTabItem = null;
|
||||
if (_MyDisplayTabItems.ContainsKey(key)) // If page open, close it
|
||||
{
|
||||
|
Reference in New Issue
Block a user