Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe

Commits:

1 changed file:

Changes:

  • client/src/main/java/fr/ird/observe/client/ui/content/open/ContentOpenableUIHandler.java
    ... ... @@ -314,16 +314,18 @@ public abstract class ContentOpenableUIHandler<E extends DataDto, U extends Cont
    314 314
     
    
    315 315
                 ObserveSwingApplicationContext applicationContext = ObserveSwingApplicationContext.get();
    
    316 316
                 ClientValidationContext context = applicationContext.getValidationContext();
    
    317
    -            TripSeineDto currentTripSeine = context.getCurrentTripSeine();
    
    318 317
     
    
    319
    -            if (currentTripSeine != null && currentTripSeine.isHistoricalData()) {
    
    318
    +            if (context.getDataContext().getSeine().getTrip().isEnabled()) {
    
    319
    +                TripSeineDto currentTripSeine = context.getCurrentTripSeine();
    
    320 320
     
    
    321
    -                if (log.isInfoEnabled()) {
    
    322
    -                    log.info(prefix + "Using a historical fish trip " + currentTripSeine.getId());
    
    323
    -                }
    
    324
    -                historicalData = true;
    
    325
    -            }
    
    321
    +                if (currentTripSeine != null && currentTripSeine.isHistoricalData()) {
    
    326 322
     
    
    323
    +                    if (log.isInfoEnabled()) {
    
    324
    +                        log.info(prefix + "Using a historical fish trip " + currentTripSeine.getId());
    
    325
    +                    }
    
    326
    +                    historicalData = true;
    
    327
    +                }
    
    328
    +            } 
    
    327 329
             }
    
    328 330
     
    
    329 331
             model.setHistoricalData(historicalData);