- Revision
- 11428
- Author
- jeffrey
- Date
- 2006-08-16 15:55:06 -0700 (Wed, 16 Aug 2006)
Log Message
- Fix for bug 5530, calendar scroll position not persisted, r=john
Modified Paths
Diff
Modified: trunk/chandler/application/Utility.py (11427 => 11428)
--- trunk/chandler/application/Utility.py 2006-08-16 22:53:35 UTC (rev 11427) +++ trunk/chandler/application/Utility.py 2006-08-16 22:55:06 UTC (rev 11428) @@ -33,7 +33,7 @@ # with your name (and some helpful text). The comment's really there just to # cause Subversion to warn you of a conflict when you update, in case someone # else changes it at the same time you do (that's why it's on the same line). -SCHEMA_VERSION = "233" # stearns: ContentItems own reminders now +SCHEMA_VERSION = "234" # jeffrey: Add ScrollY to TimedEventCanvas logger = None # initialized in initLogging()
Modified: trunk/chandler/parcels/osaf/framework/blocks/calendar/CalendarCanvas.py (11427 => 11428)
--- trunk/chandler/parcels/osaf/framework/blocks/calendar/CalendarCanvas.py 2006-08-16 22:53:35 UTC (rev 11427) +++ trunk/chandler/parcels/osaf/framework/blocks/calendar/CalendarCanvas.py 2006-08-16 22:55:06 UTC (rev 11428) @@ -1291,9 +1291,10 @@ def OnInit(self): super(wxCalendarCanvas, self).OnInit() self.editor = wxInPlaceEditor(self, defocusCallback=self.SetPanelFocus) - + def OnScroll(self, event): self.Refresh() + self.blockItem.scrollY = self.GetViewStart()[1] event.Skip() def OnSelectItem(self, item):
Modified: trunk/chandler/parcels/osaf/framework/blocks/calendar/TimedCanvas.py (11427 => 11428)
--- trunk/chandler/parcels/osaf/framework/blocks/calendar/TimedCanvas.py 2006-08-16 22:53:35 UTC (rev 11427) +++ trunk/chandler/parcels/osaf/framework/blocks/calendar/TimedCanvas.py 2006-08-16 22:55:06 UTC (rev 11428) @@ -34,6 +34,8 @@ class TimedEventsCanvas(CalendarBlock): + scrollY = schema.One(schema.Integer, initialValue = -1) + def render(self, *args, **kwds): super(TimedEventsCanvas, self).render(*args, **kwds) @@ -90,6 +92,14 @@ self.orderLast = [] def wxSynchronizeWidget(self, useHints=False): + scrollY = self.blockItem.scrollY + if scrollY < 0: + # A scrollY value of -1 (it's initial value) is used as way to + # specify a scroll position of 6AM, which is difficult to calculate + # during repository creation time because it depends on runtime + # window sizes. + scrollY = (self.hourHeight * 6) / self.GetScrollPixelsPerUnit()[1] + self.Scroll(0, scrollY) currentRange = self.GetCurrentDateRange() self._doDrawingCalculations()
_______________________________________________ Commits mailing list [email protected] http://lists.osafoundation.org/mailman/listinfo/commits
