From 7db8d81ec0c3282a8f52ad80f00000dd8908f82f Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Tue, 30 Nov 2010 16:37:37 +0200 Subject: [PATCH] Removed niki's workaround in CharEditor editboxes since it causes unwanted behaviour on wxgtk/msw (workaround was for wxMac: the pasted text preserves color/font attribs) --- gui/characterEditor.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/gui/characterEditor.py b/gui/characterEditor.py index 615648bf6..189ae27e2 100644 --- a/gui/characterEditor.py +++ b/gui/characterEditor.py @@ -504,7 +504,6 @@ class APIView (wx.Panel): wx.Panel.__init__ (self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.Size(500, 300), style=wx.TAB_TRAVERSAL) self.Parent.Parent.Bind(CHAR_CHANGED, self.charChanged) pmainSizer = wx.BoxSizer(wx.VERTICAL) - self.removing = False fgSizerInput = wx.FlexGridSizer(3, 2, 0, 0) fgSizerInput.AddGrowableCol(1) @@ -516,7 +515,6 @@ class APIView (wx.Panel): fgSizerInput.Add(self.m_staticIDText, 0, wx.ALL | wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL, 5) self.inputID = wx.TextCtrl(self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0) - self.inputID.Bind(wx.EVT_TEXT, self.removeStyle) fgSizerInput.Add(self.inputID, 1, wx.ALL | wx.EXPAND, 5) self.m_staticKeyText = wx.StaticText(self, wx.ID_ANY, u"API key:", wx.DefaultPosition, wx.DefaultSize, 0) @@ -524,7 +522,6 @@ class APIView (wx.Panel): fgSizerInput.Add(self.m_staticKeyText, 0, wx.ALL | wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL, 5) self.inputKey = wx.TextCtrl(self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0) - self.inputKey.Bind(wx.EVT_TEXT, self.removeStyle) fgSizerInput.Add(self.inputKey, 0, wx.ALL | wx.EXPAND, 5) pmainSizer.Add(fgSizerInput, 0, wx.EXPAND, 5) @@ -560,19 +557,6 @@ class APIView (wx.Panel): self.Layout() self.charChanged(None) - def removeStyle(self, event): - if self.removing: - return - - self.removing = True - object = event.GetEventObject() - value = object.GetLineText(0) - object.Clear() - object.ChangeValue(value) - object.SetModified(True) - self.removing = False - event.Skip() - def charChanged(self, event): cChar = service.Character.getInstance() ID, key = cChar.getApiDetails(self.Parent.Parent.getActiveCharacter())