QScintilla/Editor.py

branch
5_2_x
changeset 1589
9f0fef4a4fbe
parent 1565
815eb7a39944
child 1724
361b8dea9251
equal deleted inserted replaced
1585:98c4345f856a 1589:9f0fef4a4fbe
2936 else: 2936 else:
2937 # determine the start of the comment block 2937 # determine the start of the comment block
2938 begline = line 2938 begline = line
2939 while begline > 0 and \ 2939 while begline > 0 and \
2940 self.text(begline - 1).strip().startswith(commentStr): 2940 self.text(begline - 1).strip().startswith(commentStr):
2941 begline -= 1 2941 begline -= 1
2942 # determine the end of the comment block 2942 # determine the end of the comment block
2943 endline = line 2943 endline = line
2944 lines = self.lines() 2944 lines = self.lines()
2945 while endline < lines and \ 2945 while endline < lines and \
2946 self.text(endline + 1).strip().startswith(commentStr): 2946 self.text(endline + 1).strip().startswith(commentStr):
2947 endline += 1 2947 endline += 1
2948 2948
2949 self.setSelection(begline, 0, endline, self.lineLength(endline)) 2949 self.setSelection(begline, 0, endline, self.lineLength(endline))
2950 self.uncommentLineOrSelection() 2950 self.uncommentLineOrSelection()
2951 2951
2952 # reset the cursor 2952 # reset the cursor
5409 Protected method to handle wheel events. 5409 Protected method to handle wheel events.
5410 5410
5411 @param evt reference to the wheel event (QWheelEvent) 5411 @param evt reference to the wheel event (QWheelEvent)
5412 """ 5412 """
5413 if evt.modifiers() & Qt.ControlModifier: 5413 if evt.modifiers() & Qt.ControlModifier:
5414 if evt.delta()< 0: 5414 if evt.delta() < 0:
5415 self.zoomOut() 5415 self.zoomOut()
5416 else: 5416 else:
5417 self.zoomIn() 5417 self.zoomIn()
5418 evt.accept() 5418 evt.accept()
5419 return 5419 return

eric ide

mercurial