Fixed crash when you selected the Open button on the Library Document tab in the Tools panel. Open button is only available for library documents with zero references.

If the open library document is not referenced, then save changes but don’t generate a PDF.
This commit is contained in:
2016-05-26 15:25:47 +00:00
parent 008a1e67eb
commit f763a9a868
3 changed files with 14 additions and 7 deletions

View File

@@ -326,7 +326,10 @@ namespace Volian.Controls.Library
private void SetupLibraryDocumentDSOTabPanel()
{
UserInfo ui = UserInfo.GetByUserID(OwnerInfo.Get(OwnerID).SessionUserID);
_MyDSOTabPanel = new DSOTabPanel(_MyDocumentInfo, _MyDisplayTabControl, _MyItemInfo, UserInfo.CanEdit(ui, MyItemInfo.MyDocVersion));
// B2016-131 if myiteminfo is null, then the lib doc is not referenced.
// - Allow editting only if you are an Administrator
// - Cannot check if you are a Writer or Set Aministrator because we don't have a Doc Verion
_MyDSOTabPanel = new DSOTabPanel(_MyDocumentInfo, _MyDisplayTabControl, _MyItemInfo, (MyItemInfo != null) ? UserInfo.CanEdit(ui, MyItemInfo.MyDocVersion):ui.IsAdministrator());
//
// tabItem
//