Fix bug when adjusting block size, block informations was not saved when using control + shift + double click
--- a/editors/Viewer.py Thu Oct 25 19:59:06 2012 +0200
+++ b/editors/Viewer.py Fri Oct 26 11:14:48 2012 +0200
@@ -1567,10 +1567,9 @@
def OnAdjustBlockSizeMenu(self, event):
if self.SelectedElement is not None:
movex, movey = self.SelectedElement.SetBestSize(self.Scaling)
- self.SelectedElement.RefreshModel()
- self.RefreshBuffer()
- if movex != 0 or movey != 0:
- self.RefreshRect(self.GetScrolledRect(self.SelectedElement.GetRedrawRect(movex, movey)), False)
+ self.SelectedElement.RefreshModel(True)
+ self.RefreshBuffer()
+ self.RefreshRect(self.GetScrolledRect(self.SelectedElement.GetRedrawRect(movex, movey)), False)
def OnDeleteMenu(self, event):
if self.SelectedElement is not None:
@@ -1896,10 +1895,9 @@
self.SelectedElement.OnLeftDClick(event, self.GetLogicalDC(), self.Scaling)
elif event.ControlDown() and event.ShiftDown():
movex, movey = self.SelectedElement.SetBestSize(self.Scaling)
- if movex != 0 or movey != 0:
- self.SelectedElement.RefreshModel()
- self.RefreshBuffer()
- self.RefreshRect(self.GetScrolledRect(self.SelectedElement.GetRedrawRect(movex, movey)), False)
+ self.SelectedElement.RefreshModel()
+ self.RefreshBuffer()
+ self.RefreshRect(self.GetScrolledRect(self.SelectedElement.GetRedrawRect(movex, movey)), False)
else:
self.SelectedElement.OnLeftDClick(event, self.GetLogicalDC(), self.Scaling)
event.Skip()