Why does document.BrowserPanes.AddTreeBrowser make the document dirty?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Is there anyway around this?
I'm trying to use a new TreeBrowserPane to show the user some temporary data that will not be saved in the document, but the fact that adding a TreeBrowserPane makes the document dirty is a problem, e.g. with files that are read-only or approved/checked into Vault.
I've tried setting the BrowserNodePane.Transient property after creating it, but at that point the document is already dirty.
Pseudocode here:
private void CreateBrowserPanePOC(Document document)
{
BrowserPanes oPanes;
oPanes = document.BrowserPanes;
BrowserNodeDefinition oDef;
oDef = (BrowserNodeDefinition)oPanes.CreateBrowserNodeDefinition("some node", 3, ->a ClientNodeResource object<-);
System.Diagnostics.Debug.WriteLine($"Document Dirty = {document.Dirty}");
BrowserPane oPane;
oPane = oPanes.AddTreeBrowserPane("Filter", Globals.AddinGUI, oDef);
System.Diagnostics.Debug.WriteLine($"Document Dirty = {document.Dirty}");
oPane.Transient = true;
System.Diagnostics.Debug.WriteLine($"Document Dirty = {document.Dirty}");
}
Regards
Lars G.