Workflow: Inversion du flux pour calibrer la cible avant d'afficher l'écran de Plotting
This commit is contained in:
@@ -250,22 +250,22 @@ class _CropScreenState extends State<CropScreen> {
|
||||
setState(() => _isLoading = true);
|
||||
try {
|
||||
final cropRect = _calculateCropRect();
|
||||
// On calcule le centre relatif basé sur le centrage utilisateur
|
||||
final targetCenterX = cropRect.x + cropRect.width / 2;
|
||||
final targetCenterY = cropRect.y + cropRect.height / 2;
|
||||
|
||||
if (!mounted) return;
|
||||
|
||||
// Note : On laisse temporairement AnalysisScreen ici.
|
||||
// Dès qu'on s'attaque au fichier de calibration, on modifiera cette ligne
|
||||
// pour basculer directement sur le bon écran !
|
||||
// CHANGEMENT DE FLUX : On saute l'analyse et on va DIRECTEMENT calibrer la cible !
|
||||
// On passe à l'écran d'analyse (qui va être renommé PlottingScreen) toutes les infos requises.
|
||||
Navigator.pushReplacement(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) => AnalysisScreen(
|
||||
imagePath: widget.imagePath,
|
||||
targetType: widget.targetType,
|
||||
targetCenter: Offset(targetCenterX, targetCenterY),
|
||||
// On initialise le centre avec le point que l'utilisateur vient de cibler
|
||||
initialCenterX: targetCenterX,
|
||||
initialCenterY: targetCenterY,
|
||||
cropScale: _scale,
|
||||
cropOffset: _offset,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user