implement save request on OSX, add Quick Look extentions
This commit is contained in:
@@ -33,7 +33,9 @@ void App::create()
|
||||
bool App::request_close()
|
||||
{
|
||||
static bool dialog_already_opened = false;
|
||||
if (ui::Canvas::I->m_unsaved && !dialog_already_opened)
|
||||
if (!ui::Canvas::I->m_unsaved)
|
||||
return true;
|
||||
if (!dialog_already_opened)
|
||||
{
|
||||
async_start();
|
||||
auto* m = layout[main_id]->add_child<NodeMessageBox>();
|
||||
@@ -43,9 +45,15 @@ bool App::request_close()
|
||||
m->btn_ok->on_click = [](Node*) {
|
||||
};
|
||||
m->btn_cancel->m_text->set_text("No");
|
||||
m->btn_cancel->on_click = [](Node*) {
|
||||
m->btn_cancel->on_click = [this](Node*) {
|
||||
#ifdef _WIN32
|
||||
destroy_window();
|
||||
PostQuitMessage(0);
|
||||
#endif
|
||||
#ifdef __OSX__
|
||||
[osx_view close];
|
||||
#endif
|
||||
ui::Canvas::I->m_unsaved = false;
|
||||
};
|
||||
async_redraw();
|
||||
async_end();
|
||||
|
||||
Reference in New Issue
Block a user