Fix unarchiving of BScrollView with layout

* We archive views using "managed" archives, and the children are not
attached in the BView(BMessage*) constructor, but later. So it's not
possible to find the target and scrollbars in the constructor of
BScrollView.
* Make BScrollView override AllUnarchived and find the target and
scrollbars again there. The code is slightly different as there is no
guarantee that the first child will be the target in that case. The
existing code in the constructor is preserved for non-managed archives.
This commit is contained in:
Adrien Destugues
2014-10-12 16:02:34 +02:00
parent 3b61a4b53d
commit bdb4ae32fd
2 changed files with 54 additions and 2 deletions
+1
View File
@@ -34,6 +34,7 @@ public:
static BArchivable* Instantiate(BMessage* archive);
virtual status_t Archive(BMessage* archive, bool deep = true) const;
virtual status_t AllUnarchived(const BMessage* archive);
// Hook methods
virtual void AllAttached();