Browse Source

python: fix platform.Application.Configuration.title property getter.

Discovered this only after generating the docs, the StringView return
wasn't handled correctly. The tech debt TODO still stands, I need to
create StringView bindings already.
pull/16/head
Vladimír Vondruš 4 years ago
parent
commit
716869599b
  1. 5
      src/python/magnum/platform/application.h

5
src/python/magnum/platform/application.h

@ -43,8 +43,11 @@ template<class T, class Trampoline, class Holder> void application(py::class_<T,
configuration
.def(py::init())
.def_property("title", &T::Configuration::title,
.def_property("title",
/** @todo drop std::string in favor of our own string caster */
[](typename T::Configuration& self) -> std::string {
return self.title();
},
[](typename T::Configuration& self, const std::string& title) {
self.setTitle(title);
}, "Window title")

Loading…
Cancel
Save