]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/dropdown.cpp
Use DerivedObjectLoader for widget loaders
[libs/gltk.git] / source / dropdown.cpp
index fcf35babdf132234476f9989eeac7c37a83a583e..ee8ec55b7d1e8d46874e42deb82c947fa4d02ca4 100644 (file)
@@ -162,14 +162,14 @@ void Dropdown::list_item_selected(unsigned index)
 
 
 Dropdown::Loader::Loader(Dropdown &d):
-       Widget::Loader(d)
+       DataFile::DerivedObjectLoader<Dropdown, Widget::Loader>(d)
 {
        add("item", &Loader::item);
 }
 
 void Dropdown::Loader::item(const string &v)
 {
-       dynamic_cast<BasicListData<string> &>(dynamic_cast<Dropdown &>(obj).list.get_data()).append(v);
+       dynamic_cast<BasicListData<string> &>(obj.list.get_data()).append(v);
 }
 
 } // namespace GLtk