Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add view menu item to clear the plot #900

Merged
merged 2 commits into from
Nov 21, 2022

Conversation

ntoff
Copy link
Contributor

@ntoff ntoff commented Nov 20, 2022

Adds a view menu -> "Reset Plot" item to clear the plotted value data.

image

I've had this feature in my own custom build for a while now, and I added it as a separate entry rather than just "Reset min/max/plot" on one button because there have been times where I only want to reset the min / max values but keep the plot, and likewise reset the plot but keep the maximum / minimum values intact.

(satisfies #859)

Adds a view menu item to clear the plotted value data

(satisfies LibreHardwareMonitor#859)
/// <summary>
/// Resets the plot graph.
/// </summary>
void ResetPlot();
Copy link
Collaborator

Choose a reason for hiding this comment

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

ResetPlot > ClearValues. Also update comment.

Copy link
Contributor Author

@ntoff ntoff Nov 21, 2022

Choose a reason for hiding this comment

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

Not entirely sure I understand what you're asking. Do you want the function to be called ClearValues instead of ResetPlot? And update the comment to what?

Is this what you're asking for

/// <summary>
/// Clears the values stored in <see cref="Sensor._values"/>.
/// </summary>
void ClearValues();

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, that's right! The comment should refer to

IEnumerable<SensorValue> Values { get; }
though.

Rename function to ClearValues() and update comment
in ISensor.cs
@PhyxionNL PhyxionNL merged commit 777b78a into LibreHardwareMonitor:master Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants