Skip to content

Commit

Permalink
Update type casting in copyToolStripMenuItem_Click handler
Browse files Browse the repository at this point in the history
Replaced type casting from Paragraph to Record in the copyToolStripMenuItem_Click method. This change ensures correct type handling and prevents potential runtime errors when accessing the Tag property.
  • Loading branch information
ivandrofly committed Mar 9, 2025
1 parent 52990c6 commit 4f4a0e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/HI2UC/PluginForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public void LoadConfigurations()

private void copyToolStripMenuItem_Click(object sender, EventArgs e)
{
var text = ((Paragraph)listViewFixes.FocusedItem.Tag).ToString();
var text = ((Record)listViewFixes.FocusedItem.Tag).ToString();
Clipboard.SetText(text, TextDataFormat.UnicodeText);
}

Expand Down

1 comment on commit 4f4a0e0

@ivandrofly
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was causing ctrl+c to to throw exception!

Please sign in to comment.