ide: tweaked code related to managing (or not) debug session when compiling. fixed...
[sdk] / ide / src / project / ProjectView.ec
index 1735968..f87f5bb 100644 (file)
@@ -822,7 +822,7 @@ class ProjectView : Window
 
    ~ProjectView()
    {
 
    ~ProjectView()
    {
-      ide.debugger.Stop();
+      DebugStop();
       ide.DestroyTemporaryProjectDir();
       if(project)
       {
       ide.DestroyTemporaryProjectDir();
       if(project)
       {
@@ -982,7 +982,7 @@ class ProjectView : Window
          if(node)
             prj = node.project;
       }
          if(node)
             prj = node.project;
       }
-      if(prj != project || !ide.DontTerminateDebugSession("Project Build"))
+      if(/*prj != project || */!prj.configIsInDebugSession || !ide.DontTerminateDebugSession("Project Build"))
          BuildInterrim(prj, build, false);
       return true;
    }
          BuildInterrim(prj, build, false);
       return true;
    }
@@ -1247,8 +1247,8 @@ class ProjectView : Window
       {
          DirExpression targetDir = prj.targetDir;
 
       {
          DirExpression targetDir = prj.targetDir;
 
-         if(buildType != run && prj == project && ide.debugger.isActiveForCurrentConfig)
-            ide.debugger.Stop();
+         if(buildType != run/* && prj == project*/ && prj.configIsInDebugSession)
+            DebugStop();
          
          // TODO: Disabled until problems fixed... is it fixed?
          if(buildType == rebuild || (prj.config && prj.config.compilingModified))
          
          // TODO: Disabled until problems fixed... is it fixed?
          if(buildType == rebuild || (prj.config && prj.config.compilingModified))