This commit is contained in:
Serhiy Mytrovtsiy
2024-08-25 14:30:10 +02:00
parent ba816119b9
commit 5649f24d07
7 changed files with 15 additions and 15 deletions

View File

@@ -530,7 +530,7 @@ internal class Popup: PopupWrapper {
PreferencesRow(localizedString("Scale value"), component: self.sliderView!)
])
view.addArrangedSubview(self.chartPrefSection!)
self.chartPrefSection?.toggleVisibility(3, newState: self.lineChartScale == .fixed)
self.chartPrefSection?.setRowVisibility(3, newState: self.lineChartScale == .fixed)
return view
}
@@ -597,7 +597,7 @@ internal class Popup: PopupWrapper {
@objc private func toggleLineChartScale(_ sender: NSMenuItem) {
guard let key = sender.representedObject as? String,
let value = Scale.allCases.first(where: { $0.key == key }) else { return }
self.chartPrefSection?.toggleVisibility(3, newState: value == .fixed)
self.chartPrefSection?.setRowVisibility(3, newState: value == .fixed)
self.lineChartScale = value
self.lineChart?.setScale(self.lineChartScale, fixedScale: self.lineChartFixedScale)
Store.shared.set(key: "\(self.title)_lineChartScale", value: key)