fix: reset espacement calibration + refresh auto historique
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
/// Les anneaux sont répartis proportionnellement.
|
||||
library;
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../../core/theme/app_theme.dart';
|
||||
import '../../../data/models/target_type.dart';
|
||||
@@ -130,7 +131,14 @@ class TargetCalibrationState extends State<TargetCalibration> {
|
||||
_currentEspacementRatio = (_radius > 0) ? (_innerRadius / _radius).clamp(0.01, 0.70) : 0.1;
|
||||
shouldReinit = true;
|
||||
}
|
||||
if (widget.initialRingRadii != oldWidget.initialRingRadii && widget.initialRingRadii != null) {
|
||||
// On ne rafraîchit le profil d'usine que si les rayons entrants proviennent
|
||||
// réellement d'une nouvelle détection (ils diffèrent de notre état courant).
|
||||
// Sinon il s'agit de l'écho de notre propre _notifyChange (aller-retour via
|
||||
// le provider) : le clobber effacerait le profil d'origine et casserait le
|
||||
// bouton de réinitialisation de l'espacement.
|
||||
if (widget.initialRingRadii != oldWidget.initialRingRadii &&
|
||||
widget.initialRingRadii != null &&
|
||||
!listEquals(widget.initialRingRadii, _ringRadii)) {
|
||||
_originalRingRadii = List.from(widget.initialRingRadii!);
|
||||
shouldReinit = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user