@@ -50,7 +50,7 @@ def __init__(self, parent=None):
5050 self .scrollarea .update_theme ()
5151
5252 self .linenumbers = LineNumbers (self )
53- self .linenumbers .setContextMenuPolicy (QtCore .Qt .DefaultContextMenu )
53+ self .linenumbers .setContextMenuPolicy (QtCore .Qt .DefaultContextMenu )
5454
5555 boxlayout .addWidget (self .linenumbers )
5656 boxlayout .addWidget (self .scrollarea )
@@ -221,13 +221,13 @@ def decVSlider(self, page=False):
221221 self .verticalScrollBar ().setSliderPosition (self .verticalScrollBar ().sliderPosition () - step )
222222
223223class LineNumbers (QFrame ):
224- def mouseDoubleClickEvent (self , event ):
224+ def mouseDoubleClickEvent (self , event ):
225225 if not self .parent ().debugging :
226- return None ;
226+ return None ;
227227 # Check which number is clicked
228228 editor = self .parent ().editor
229229 line_clicked = self .findLineNumberAt (event .y ())
230- if line_clicked <= len (editor .lines ):
230+ if line_clicked <= len (editor .lines ):
231231 event .accept ()
232232 self .emit (SIGNAL ("breakpoint" ), False , line_clicked , True )
233233
@@ -238,14 +238,14 @@ def contextMenuEvent(self, event):
238238 editor = self .parent ().editor
239239 line_clicked = self .findLineNumberAt (event .y ())
240240
241- if line_clicked > len (editor .lines ):
241+ if line_clicked > len (editor .lines ):
242242 return None ;
243243 event .accept ()
244244 menu = QMenu (self )
245- bAction = menu .addAction ("Toggle breakpoint at " + str (line_clicked ))
246- tbAction = menu .addAction ("Toggle temp breakpoint at " + str (line_clicked ))
245+ bAction = menu .addAction ("Toggle breakpoint at " + str (line_clicked ))
246+ tbAction = menu .addAction ("Toggle temp breakpoint at " + str (line_clicked ))
247247 bcAction = menu .addAction ("Set breakpoint with condition at " + str (line_clicked ))
248- action = menu .exec_ (self .mapToGlobal (event .pos ()))
248+ action = menu .exec_ (self .mapToGlobal (event .pos ()))
249249 if action == bAction :
250250 self .emit (SIGNAL ("breakpoint" ), False , line_clicked , False )
251251 elif action == tbAction :
@@ -269,7 +269,7 @@ def paintEvent(self, event):
269269 paint .setPen (QColor ("grey" ))
270270 paint .setFont (gfont .font )
271271
272- debugging = self .parent ().debugging
272+ debugging = self .parent ().debugging
273273 self .breakpoint_space = 10
274274
275275 editor = self .parent ().editor
@@ -279,18 +279,18 @@ def paintEvent(self, event):
279279 text = str (i + 1 )
280280 paint .drawText (QtCore .QPointF (self .geometry ().width () - (len (text )+ 1 )* gfont .fontwt , gfont .fontht + y * gfont .fontht ), text + ":" )
281281 if debugging :
282- self .draw_breakpoint (paint , text , gfont .fontht + y * gfont .fontht - 9 )
282+ self .draw_breakpoint (paint , text , gfont .fontht + y * gfont .fontht - 9 )
283283 y += editor .lines [i ].height
284284 i += 1
285285 if (y + 1 )* gfont .fontht >= editor .geometry ().height ():
286286 break
287287
288288 paint .end ()
289289
290- def draw_breakpoint (self , paint , line_no , y_pos ):
290+ def draw_breakpoint (self , paint , line_no , y_pos ):
291291 big_rect = QtCore .QRectF (0 , y_pos , 8 , 8 )
292292 small_rect = QtCore .QRectF (2 , y_pos + 2 , 4 , 4 )
293-
293+
294294 paint .setBrush (QColor ("blue" ))
295295 breakpoints = self .parent ().breakpoints
296296
@@ -302,11 +302,11 @@ def draw_breakpoint(self, paint, line_no, y_pos):
302302 paint .drawEllipse (big_rect )
303303 move = True
304304 if line_no in breakpoints ['del' ]:
305- paint .setBrush (QColor ("yellow" ))
306- if move :
307- paint .drawEllipse (small_rect )
308- else :
309- paint .drawEllipse (big_rect )
305+ paint .setBrush (QColor ("yellow" ))
306+ if move :
307+ paint .drawEllipse (small_rect )
308+ else :
309+ paint .drawEllipse (big_rect )
310310
311311 def update (self ):
312312 gfont = QApplication .instance ().gfont
0 commit comments