diff --git a/sources/Structured Storage Explorer/MainForm.cs b/sources/Structured Storage Explorer/MainForm.cs index ec278265..967f204b 100644 --- a/sources/Structured Storage Explorer/MainForm.cs +++ b/sources/Structured Storage Explorer/MainForm.cs @@ -90,6 +90,11 @@ private void CloseCurrentFile() propertyGrid1.SelectedObject = null; hexEditor.ByteProvider = null; + +#if OLE_PROPERTY + dgvUserDefinedProperties.DataSource = null; + dgvOLEProps.DataSource = null; +#endif } private bool canUpdate = false; @@ -424,6 +429,7 @@ private void treeView1_MouseUp(object sender, MouseEventArgs e) treeView1.SelectedNode = n; + // The tag property contains the underlying CFItem. CFItem target = (CFItem)n.Tag; @@ -435,6 +441,9 @@ private void treeView1_MouseUp(object sender, MouseEventArgs e) exportDataToolStripMenuItem.Enabled = true; #if OLE_PROPERTY + dgvUserDefinedProperties.DataSource = null; + dgvOLEProps.DataSource = null; + if (target.Name == "\u0005SummaryInformation" || target.Name == "\u0005DocumentSummaryInformation") { OLEPropertiesContainer c = ((CFStream)target).AsOLEPropertiesContainer(); @@ -496,12 +505,6 @@ private void treeView1_MouseUp(object sender, MouseEventArgs e) ds2.AcceptChanges(); dgvUserDefinedProperties.DataSource = ds2; } - - - } - else - { - dgvOLEProps.DataSource = null; } #endif }