About the last changes in the Viewport class

Hi Jules,
with the latest tip, in Viewport::updateVisibleArea() you added at line 225:

        visibleOrigin.setX (0);

and at line 238:

        visibleOrigin.setY (0);

This is giving me some headaches, since I’m using a viewport with invisible scrollbars and I need to set its viewed positions from outside.

…ok, but if it’s not got scrollbars, and if you’re setting the position externally, why are you using a Viewport at all? Couldn’t you do the same thing by just putting one component inside another and moving it around?

Yes, I suppose I can do that.
Could you add a comment in setViewPosition informing that the method will always set the position to 0 if the scrollbars aren’t visible?

In fact, it should probably do this:

else if (canShowHBar) { visibleOrigin.setX (0); }

…so it’d probably work for you. But if you don’t want anything else to mess with the position of your content, a viewport’s probably not the right kind of container for it.

Well, this last solution would be perfect, so I wouldn’t lose the autoScroll functionality.

Erm… sorry to bother you again,
I just tried the last additions and now I’m getting an invalid rectangle when overriding visibleAreaChanged.
The viewport that overrides visibleAreaChanged has visible scrollbars.

Ok, I’ll take a look.

No… can’t see anything wrong with that, it looks to me like it’s just going to be returning the same coords it always did. Can you be more specific?

Argh! Sorry, my fault, I didn’t clean up the project before rebuilding it!
I was getting a segfault when trying to access the Rectangle’s coordinates…
Again, sorry and thank you for your time.