[haiku-commits] Re: r37939 - haiku/trunk/src/servers/app

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 06 Aug 2010 18:28:33 +0200

On 2010-08-06 at 18:06:55 [+0200], Michael Pfeiffer 
<michael.w.pfeiffer@xxxxxxxxx> wrote:
> 
> Am 06.08.2010 um 17:59 schrieb Stephan Assmus:
> 
> > 
> > On 2010-08-06 at 14:21:34 [+0200], michael.w.pfeiffer@xxxxxxxxx wrote:
> >> Author: laplace
> >> Date: 2010-08-06 14:21:34 +0200 (Fri, 06 Aug 2010)
> >> New Revision: 37939
> > 
> >> @@ -2783,17 +2783,14 @@
> >>             if (link.Read<BPoint>(&where) == B_OK) {
> >>                 ServerPicture* picture = App()->GetPicture(token);
> >>                 if (picture != NULL) {
> >> -                    // Setting the drawing origin outside of the
> >> -                    // state makes sure that everything the picture
> >> -                    // does is relative to the global picture offset.
> >> -                    BPoint origin = fCurrentView->DrawingOrigin();
> >> +                    fCurrentView->PushState();
> > 
> > Please add the comment back. It was put there, because someone thought the
> > code could be simplified in the past, i.e. what the code does it not 
> > obvious
> > to the casual reader.
> 
> I will do if you confirm that the comment is still valid after my change.

It should be still valid. That you have to push another state just means that 
the origin shall be affected by the current offset, not overwrite it. And now 
it's also affected by the current scale, which seems correct to me.

Best regards,
-Stephan

Other related posts: