--- a/Beremiz.py Thu Apr 04 11:13:28 2013 +0900
+++ b/Beremiz.py Fri Apr 05 00:56:54 2013 +0200
@@ -254,7 +254,9 @@
if style is None : style=self.black_white
if style != self.black_white:
self.output.StartStyling(self.output.GetLength(), 0xff)
+ self.output.SetReadOnly(False) + self.output.SetReadOnly(True) if style != self.black_white:
self.output.SetStyling(len(s), style)
@@ -400,6 +402,10 @@
self.LogConsole = wx.stc.StyledTextCtrl(id=ID_BEREMIZLOGCONSOLE,
name='LogConsole', parent=self.BottomNoteBook, pos=wx.Point(0, 0),
+ self.LogConsole.Bind(wx.EVT_SET_FOCUS, self.OnLogConsoleFocusChanged) + self.LogConsole.Bind(wx.EVT_KILL_FOCUS, self.OnLogConsoleFocusChanged) + self.LogConsole.Bind(wx.stc.EVT_STC_UPDATEUI, self.OnLogConsoleUpdateUI) + self.LogConsole.SetReadOnly(True) self.LogConsole.SetWrapMode(wx.stc.STC_WRAP_CHAR)
# Define Log Console styles
@@ -560,6 +566,15 @@
InspectionTool().Show(wnd, True)
+ def OnLogConsoleFocusChanged(self, event): + def OnLogConsoleUpdateUI(self, event): + self.SetCopyBuffer(self.LogConsole.GetSelectedText(), True) def OnLogConsoleMarginClick(self, event):
line_idx = self.LogConsole.LineFromPosition(event.GetPosition())
wx.CallAfter(self.SearchLineForError, self.LogConsole.GetLine(line_idx))
@@ -762,6 +777,9 @@
def RefreshEditMenu(self):
IDEFrame.RefreshEditMenu(self)
+ if self.FindFocus() == self.LogConsole: + self.EditMenu.Enable(wx.ID_COPY, True) + self.Panes["MenuToolBar"].EnableTool(wx.ID_COPY, True) selected = self.TabsOpened.GetSelection()
--- a/IDEFrame.py Thu Apr 04 11:13:28 2013 +0900
+++ b/IDEFrame.py Fri Apr 05 00:56:54 2013 +0200
@@ -717,7 +717,7 @@
def SelectTab(self, tab):
for notebook in [self.LeftNoteBook, self.BottomNoteBook, self.RightNoteBook]:
idx = notebook.GetPageIndex(tab)
- if idx != wx.NOT_FOUND:
+ if idx != wx.NOT_FOUND and idx != notebook.GetSelection(): notebook.SetSelection(idx)
@@ -879,8 +879,13 @@
- def GetCopyBuffer(self):
+ def GetCopyBuffer(self, primary_selection=False): + if wx.Platform != '__WXMSW__': + wx.TheClipboard.UsePrimarySelection(primary_selection) if wx.TheClipboard.Open():
dataobj = wx.TextDataObject()
if wx.TheClipboard.GetData(dataobj):
@@ -888,7 +893,12 @@
- def SetCopyBuffer(self, text):
+ def SetCopyBuffer(self, text, primary_selection=False): + if wx.Platform != '__WXMSW__': + wx.TheClipboard.UsePrimarySelection(primary_selection) if wx.TheClipboard.Open():
data = wx.TextDataObject()
--- a/controls/VariablePanel.py Thu Apr 04 11:13:28 2013 +0900
+++ b/controls/VariablePanel.py Fri Apr 05 00:56:54 2013 +0200
@@ -667,8 +667,7 @@
self.Controler.UpdateEditedElementUsedVariable(self.TagName, old_value, value)
self.Controler.BufferProject()
wx.CallAfter(self.ParentWindow.RefreshView, False)
- self.ParentWindow._Refresh(TITLE, FILEMENU, EDITMENU, PAGETITLES, POUINSTANCEVARIABLESPANEL, LIBRARYTREE)
+ self.ParentWindow._Refresh(TITLE, FILEMENU, EDITMENU, PAGETITLES, POUINSTANCEVARIABLESPANEL, LIBRARYTREE) --- a/xmlclass/xmlclass.py Thu Apr 04 11:13:28 2013 +0900
+++ b/xmlclass/xmlclass.py Fri Apr 05 00:56:54 2013 +0200
@@ -1669,6 +1669,8 @@
raise ValueError("Wrong path!")
if attributes[parts[0]]["attr_type"]["basename"] == "boolean":
setattr(self, parts[0], value)
+ elif attributes[parts[0]]["use"] == "optional" and value == "": + setattr(self, parts[0], None) setattr(self, parts[0], attributes[parts[0]]["attr_type"]["extract"](value, False))
elif elements.has_key(parts[0]):
@@ -1677,6 +1679,8 @@
raise ValueError("Wrong path!")
if elements[parts[0]]["elmt_type"]["basename"] == "boolean":
setattr(self, parts[0], value)
+ elif attributes[parts[0]]["minOccurs"] == 0 and value == "": + setattr(self, parts[0], None) setattr(self, parts[0], elements[parts[0]]["elmt_type"]["extract"](value, False))