1. Chaiwat Suttipongsakul
  2. boa-constructor

Commits

riaan  committed 82b6c9a

Exposed method to clear break markers. Changed Run to cursor to run the application if it is defined

  • Participants
  • Parent commits 87a64f9
  • Branches default

Comments (0)

Files changed (1)

File Views/PySourceView.py

View file
             else: mrk = brkPtMrk
             self.MarkerAdd(brk['lineno'] - 1, mrk)
 
+    def deleteBreakMarkers(self, lineNo):
+        self.MarkerDelete(lineNo - 1, brkPtMrk)
+        self.MarkerDelete(lineNo - 1, tmpBrkPtMrk)
+
     def deleteBreakPoint(self, lineNo):
         self.breaks.deleteBreakpoints(lineNo)
         debugger = self.model.editor.debugger
             # Try to apply to the running debugger.
             filename = self.model.assertLocalFile()
             debugger.deleteBreakpoints(filename, lineNo)
-        self.MarkerDelete(lineNo - 1, brkPtMrk)
-        self.MarkerDelete(lineNo - 1, tmpBrkPtMrk)
-
+        self.deleteBreakMarkers(lineNo)
+        
     def addBreakPoint(self, lineNo, temp=0, notify_debugger=1):
         filename = self.model.assertLocalFile()
 
         self.addBreakPoint(line, temp=1, notify_debugger=0)
         # Avoid a race condition by sending the breakpoint
         # along with the "continue" instruction.
-        temp_breakpoint = (os.path.normcase(os.path.abspath(
-            self.model.assertLocalFile())), line)
-        self.model.debug(cont_if_running=1, cont_always=1,
+        temp_breakpoint = (self.model.assertLocalFile(), line)
+        if self.model.app:
+            model = self.model.app
+        else:
+            model = self.model
+        model.debug(cont_if_running=1, cont_always=1,
                          temp_breakpoint=temp_breakpoint)
 
     def OnContextHelp(self, event):