--- a/etherlab/ConfigEditor.py Tue May 21 16:03:40 2013 +0900
+++ b/etherlab/ConfigEditor.py Mon Jun 03 08:24:08 2013 +0200
@@ -818,20 +818,23 @@
def RefreshStartupCommands(self, position=None, command_idx=None):
if self.CurrentNodesFilter is not None:
+ col = max(self.StartupCommandsGrid.GetGridCursorCol(), 0) self.StartupCommandsTable.SetData(
self.Controler.GetStartupCommands(**self.CurrentNodesFilter))
self.StartupCommandsTable.ResetView(self.StartupCommandsGrid)
if position is not None and command_idx is not None:
- wx.CallAfter(self.SelectStartupCommand, position, command_idx)
+ self.SelectStartupCommand(position, command_idx, col) - def SelectStartupCommand(self, position, command_idx):
- self.StartupCommandsGrid.SetSelectedRow(
- self.StartupCommandsTable.GetCommandIndex(position, command_idx))
+ def SelectStartupCommand(self, position, command_idx, col): + self.StartupCommandsGrid.SetSelectedCell( + self.StartupCommandsTable.GetCommandIndex(position, command_idx), def GetMasterLocation(self):
return self.Controler.GetCurrentLocation()
def AddStartupCommand(self, position, index, subindex):
+ col = max(self.StartupCommandsGrid.GetGridCursorCol(), 0) command = self.StartupCommandsDefaultValue.copy()
command["Position"] = position
@@ -839,8 +842,7 @@
command_idx = self.Controler.AppendStartupCommand(command)
self.RefreshStartupCommands()
- self.StartupCommandsGrid.SetSelectedRow(
- self.StartupCommandsTable.GetCommandIndex(position, command_idx))
+ self.SelectStartupCommand(position, command_idx, col) def OnNodesFilterChanged(self, event):
self.RefreshCurrentNodesFilter()