--- a/controls/CustomGrid.py Wed Mar 06 14:03:26 2013 +0900
+++ b/controls/CustomGrid.py Wed Mar 06 17:05:56 2013 +0900
@@ -92,9 +92,8 @@
else:
self.Table.InsertRow(new_row, self.DefaultValue.copy())
self.Table.ResetView(self)
- self.SetGridCursor(new_row, col)
- self.MakeCellVisible(new_row, col)
- self.RefreshButtons()
+ if new_row is not None:
+ self.SetSelectedRow(new_row)
def DeleteRow(self):
self.CloseEditControl()
@@ -106,10 +105,7 @@
else:
self.Table.RemoveRow(row)
self.Table.ResetView(self)
- new_row = min(row, self.Table.GetNumberRows() - 1)
- self.SetGridCursor(new_row, col)
- self.MakeCellVisible(new_row, col)
- self.RefreshButtons()
+ self.SetSelectedRow(min(row, self.Table.GetNumberRows() - 1))
def MoveRow(self, row, move):
self.CloseEditControl()
@@ -121,10 +117,14 @@
if new_row != row:
self.Table.ResetView(self)
if new_row != row:
- self.SetGridCursor(new_row, col)
- self.MakeCellVisible(new_row, col)
- self.RefreshButtons()
-
+ self.SetSelectedRow(new_row)
+
+ def SetSelectedRow(self, row):
+ col = self.GetGridCursorCol()
+ self.SetGridCursor(row, col)
+ self.MakeCellVisible(row, col)
+ self.RefreshButtons()
+
def OnAddButton(self, event):
self.AddRow()
self.SetFocus()
--- a/controls/DebugVariablePanel.py Wed Mar 06 14:03:26 2013 +0900
+++ b/controls/DebugVariablePanel.py Wed Mar 06 17:05:56 2013 +0900
@@ -1670,12 +1670,18 @@
panel.OnDragging(x_mouse - x, y_mouse - y)
else:
panel.SetHighlight(HIGHLIGHT_NONE)
- self.ForceRefresh()
+ if wx.Platform == "__WXMSW__":
+ self.RefreshView()
+ else:
+ self.ForceRefresh()
def ResetHighlight(self):
for panel in self.GraphicPanels:
panel.SetHighlight(HIGHLIGHT_NONE)
- self.ForceRefresh()
+ if wx.Platform == "__WXMSW__":
+ self.RefreshView()
+ else:
+ self.ForceRefresh()
def IsDragging(self):
return self.DraggingAxesPanel is not None