bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #40776] NSClipView should redraw when bounds change


From: Jeff Teunissen
Subject: [bug #40776] NSClipView should redraw when bounds change
Date: Sun, 08 Dec 2013 19:29:28 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20131101 Firefox/24.0 Iceweasel/24.1.0

Follow-up Comment #6, bug #40776 (project gnustep):

Indeed, -documentVisibleRect is in the document view's coordinate system, I
failed to notice that when I replaced [self setNeedsDisplay: YES] with it, and
it still /seemed to/ work correctly, so I left it alone.

If you want to only redraw the whole clip view when the document view shrinks,
then one could do

:
:
NSRect oldBounds = [self bounds];
[super setBounds: b];
if (NSContainsRect(b, oldBounds))
  {
    [_documentView setNeedsDisplayInRect: [self documentVisibleRect]];
  }
else
  {
    [self setNeedsDisplay: YES];
  }
:
:

but that may be overkill, and just easier to always redraw when the bounds
change.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?40776>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]