fix: unnecessary curve overwriting

This commit is contained in:
Ilya Zlobintsev
2026-04-18 22:55:05 +03:00
parent 773a5eb44e
commit 58b2b4b0af
2 changed files with 7 additions and 1 deletions
+3 -1
View File
@@ -265,7 +265,9 @@ impl OcPage {
config.apply_clocks_command(&command);
}
config.gpu_vf_curve = self.vf_curve_editor.model().get_configured_curve();
if !self.vf_curve_editor.model().is_empty() {
config.gpu_vf_curve = self.vf_curve_editor.model().get_configured_curve();
}
}
pub fn get_enabled_power_states(&self) -> IndexMap<PowerLevelKind, Vec<u8>> {
@@ -642,6 +642,10 @@ impl VfCurveEditor {
(cmp::min(start, end), cmp::max(end, start))
}
pub fn is_empty(&self) -> bool {
self.points.borrow().is_empty()
}
pub fn get_configured_curve(&self) -> IndexMap<u8, config::CurvePoint> {
if !self.allow_editing.value() {
return IndexMap::new();