Skip to content

Commit

Permalink
Enable/disable display ranges with associated checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
lorentey committed Sep 6, 2017
1 parent b5e0885 commit 1992955
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
11 changes: 10 additions & 1 deletion Attabench/AttabenchDocument.swift
Expand Up @@ -271,13 +271,17 @@ class AttabenchDocument: NSDocument, BenchmarkDelegate {
self.highlightSelectedSizeRangeCheckbox!.glue.state <-- model.map{$0.highlightSelectedSizeRange}
self.displayIncludeAllMeasuredSizesCheckbox!.glue.state <-- model.map{$0.displayIncludeAllMeasuredSizes}
self.displayIncludeSizeScaleRangeCheckbox!.glue.state <-- model.map{$0.displayIncludeSizeScaleRange}

self.displaySizeScaleRangeMinPopUpButton!.glue <-- NSPopUpButton.Choices<Int>(
model: model.map{$0.displaySizeScaleRange.lowerBound},
values: lowerBoundSizeChoices)
self.displaySizeScaleRangeMinPopUpButton!.glue.isEnabled <-- model.map{$0.displayIncludeSizeScaleRange}

self.displaySizeScaleRangeMaxPopUpButton!.glue <-- NSPopUpButton.Choices<Int>(
model: model.map{$0.displaySizeScaleRange.upperBound},
values: upperBoundSizeChoices)

self.displaySizeScaleRangeMaxPopUpButton!.glue.isEnabled <-- model.map{$0.displayIncludeSizeScaleRange}


var timeChoices: [(label: String, value: Time)] = []
var time = Time(picoseconds: 1)
Expand All @@ -286,13 +290,18 @@ class AttabenchDocument: NSDocument, BenchmarkDelegate {
time = 10 * time
}
self.displayIncludeAllMeasuredTimesCheckbox!.glue.state <-- model.map{$0.displayIncludeAllMeasuredTimes}

self.displayIncludeTimeRangeCheckbox!.glue.state <-- model.map{$0.displayIncludeTimeRange}

self.displayTimeRangeMinPopUpButton!.glue <-- NSPopUpButton.Choices<Time>(
model: model.map{$0.displayTimeRange.lowerBound},
values: timeChoices)
self.displayTimeRangeMinPopUpButton!.glue.isEnabled <-- model.map{$0.displayIncludeTimeRange}

self.displayTimeRangeMaxPopUpButton!.glue <-- NSPopUpButton.Choices<Time>(
model: model.map{$0.displayTimeRange.upperBound},
values: timeChoices)
self.displayTimeRangeMaxPopUpButton!.glue.isEnabled <-- model.map{$0.displayIncludeTimeRange}

refreshRunButton()
refreshChart.now()
Expand Down
2 changes: 1 addition & 1 deletion Attabench/Base.lproj/AttabenchDocument.xib
Expand Up @@ -1037,9 +1037,9 @@
<toolbarItem implicitItemIdentifier="NSToolbarFlexibleSpaceItem" id="S71-Vo-5QY"/>
</allowedToolbarItems>
<defaultToolbarItems>
<toolbarItem reference="Wmz-t1-Dse"/>
<toolbarItem reference="ApD-tD-Tu6"/>
<toolbarItem reference="Znh-eH-hvH"/>
<toolbarItem reference="Wmz-t1-Dse"/>
<toolbarItem reference="GaH-lI-0CK"/>
<toolbarItem reference="S71-Vo-5QY"/>
</defaultToolbarItems>
Expand Down
6 changes: 3 additions & 3 deletions Cartfile.resolved
@@ -1,6 +1,6 @@
github "attaswift/BTree" "9e34b5311b0d44846d91245b8361a42d7e06275a"
github "attaswift/OptionParser" "049f1e2b9d4550c25d99c54e17a045149e723afb"
github "attaswift/SipHash" "059de25c8d7eccc2a7b8e6a98356f0016d3549bc"
github "attaswift/SipHash" "7f83e142126db134b8d9175cb98b65ba95c18a1f"
github "lorentey/BigInt" "b4bfe356e9bd76c59e0781d8584c495ab348b1f6"
github "lorentey/GlueKit" "43d55daa637dab287d5894778bd3adf67b065797"
github "lorentey/SipHash" "059de25c8d7eccc2a7b8e6a98356f0016d3549bc"
github "lorentey/GlueKit" "a1283dba1d57578e34ded41bd9b5f24a2b9bf72f"
github "lorentey/SipHash" "7f83e142126db134b8d9175cb98b65ba95c18a1f"
4 changes: 2 additions & 2 deletions Package.resolved
Expand Up @@ -24,7 +24,7 @@
"repositoryURL": "https://github.com/attaswift/GlueKit",
"state": {
"branch": "master",
"revision": "43d55daa637dab287d5894778bd3adf67b065797",
"revision": "a1283dba1d57578e34ded41bd9b5f24a2b9bf72f",
"version": null
}
},
Expand All @@ -42,7 +42,7 @@
"repositoryURL": "https://github.com/attaswift/SipHash",
"state": {
"branch": "swift4",
"revision": "059de25c8d7eccc2a7b8e6a98356f0016d3549bc",
"revision": "7f83e142126db134b8d9175cb98b65ba95c18a1f",
"version": null
}
}
Expand Down

0 comments on commit 1992955

Please sign in to comment.