mirror of
https://github.com/ilya-zlobintsev/LACT.git
synced 2026-08-17 16:34:54 -05:00
fix: unnecessary curve overwriting
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user