Skip to content

Commit

Permalink
bugfix: added getScale method in manager, rename test
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikaLos committed Dec 5, 2024
1 parent 23dfa8d commit 6ed39cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions GsaGH/Helpers/GH/Legend/ContourLegendManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ public void UpdateScale(double scale) {
_configuration.SetLegendScale(scale);
}

public double GetScale() {
return _configuration.Scale;

Check warning on line 52 in GsaGH/Helpers/GH/Legend/ContourLegendManager.cs

View check run for this annotation

Codecov / codecov/patch

GsaGH/Helpers/GH/Legend/ContourLegendManager.cs#L52

Added line #L52 was not covered by tests
}

public bool ToggleVisibility() {
return _configuration.ToggleLegendVisibility();
}
Expand Down
2 changes: 1 addition & 1 deletion GsaGHTests/Helpers/GH/Legend/LegendMenuBuilderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void CreateLegendToolStripMenuItem_CreatesMenuItemCorrectly() {
}

[Fact]
public void CreateLegendToolStripMenuItem_UpdatesScale_OnTextChange() {
public void CreateLegendToolStripMenuItem_UpdatesTextBox_OnTextChange() {
ToolStripItem scaleTextBox = _menuItem.DropDownItems[0];
double newScale = 2.5d;
// Act - Simulate text change
Expand Down

0 comments on commit 6ed39cc

Please sign in to comment.