[DEBUG] when remove a pop up composer, the composer widget is not removed ... add property to do it
This commit is contained in:
parent
c2b77dea53
commit
7bddada9b8
@ -16,7 +16,8 @@
|
||||
#undef __class__
|
||||
#define __class__ "ewol::widget::Composer"
|
||||
|
||||
ewol::widget::Composer::Composer() {
|
||||
ewol::widget::Composer::Composer() :
|
||||
propertyRemoveIfUnderRemove(this, "remove-if-under-remove", true, "Demand the remove iof the widget if the subObject demand a remove") {
|
||||
addObjectType("ewol::widget::Composer");
|
||||
// nothing to do ...
|
||||
}
|
||||
@ -129,3 +130,11 @@ bool ewol::widget::Composer::loadFromString(const std::string& _composerXmlStrin
|
||||
requestUpdateSize();
|
||||
return true;
|
||||
}
|
||||
|
||||
void ewol::widget::Composer::requestDestroyFromChild(const ewol::ObjectShared& _child) {
|
||||
ewol::widget::Container::requestDestroyFromChild(_child);
|
||||
if (*propertyRemoveIfUnderRemove == true) {
|
||||
EWOL_DEBUG("Child widget remove ==> auto-remove");
|
||||
autoDestroy();
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,8 @@ namespace ewol {
|
||||
* @brief the composer widget is a widget that create a link on a string.file to parse the data and generate some widget tree
|
||||
*/
|
||||
class Composer : public ewol::widget::Container {
|
||||
public:
|
||||
eproperty::Value<bool> propertyRemoveIfUnderRemove; //!< Remove the composer if sub element request a remove
|
||||
protected:
|
||||
/**
|
||||
* @brief Constructor
|
||||
@ -46,6 +48,8 @@ namespace ewol {
|
||||
* @return false == > some error occured
|
||||
*/
|
||||
bool loadFromString(const std::string& _composerXmlString);
|
||||
private:
|
||||
void requestDestroyFromChild(const ewol::ObjectShared& _child) override;
|
||||
};
|
||||
ewol::WidgetShared composerGenerateString(const std::string& _data = "");
|
||||
ewol::WidgetShared composerGenerateFile(const std::string& _data = "");
|
||||
|
Loading…
x
Reference in New Issue
Block a user