callback can be ininterruptible 16/14216/1
Antoine ELIAS [Fri, 28 Mar 2014 15:07:37 +0000 (16:07 +0100)]
Change-Id: I77531250b5b1434bb63df140d9bc0ff5e9b463c5

scilab/modules/gui/src/java/org/scilab/modules/gui/events/callback/CommonCallBack.java

index fb4798f..f949489 100644 (file)
@@ -106,6 +106,13 @@ public abstract class CommonCallBack extends AbstractAction {
             case CallBack.SCILAB_OUT_OF_XCLICK_AND_XGETMOUSE :
                 callback = ScilabCallBack.createOutOfXclickAndXgetmouse(command);
                 break;
+            case CallBack.SCILAB_NOT_INTERRUPTIBLE_FUNCTION:
+            case CallBack.SCILAB_NOT_INTERRUPTIBLE_INSTRUCTION:
+                callback = ScilabCallBack.create("if exists(\"gcbo\") then %oldgcbo = gcbo; end;"
+                                                 + "gcbo = getcallbackobject(" + objectUID + ");"
+                                                 + command
+                                                 + ";if exists(\"%oldgcbo\") then gcbo = %oldgcbo; else clear gcbo; end;", false);
+                break;
             default:
                 callback = ScilabCallBack.create("if exists(\"gcbo\") then %oldgcbo = gcbo; end;"
                                                  + "gcbo = getcallbackobject(" + objectUID + ");"