diff --git a/assets/tools/IrcMiRCARTBot.py b/assets/tools/IrcMiRCARTBot.py index 6b5483c..989e356 100755 --- a/assets/tools/IrcMiRCARTBot.py +++ b/assets/tools/IrcMiRCARTBot.py @@ -231,8 +231,6 @@ class IrcMiRCARTBot(IrcClient): elif serverMessage[1] == "PRIVMSG": self._dispatchPrivmsg(serverMessage) - # - # __init__(self, serverHname, serverPort="6667", clientNick="pngbot", clientIdent="pngbot", clientGecos="pngbot", clientChannel="#MiRCART"): initialisation method def __init__(self, serverHname, serverPort="6667", clientNick="pngbot", clientIdent="pngbot", clientGecos="pngbot", clientChannel="#MiRCART"): super().__init__(serverHname, serverPort, clientNick, clientIdent, clientGecos) self.clientChannel = clientChannel diff --git a/libcanvas/Canvas.py b/libcanvas/Canvas.py index 4b61f1e..bd88c44 100644 --- a/libcanvas/Canvas.py +++ b/libcanvas/Canvas.py @@ -91,8 +91,6 @@ class Canvas(): and (numCol < len(newCanvas[numRow])): self._commitPatch([numCol, numRow, *newCanvas[numRow][numCol]]) - # - # __init__(self, size): initialisation method def __init__(self, size): self.dirtyCursor, self.map, self.size = False, None, size self.exportStore, self.importStore, self.journal = CanvasExportStore(), CanvasImportStore(), CanvasJournal() diff --git a/libcanvas/CanvasImportStore.py b/libcanvas/CanvasImportStore.py index b985291..e36d7aa 100644 --- a/libcanvas/CanvasImportStore.py +++ b/libcanvas/CanvasImportStore.py @@ -138,8 +138,6 @@ class CanvasImportStore(): with open(pathName, "r", encoding="utf-8-sig") as inFile: return self.importTextBuffer(inFile) - # - # __init__(self, inFile=None): initialisation method def __init__(self, inFile=None): self.inSize, self.outMap = None, None if inFile != None: diff --git a/libcanvas/CanvasJournal.py b/libcanvas/CanvasJournal.py index 3c4356b..5f464e5 100644 --- a/libcanvas/CanvasJournal.py +++ b/libcanvas/CanvasJournal.py @@ -56,8 +56,6 @@ class CanvasJournal(): def __del__(self): self.resetCursor(); self.resetUndo(); - # - # __init__(self): initialisation method def __init__(self): self.patchesCursor, self.patchesUndo, self. patchesUndoLevel = None, None, None self.resetCursor(); self.resetUndo(); diff --git a/libgui/GuiCanvasWxBackend.py b/libgui/GuiCanvasWxBackend.py index 156d0d7..6aa5584 100644 --- a/libgui/GuiCanvasWxBackend.py +++ b/libgui/GuiCanvasWxBackend.py @@ -265,8 +265,6 @@ class GuiCanvasWxBackend(): self.canvasBitmap.Destroy(); self.canvasBitmap = None; self._finiBrushesAndPens() - # - # __init__(self, canvasSize, cellSize, fontName="Dejavu Sans Mono", fontPathName=os.path.join("assets", "fonts", "DejaVuSansMono.ttf")): initialisation method def __init__(self, canvasSize, cellSize, fontName="Dejavu Sans Mono", fontPathName=os.path.join("assets", "fonts", "DejaVuSansMono.ttf")): self._brushes, self._font, self._lastBrush, self._lastPen, self._pens = None, None, None, None, None self.canvasBitmap, self.cellSize, self.fontName, self.fontPathName = None, None, fontName, fontPathName diff --git a/libgui/GuiFrame.py b/libgui/GuiFrame.py index 074c41a..c33011f 100644 --- a/libgui/GuiFrame.py +++ b/libgui/GuiFrame.py @@ -191,8 +191,6 @@ class GuiFrame(wx.Frame): def onMouseWheel(self, event): event.Skip() - # - # __init__(self, iconPathName, size, parent=None, title=""): initialisation method def __init__(self, iconPathName, size, parent=None, title=""): super().__init__(parent, wx.ID_ANY, title, size=size) self.itemsById, self.menuItemsById, self.toolBarItemsById = {}, {}, {} @@ -204,8 +202,6 @@ class GuiFrame(wx.Frame): self.Bind(event, f) class GuiMiniFrame(wx.MiniFrame): - # - # __init__(self, parent, size, title, pos=wx.DefaultPosition): initialisation method def __init__(self, parent, size, title, pos=wx.DefaultPosition): super().__init__(parent, id=wx.ID_ANY, pos=pos, size=size, title=title) diff --git a/libgui/GuiWindow.py b/libgui/GuiWindow.py index 3bc9be3..bed0f4b 100644 --- a/libgui/GuiWindow.py +++ b/libgui/GuiWindow.py @@ -48,8 +48,6 @@ class GuiWindow(wx.ScrolledWindow): while curWindow != None: curWindow.Layout(); curWindow = curWindow.GetParent(); - # - # __init__(self, parent, pos, scrollStep, style=0): initialisation method def __init__(self, parent, pos, scrollStep, style=0): super().__init__(parent, pos=pos, style=style) if style != 0 else super().__init__(parent, pos=pos) self.parent = parent diff --git a/liboperators/Operator.py b/liboperators/Operator.py index d22d95e..e6f35df 100644 --- a/liboperators/Operator.py +++ b/liboperators/Operator.py @@ -5,12 +5,9 @@ # class Operator(object): - # - # apply(self, region) def apply(self, region): pass - # __init__(self, *args): initialisation method def __init__(self, *args): pass diff --git a/liboperators/OperatorFlipHorizontal.py b/liboperators/OperatorFlipHorizontal.py index 833c511..eb821c3 100644 --- a/liboperators/OperatorFlipHorizontal.py +++ b/liboperators/OperatorFlipHorizontal.py @@ -9,12 +9,9 @@ from Operator import Operator class OperatorFlipHorizontal(Operator): name = "Flip horizontally" - # - # apply(self, region) def apply(self, region): region.reverse(); return region; - # __init__(self, *args): initialisation method def __init__(self, *args): pass diff --git a/liboperators/OperatorFlipVertical.py b/liboperators/OperatorFlipVertical.py index 4f9235b..17752d0 100644 --- a/liboperators/OperatorFlipVertical.py +++ b/liboperators/OperatorFlipVertical.py @@ -17,8 +17,6 @@ class OperatorFlipVertical(Operator): "`":"'", } - # - # apply(self, region) def apply(self, region): for numRow in range(len(region)): region[numRow].reverse() @@ -27,7 +25,6 @@ class OperatorFlipVertical(Operator): region[numRow][numCol][3] = self.flipPairs[region[numRow][numCol][3]] return region - # __init__(self, *args): initialisation method def __init__(self, *args): pass diff --git a/liboperators/OperatorInvert.py b/liboperators/OperatorInvert.py index 009e7d1..446eb91 100644 --- a/liboperators/OperatorInvert.py +++ b/liboperators/OperatorInvert.py @@ -9,15 +9,12 @@ from Operator import Operator class OperatorInvert(Operator): name = "Invert colours" - # - # apply(self, region) def apply(self, region): for numRow in range(len(region)): for numCol in range(len(region[numRow])): region[numRow][numCol][0:2] = [(~r & (16 - 1) if r > 0 else r) for r in region[numRow][numCol][0:2]] return region - # __init__(self, *args): initialisation method def __init__(self, *args): pass diff --git a/liboperators/OperatorRotate.py b/liboperators/OperatorRotate.py index 7178a61..b71b4ff 100755 --- a/liboperators/OperatorRotate.py +++ b/liboperators/OperatorRotate.py @@ -10,8 +10,6 @@ import math class OperatorRotate(Operator): name = "Rotate" - # - # apply2(self, mapPoint, mousePoint, regionOld, region) def apply2(self, mapPoint, mousePoint, regionOld, region): if self.originPoint == None: self.originPoint = list(mousePoint) @@ -31,7 +29,6 @@ class OperatorRotate(Operator): else: return region - # __init__(self, *args): initialisation method def __init__(self, *args): self.originPoint = None diff --git a/liboperators/OperatorTile.py b/liboperators/OperatorTile.py index c4f7ef5..06d1949 100755 --- a/liboperators/OperatorTile.py +++ b/liboperators/OperatorTile.py @@ -10,8 +10,6 @@ import copy class OperatorTile(Operator): name = "Tile" - # - # apply2(self, mapPoint, mousePoint, regionOld, region) def apply2(self, mapPoint, mousePoint, regionOld, region): if self.lastPoint == None: self.lastPoint = list(mapPoint) @@ -32,7 +30,6 @@ class OperatorTile(Operator): self.lastPoint = list(mapPoint) return region - # __init__(self, *args): initialisation method def __init__(self, *args): self.lastPoint, self.tileObject = None, None diff --git a/libroar/RoarAssetsWindow.py b/libroar/RoarAssetsWindow.py index 28ade0e..65fdb9e 100644 --- a/libroar/RoarAssetsWindow.py +++ b/libroar/RoarAssetsWindow.py @@ -291,8 +291,6 @@ class RoarAssetsWindow(GuiMiniFrame): with wx.MessageDialog(self, "Error: {}".format(error), "", wx.OK | wx.OK_DEFAULT) as dialog: dialogChoice = dialog.ShowModal() - # - # __init__(self, backend, cellSize, parent, pos=None, size=(400, 400), title="Assets"): initialisation method def __init__(self, backend, cellSize, parent, pos=None, size=(400, 400), title="Assets"): if pos == None: parentRect = parent.GetScreenRect(); pos = (parentRect.x + parentRect.width, parentRect.y); diff --git a/libroar/RoarCanvasCommands.py b/libroar/RoarCanvasCommands.py index f645c47..1719e4f 100644 --- a/libroar/RoarCanvasCommands.py +++ b/libroar/RoarCanvasCommands.py @@ -105,8 +105,6 @@ class RoarCanvasCommands(RoarCanvasCommandsFile, RoarCanvasCommandsEdit, RoarCan toolBar = self.parentFrame.toolBarItemsById[self.canvasRedo.attrDict["id"]][0] toolBar.EnableTool(self.canvasRedo.attrDict["id"], False); toolBar.Refresh(); - # - # __init__(self, parentCanvas, parentFrame): def __init__(self, parentCanvas, parentFrame): accels, menus, toolBars = [], [], [] self.canvasPathName, self.lastPanelState, self.parentCanvas, self.parentFrame = None, {}, parentCanvas, parentFrame @@ -120,7 +118,6 @@ class RoarCanvasCommands(RoarCanvasCommandsFile, RoarCanvasCommandsEdit, RoarCan toolBars += self.toolBars self._initColourBitmaps() - # XXX toolBars.append( [self.canvasNew, self.canvasOpen, self.canvasSave, self.canvasSaveAs, NID_TOOLBAR_HSEP, self.canvasUndo, self.canvasRedo, NID_TOOLBAR_HSEP, diff --git a/libroar/RoarCanvasCommandsEdit.py b/libroar/RoarCanvasCommandsEdit.py index d8b497d..5418618 100644 --- a/libroar/RoarCanvasCommandsEdit.py +++ b/libroar/RoarCanvasCommandsEdit.py @@ -202,8 +202,6 @@ class RoarCanvasCommandsEdit(): self.parentCanvas.dispatchDeltaPatches(self.parentCanvas.canvas.journal.popUndo()) self.update(size=self.parentCanvas.canvas.size, undoLevel=self.parentCanvas.canvas.journal.patchesUndoLevel) - # - # __init__(self) def __init__(self): self.accels = ( (self.canvasColourBackground(self.canvasColourBackground, 0), self.canvasColourBackground(self.canvasColourBackground, 1), self.canvasColourBackground(self.canvasColourBackground, 2), self.canvasColourBackground(self.canvasColourBackground, 3), self.canvasColourBackground(self.canvasColourBackground, 4), self.canvasColourBackground(self.canvasColourBackground, 5), self.canvasColourBackground(self.canvasColourBackground, 6), self.canvasColourBackground(self.canvasColourBackground, 7), self.canvasColourBackground(self.canvasColourBackground, 8), self.canvasColourBackground(self.canvasColourBackground, 9), self.canvasColourBackground(self.canvasColourBackground, 10), self.canvasColourBackground(self.canvasColourBackground, 11), self.canvasColourBackground(self.canvasColourBackground, 12), self.canvasColourBackground(self.canvasColourBackground, 13), self.canvasColourBackground(self.canvasColourBackground, 14), self.canvasColourBackground(self.canvasColourBackground, 15), self.canvasColourAlphaBackground(self.canvasColourAlphaBackground, 0),), diff --git a/libroar/RoarCanvasCommandsFile.py b/libroar/RoarCanvasCommandsFile.py index aa8bb74..20fe3fb 100644 --- a/libroar/RoarCanvasCommandsFile.py +++ b/libroar/RoarCanvasCommandsFile.py @@ -273,8 +273,6 @@ class RoarCanvasCommandsFile(): if self.canvasSave(event, newDirty=True): self._pushRecent(self.canvasPathName) - # - # __init__(self) def __init__(self): self.imgurApiKey, self.lastFiles, self.lastDir = ImgurApiKey.imgurApiKey if haveImgurApiKey else None, [], None self.accels = () diff --git a/libroar/RoarCanvasCommandsHelp.py b/libroar/RoarCanvasCommandsHelp.py index 6c880df..f64718b 100644 --- a/libroar/RoarCanvasCommandsHelp.py +++ b/libroar/RoarCanvasCommandsHelp.py @@ -26,8 +26,6 @@ class RoarCanvasCommandsHelp(): def canvasVisitGitHub(self, event): webbrowser.open("https://www.github.com/lalbornoz/roar") - # - # __init__(self) def __init__(self): self.accels = () self.menus, self.toolBars = (("&Help", self.canvasMelp, NID_MENU_SEP, self.canvasNewIssueGitHub, self.canvasVisitGitHub, NID_MENU_SEP, self.canvasAbout,),), () diff --git a/libroar/RoarCanvasCommandsOperators.py b/libroar/RoarCanvasCommandsOperators.py index 66c9183..6890a10 100644 --- a/libroar/RoarCanvasCommandsOperators.py +++ b/libroar/RoarCanvasCommandsOperators.py @@ -27,8 +27,6 @@ class RoarCanvasCommandsOperators(): setattr(canvasOperator_, "attrDict", f.attrList[idx]) return canvasOperator_ - # - # __init__(self) def __init__(self): self.accels = () self.menus = ( diff --git a/libroar/RoarCanvasCommandsTools.py b/libroar/RoarCanvasCommandsTools.py index 588294c..3b4cf4e 100644 --- a/libroar/RoarCanvasCommandsTools.py +++ b/libroar/RoarCanvasCommandsTools.py @@ -49,8 +49,6 @@ class RoarCanvasCommandsTools(): setattr(canvasTool_, "isSelect", True) return canvasTool_ - # - # __init__(self) def __init__(self): self.accels = () self.menus = ( diff --git a/libroar/RoarCanvasWindow.py b/libroar/RoarCanvasWindow.py index fbc45e4..46a7166 100644 --- a/libroar/RoarCanvasWindow.py +++ b/libroar/RoarCanvasWindow.py @@ -283,8 +283,6 @@ class RoarCanvasWindow(GuiWindow): eventDc.SetDeviceOrigin(*eventDcOrigin) self.backend.onPaint(self.GetClientSize(), self, self.GetViewStart()) - # - # __init__(self, backend, canvas, cellSize, commands, parent, parentFrame, pos, scrollStep, size): initialisation method def __init__(self, backend, canvas, cellSize, commands, parent, parentFrame, pos, scrollStep, size): super().__init__(parent, pos, scrollStep) self.size = size diff --git a/libroar/RoarClient.py b/libroar/RoarClient.py index 044aae9..cc3572a 100644 --- a/libroar/RoarClient.py +++ b/libroar/RoarClient.py @@ -34,9 +34,7 @@ class RoarClient(GuiFrame): def onSize(self, event): self.canvasPanel.SetMinSize(self.GetSize()); self.canvasPanel.SetSize(wx.DefaultCoord, wx.DefaultCoord, *self.GetSize()); event.Skip(); - # - # __init__(self, parent, defaultCanvasPos=(0, 75), defaultCanvasSize=(100, 30), defaultCellSize=(7, 14), size=(840, 630), title=""): initialisation method - def __init__(self, parent, defaultCanvasPos=(0, 75), defaultCanvasSize=(100, 30), defaultCellSize=(7, 14), size=(840, 630), title=""): + def __init__(self, parent, defaultCanvasPos=(0, 75), defaultCanvasSize=(100, 30), defaultCellSize=(7, 14), size=(840, 640), title=""): super().__init__(self._getIconPathName(), size, parent, title) self.canvas = Canvas(defaultCanvasSize) self.canvasPanel = RoarCanvasWindow(GuiCanvasWxBackend, self.canvas, defaultCellSize, RoarCanvasCommands, self.panelSkin, self, defaultCanvasPos, defaultCellSize, defaultCanvasSize) @@ -52,7 +50,6 @@ class RoarClient(GuiFrame): self.assetsWindow = RoarAssetsWindow(GuiCanvasWxBackend, defaultCellSize, self) self.canvasPanel.commands.canvasAssetsWindowShow(None) - # XXX self.canvasPanel.operatorsMenu = wx.Menu() for menuItem in self.canvasPanel.commands.menus[3][1:]: menuItemWindow = self.canvasPanel.operatorsMenu.Append(menuItem.attrDict["id"], menuItem.attrDict["label"], menuItem.attrDict["caption"]) diff --git a/libroar/RoarWindowAbout.py b/libroar/RoarWindowAbout.py index 1ab8909..fa725e8 100644 --- a/libroar/RoarWindowAbout.py +++ b/libroar/RoarWindowAbout.py @@ -11,8 +11,6 @@ class RoarWindowAbout(wx.Dialog): def onButtonRoar(self, event): self.Destroy() - # - # __init__(self, parent, minSize=(320, 300), title="About roar") def __init__(self, parent, minSize=(320, 300), title="About roar"): super().__init__(parent, size=minSize, title=title) self.panel, self.sizer, self.sizerV = wx.Panel(self), wx.FlexGridSizer(2, 2, 4, 4), wx.BoxSizer(wx.VERTICAL) diff --git a/libroar/RoarWindowMelp.py b/libroar/RoarWindowMelp.py index ce7bc0e..702996e 100644 --- a/libroar/RoarWindowMelp.py +++ b/libroar/RoarWindowMelp.py @@ -10,8 +10,6 @@ class RoarWindowMelp(wx.Dialog): def onButtonRoar(self, event): self.Destroy() - # - # __init__(self, parent, minSize=(320, 300), title="melp?") def __init__(self, parent, minSize=(320, 300), title="melp?"): super().__init__(parent, size=minSize, title=title) self.panel, self.sizer = wx.Panel(self), wx.BoxSizer(wx.VERTICAL) diff --git a/librtl/IrcClient.py b/librtl/IrcClient.py index 051ab3e..57487fc 100644 --- a/librtl/IrcClient.py +++ b/librtl/IrcClient.py @@ -107,8 +107,6 @@ class IrcClient: del self.clientQueue[0] return True - # - # __init__(self, serverHname, serverPort, clientNick, clientIdent, clientGecos): initialisation method def __init__(self, serverHname, serverPort, clientNick, clientIdent, clientGecos): self.clientGecos, self.clientIdent, self.clientNick = clientGecos, clientIdent, clientNick self.clientNextTimeout, self.clientQueue, self.clientSocket, self.clientSocketFile = None, None, None, None diff --git a/libtools/ToolCircle.py b/libtools/ToolCircle.py index f2c0cc4..788183b 100644 --- a/libtools/ToolCircle.py +++ b/libtools/ToolCircle.py @@ -9,8 +9,6 @@ from Tool import Tool class ToolCircle(Tool): name = "Circle" - # - # onMouseEvent(self, atPoint, brushColours, brushPos, brushSize, canvas, dispatchFn, eventDc, keyModifiers, mapPoint, mouseDragging, mouseLeftDown, mouseRightDown) def onMouseEvent(self, atPoint, brushColours, brushPos, brushSize, canvas, dispatchFn, eventDc, keyModifiers, mapPoint, mouseDragging, mouseLeftDown, mouseRightDown): brushColours, brushSize, dirty = list(brushColours), [brushSize[0] * 2, brushSize[1]], False originPoint, radius = (brushSize[0] / 2, brushSize[0] / 2), brushSize[0] diff --git a/libtools/ToolErase.py b/libtools/ToolErase.py index 95e352d..c5200d0 100644 --- a/libtools/ToolErase.py +++ b/libtools/ToolErase.py @@ -9,8 +9,6 @@ from Tool import Tool class ToolErase(Tool): name = "Erase" - # - # onMouseEvent(self, atPoint, brushColours, brushPos, brushSize, canvas, dispatchFn, eventDc, keyModifiers, mapPoint, mouseDragging, mouseLeftDown, mouseRightDown) def onMouseEvent(self, atPoint, brushColours, brushPos, brushSize, canvas, dispatchFn, eventDc, keyModifiers, mapPoint, mouseDragging, mouseLeftDown, mouseRightDown): brushColours, brushSize, dirty = list(brushColours), list(brushSize), False if brushSize[0] > 1: diff --git a/libtools/ToolFill.py b/libtools/ToolFill.py index 1888c16..b520bb0 100644 --- a/libtools/ToolFill.py +++ b/libtools/ToolFill.py @@ -10,8 +10,6 @@ import wx class ToolFill(Tool): name = "Fill" - # - # onMouseEvent(self, atPoint, brushColours, brushPos, brushSize, canvas, dispatchFn, eventDc, keyModifiers, mapPoint, mouseDragging, mouseLeftDown, mouseRightDown) def onMouseEvent(self, atPoint, brushColours, brushPos, brushSize, canvas, dispatchFn, eventDc, keyModifiers, mapPoint, mouseDragging, mouseLeftDown, mouseRightDown): dirty, pointsDone, pointStack, testChar, testColour = False, [], [list(mapPoint)], canvas.map[mapPoint[1]][mapPoint[0]][3], canvas.map[mapPoint[1]][mapPoint[0]][0:2] if mouseLeftDown or mouseRightDown: diff --git a/libtools/ToolLine.py b/libtools/ToolLine.py index 2603ba5..e9a6baa 100644 --- a/libtools/ToolLine.py +++ b/libtools/ToolLine.py @@ -49,8 +49,6 @@ class ToolLine(Tool): def _pointSwap(self, a, b): return [b, a] - # - # onMouseEvent(self, atPoint, brushColours, brushPos, brushSize, canvas, dispatchFn, eventDc, keyModifiers, mapPoint, mouseDragging, mouseLeftDown, mouseRightDown) def onMouseEvent(self, atPoint, brushColours, brushPos, brushSize, canvas, dispatchFn, eventDc, keyModifiers, mapPoint, mouseDragging, mouseLeftDown, mouseRightDown): brushColours, dirty = brushColours.copy(), False if mouseLeftDown: @@ -74,7 +72,6 @@ class ToolLine(Tool): return False, dirty return True, dirty - # __init__(self, *args): initialisation method def __init__(self, *args): super().__init__(*args) self.toolOriginPoint, self.toolState = None, self.TS_NONE diff --git a/libtools/ToolObject.py b/libtools/ToolObject.py index 0637fa4..5aa9b01 100644 --- a/libtools/ToolObject.py +++ b/libtools/ToolObject.py @@ -168,7 +168,6 @@ class ToolObject(Tool): self.srcRect = self.targetRect self.objectMap, self.objectSize = objectMap, objectSize - # __init__(self, *args): initialisation method def __init__(self, *args): super().__init__(*args) self.external, self.lastAtPoint, self.srcRect, self.substract, \ diff --git a/libtools/ToolPickColour.py b/libtools/ToolPickColour.py index 6b1fac2..c94e70f 100644 --- a/libtools/ToolPickColour.py +++ b/libtools/ToolPickColour.py @@ -9,8 +9,6 @@ from Tool import Tool class ToolPickColour(Tool): name = "Pick colour" - # - # onMouseEvent(self, atPoint, brushColours, brushPos, brushSize, canvas, dispatchFn, eventDc, keyModifiers, mapPoint, mouseDragging, mouseLeftDown, mouseRightDown) def onMouseEvent(self, atPoint, brushColours, brushPos, brushSize, canvas, dispatchFn, eventDc, keyModifiers, mapPoint, mouseDragging, mouseLeftDown, mouseRightDown): if (mapPoint[0] < canvas.size[0]) \ and (mapPoint[1] < canvas.size[1]): diff --git a/libtools/ToolRect.py b/libtools/ToolRect.py index b36e8b1..d673b85 100644 --- a/libtools/ToolRect.py +++ b/libtools/ToolRect.py @@ -9,8 +9,6 @@ from Tool import Tool class ToolRect(Tool): name = "Rectangle" - # - # onMouseEvent(self, atPoint, brushColours, brushPos, brushSize, canvas, dispatchFn, eventDc, keyModifiers, mapPoint, mouseDragging, mouseLeftDown, mouseRightDown) def onMouseEvent(self, atPoint, brushColours, brushPos, brushSize, canvas, dispatchFn, eventDc, keyModifiers, mapPoint, mouseDragging, mouseLeftDown, mouseRightDown): brushColours, brushSize, dirty = list(brushColours), list(brushSize), False if mouseRightDown: diff --git a/libtools/ToolText.py b/libtools/ToolText.py index 3ddfd51..6566fa1 100644 --- a/libtools/ToolText.py +++ b/libtools/ToolText.py @@ -65,8 +65,6 @@ class ToolText(Tool): rc, dirty = False, False return rc, dirty - # - # onKeyboardEvent(self, atPoint, brushColours, brushPos, brushSize, canvas, dispatchFn, eventDc, keyChar, keyCode, keyModifiers, mapPoint) def onKeyboardEvent(self, atPoint, brushColours, brushPos, brushSize, canvas, dispatchFn, eventDc, keyChar, keyCode, keyModifiers, mapPoint): if re.match(self.arabicCombiningRegEx, keyChar): rc, dirty = True, False @@ -121,8 +119,6 @@ class ToolText(Tool): dispatchFn(eventDc, True, [*brushPos, *brushColours, 0, "_"]) return rc, dirty - # - # onMouseEvent(self, atPoint, brushColours, brushPos, brushSize, canvas, dispatchFn, eventDc, keyModifiers, mapPoint, mouseDragging, mouseLeftDown, mouseRightDown) def onMouseEvent(self, atPoint, brushColours, brushPos, brushSize, canvas, dispatchFn, eventDc, keyModifiers, mapPoint, mouseDragging, mouseLeftDown, mouseRightDown): if mouseLeftDown or mouseRightDown: brushPos[0], brushPos[1] = atPoint[0], atPoint[1]