Skip to content

Commit

Permalink
Prevent properties like "SelectedResultsIndex" from showing up in the…
Browse files Browse the repository at this point in the history
… property sheet in "ViewMenu" form. (#3322)

Prevent properties like "SelectedResultsIndex" from showing up in the property sheet in "ViewMenu" form.
In the form designer for classes that are derived from "SkylineControl", such as "ViewMenu" or "EditMenu", some properties from the base class were showing up in the property sheet.
  • Loading branch information
nickshulman authored Jan 9, 2025
1 parent 0292182 commit a6e40bc
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pwiz_tools/Skyline/Menus/SkylineControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public SkylineControl(SkylineWindow skylineWindow) : this()
SkylineWindow = skylineWindow;
}

[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public Helpers.ModeUIExtender ModeUiHandler
{
get { return modeUIHandler; }
Expand All @@ -55,12 +57,18 @@ private void InitializeComponent()
modeUIHandler = new Helpers.ModeUIExtender(_components);
}

[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public SkylineWindow SkylineWindow { get; private set; }
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public SrmDocument DocumentUI
{
get { return SkylineWindow?.DocumentUI; }
}

[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public SrmDocument Document
{
get { return SkylineWindow?.Document; }
Expand All @@ -71,22 +79,30 @@ public void ModifyDocument(string description, Func<SrmDocument, SrmDocument> ac
SkylineWindow.ModifyDocument(description, null, act, null, null, logFunc);
}

[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public IdentityPath SelectedPath
{
get { return SkylineWindow?.SelectedPath; }
set { SkylineWindow.SelectedPath = value; }
}

[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public SequenceTree SequenceTree
{
get { return SkylineWindow.SequenceTree; }
}

[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public TreeNodeMS SelectedNode
{
get { return SkylineWindow.SelectedNode; }
}

[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public int SelectedResultsIndex
{
get
Expand Down

0 comments on commit a6e40bc

Please sign in to comment.