Skip to content

Commit

Permalink
[StructuredStorageExplorer] Hide the OLE Properties displays when swi…
Browse files Browse the repository at this point in the history
…tching to a stream that has no properties and when closing a file
  • Loading branch information
Numpsy committed Mar 1, 2024
1 parent 4b53773 commit fca3490
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions sources/Structured Storage Explorer/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand All @@ -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();
Expand Down Expand Up @@ -496,12 +505,6 @@ private void treeView1_MouseUp(object sender, MouseEventArgs e)
ds2.AcceptChanges();
dgvUserDefinedProperties.DataSource = ds2;
}


}
else
{
dgvOLEProps.DataSource = null;
}
#endif
}
Expand Down

0 comments on commit fca3490

Please sign in to comment.