fix manager assignment

This commit is contained in:
2019-09-26 19:49:57 +02:00
parent 13b2f6eb07
commit 755e1ff856
12 changed files with 44 additions and 43 deletions

View File

@@ -17,7 +17,7 @@
std::shared_ptr<NodeProgressBar> App::show_progress(const std::string& title, int total /*= 0*/)
{
auto pb = std::make_shared<NodeProgressBar>();
pb->m_manager = &layout;
pb->set_manager(&layout);
pb->init();
pb->create();
pb->loaded();
@@ -32,7 +32,7 @@ std::shared_ptr<NodeProgressBar> App::show_progress(const std::string& title, in
std::shared_ptr<NodeMessageBox> App::message_box(const std::string &title, const std::string& text, bool cancel_button)
{
auto m = std::make_shared<NodeMessageBox>();
m->m_manager = &layout;
m->set_manager(&layout);
m->init();
m->create();
m->loaded();
@@ -49,7 +49,7 @@ std::shared_ptr<NodeInputBox> App::input_box(const std::string& title,
const std::string& field_name, const std::string& ok_caption /*= "Ok"*/)
{
auto m = std::make_shared<NodeInputBox>();
m->m_manager = &layout;
m->set_manager(&layout);
m->init();
m->create();
m->loaded();
@@ -63,7 +63,7 @@ std::shared_ptr<NodeInputBox> App::input_box(const std::string& title,
void App::dialog_usermanual()
{
auto dialog = std::make_shared<NodeUserManual>();
dialog->m_manager = &layout;
dialog->set_manager(&layout);
dialog->init();
dialog->create();
dialog->loaded();
@@ -74,7 +74,7 @@ void App::dialog_usermanual()
void App::dialog_changelog()
{
auto dialog = std::make_shared<NodeChangelog>();
dialog->m_manager = &layout;
dialog->set_manager(&layout);
dialog->init();
dialog->create();
dialog->loaded();
@@ -85,7 +85,7 @@ void App::dialog_changelog()
void App::dialog_about()
{
auto dialog = std::make_shared<NodeAbout>();
dialog->m_manager = &layout;
dialog->set_manager(&layout);
dialog->init();
dialog->create();
dialog->loaded();
@@ -97,7 +97,7 @@ void App::dialog_newdoc()
{
auto show_dialog = [this] {
auto dialog = std::make_shared<NodeDialogNewDoc>();
dialog->m_manager = &layout;
dialog->set_manager(&layout);
dialog->init();
dialog->create();
dialog->loaded();
@@ -146,7 +146,7 @@ void App::dialog_newdoc()
{
// ask confirm is file already exist
auto msgbox = new NodeMessageBox();
msgbox->m_manager = &layout;
msgbox->set_manager(&layout);
msgbox->init();
msgbox->m_title->set_text("Warning");
msgbox->m_message->set_text("A document with this name already exists, continue?");
@@ -205,7 +205,7 @@ void App::dialog_open()
auto show_dialog = [this] {
// load thumbnail test
auto dialog = std::make_shared<NodeDialogOpen>();
dialog->m_manager = &layout;
dialog->set_manager(&layout);
dialog->init();
dialog->create();
dialog->loaded();
@@ -265,7 +265,7 @@ void App::dialog_browse()
auto show_dialog = [this] {
// load thumbnail test
auto dialog = std::make_shared<NodeDialogBrowse>();
dialog->m_manager = &layout;
dialog->set_manager(&layout);
#ifdef __IOS__
dialog->search_paths = {work_path, data_path + "/Inbox"};
#else
@@ -365,7 +365,7 @@ void App::dialog_save()
if (canvas)
{
auto dialog = std::make_shared<NodeDialogSave>();
dialog->m_manager = &layout;
dialog->set_manager(&layout);
dialog->init();
dialog->create();
dialog->loaded();
@@ -398,7 +398,7 @@ void App::dialog_save()
{
// ask confirm is file already exist
auto msgbox = new NodeMessageBox();
msgbox->m_manager = &layout;
msgbox->set_manager(&layout);
msgbox->init();
msgbox->m_title->set_text("Warning");
msgbox->m_message->set_text(("Are you sure you want to overwrite " + name + "?").c_str());
@@ -505,7 +505,7 @@ void App::dialog_export_depth()
void App::dialog_resize()
{
auto dialog = std::make_shared<NodeDialogResize>();
dialog->m_manager = &layout;
dialog->set_manager(&layout);
dialog->init();
dialog->create();
dialog->loaded();
@@ -542,7 +542,7 @@ void App::dialog_export_cube_faces()
void App::dialog_layer_rename()
{
auto dialog = std::make_shared<NodeDialogLayerRename>();
dialog->m_manager = &layout;
dialog->set_manager(&layout);
dialog->init();
dialog->create();
dialog->loaded();