From 60d2857493a20ceca2433759899abdb8867d8a3d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr>
Date: Thu, 17 Dec 2020 17:47:44 +0100
Subject: [PATCH] [ivette/eva] make persistent on double-click

---
 ivette/src/frama-c/eva/Values.tsx | 5 ++++-
 ivette/src/frama-c/eva/model.ts   | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/ivette/src/frama-c/eva/Values.tsx b/ivette/src/frama-c/eva/Values.tsx
index 510d9ee8986..4925f525216 100644
--- a/ivette/src/frama-c/eva/Values.tsx
+++ b/ivette/src/frama-c/eva/Values.tsx
@@ -171,7 +171,10 @@ function TableCell(props: TableCellProps) {
     }
   };
   const onDoubleClick = () => {
-    if (probe && probe.zoomable) probe.setZoomed(!probe.zoomed);
+    if (probe) {
+      if (probe.transient) probe.setTransient(false);
+      if (probe.zoomable) probe.setZoomed(!probe.zoomed);
+    }
   };
   return (
     <div
diff --git a/ivette/src/frama-c/eva/model.ts b/ivette/src/frama-c/eva/model.ts
index 2fb65af2ca4..8dbe4a460c2 100644
--- a/ivette/src/frama-c/eva/model.ts
+++ b/ivette/src/frama-c/eva/model.ts
@@ -149,6 +149,7 @@ export class Model implements StateCallbacks {
     this.stacks.clear();
     this.values.clear();
     this.forceLayout();
+    this.forceUpdate();
   }
 
   // --- Events
-- 
GitLab