conditional os in UI xml, add system dialog file open on osx, check api format or error message when opening a document, per-char text wrap on NodeText, additional info on create doc dialog like working path

This commit is contained in:
2018-10-06 14:20:07 +02:00
parent 5baa807cce
commit 739784b0d1
23 changed files with 161 additions and 63 deletions

View File

@@ -1,5 +1,6 @@
#include "pch.h"
#include "app.h"
#include "action.h"
#include "node_dialog_open.h"
#include "node_dialog_browse.h"
#include "node_dialog_resize.h"
@@ -167,6 +168,7 @@ void App::dialog_newdoc()
}
}
// DEPRECATED
void App::dialog_open()
{
auto show_dialog = [this] {
@@ -184,19 +186,19 @@ void App::dialog_open()
dialog->btn_ok->on_click = [this, dialog](Node*)
{
canvas->reset_camera();
layers->clear();
doc_name = dialog->selected_name;
canvas->m_canvas->project_open(dialog->selected_path, [this] {
// on complete
async_start();
title_update();
for (auto& i : canvas->m_canvas->m_order)
layers->add_layer(canvas->m_canvas->m_layers[i].m_name.c_str());
async_end();
});
dialog->destroy();
ActionManager::clear();
// canvas->reset_camera();
// layers->clear();
// doc_name = dialog->selected_name;
// canvas->m_canvas->project_open(dialog->selected_path, [this](bool success) {
// // on complete
// async_start();
// title_update();
// for (auto& i : canvas->m_canvas->m_order)
// layers->add_layer(canvas->m_canvas->m_layers[i].m_name.c_str());
// async_end();
// });
// dialog->destroy();
// ActionManager::clear();
};
async_end();
};
@@ -410,6 +412,7 @@ void App::dialog_resize()
if (canvas)
canvas->m_canvas->resize(res, res);
App::I.title_update();
ActionManager::clear();
dialog->destroy();
};