Skip to content

Commit

Permalink
Channel settings sometimes didn't show on the first click
Browse files Browse the repository at this point in the history
  • Loading branch information
maxim-zhao committed Sep 2, 2021
1 parent 203f72c commit 38c3e30
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions SidWiz/SidWizPlusGUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,20 @@ private void Render()

// Render a bitmap
var bitmap = renderer.RenderFrame(renderPosition);

/*
if (PropertyGrid.SelectedObject != null)
{
// Figure out which one is selected
lock (_settings)
{
var index = _settings.Channels.IndexOf(PropertyGrid.SelectedObject as Channel);
var columnIndex = index % _settings.Columns;
var rowIndex = index / _settings.Columns;
var numRows = _settings.Channels.Count / _settings.Columns +
(_settings.Channels.Count % _settings.Columns == 0 ? 0 : 1);
}
}
*/
BeginInvoke(new Action(() =>
{
// Swap it with whatever is in the preview control
Expand Down Expand Up @@ -1241,7 +1254,7 @@ private void ResetToDefaultSettings(object sender, EventArgs e)
private void PropertyGrid_SelectedObjectsChanged(object sender, EventArgs e)
{
PropertyGrid.Visible = PropertyGrid.SelectedObject != null;
ChannelsHelpLabel.Visible = !PropertyGrid.Visible;
ChannelsHelpLabel.Visible = PropertyGrid.SelectedObject == null;;
}
}
}

0 comments on commit 38c3e30

Please sign in to comment.