request save on exit wip
This commit is contained in:
@@ -462,6 +462,7 @@ void ui::Canvas::stroke_commit()
|
||||
{
|
||||
if (!m_dirty || m_layers.empty())
|
||||
return;
|
||||
m_unsaved = true;
|
||||
m_dirty = false;
|
||||
m_dirty_stroke = true; // new stroke ready for timelapse capture
|
||||
App::I.redraw = true;
|
||||
@@ -805,6 +806,7 @@ bool ui::Canvas::create(int width, int height)
|
||||
}
|
||||
m_smask.create(width*2, height*2, "mask");
|
||||
m_smask.clear({1, 1, 1, 1});
|
||||
m_unsaved = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1452,6 +1454,7 @@ void ui::Canvas::project_save_thread(std::string file_path)
|
||||
pb->destroy();
|
||||
App::I.async_update();
|
||||
App::I.async_end();
|
||||
m_unsaved = false;
|
||||
}
|
||||
|
||||
void ui::Canvas::project_open(std::string file_path, std::function<void()> on_complete)
|
||||
@@ -1597,6 +1600,7 @@ void ui::Canvas::project_open_thread(std::string file_path)
|
||||
gl.restore();
|
||||
App::I.async_end();
|
||||
}
|
||||
m_unsaved = false;
|
||||
}
|
||||
|
||||
ui::Image ui::Canvas::thumbnail_generate(int w, int h)
|
||||
|
||||
Reference in New Issue
Block a user