untabify
This commit is contained in:
@@ -254,7 +254,7 @@ public:
|
||||
void dialog_export(std::string ext);
|
||||
void dialog_export_layers();
|
||||
void dialog_export_depth();
|
||||
void dialog_export_cube_faces();
|
||||
void dialog_export_cube_faces();
|
||||
void dialog_layer_rename();
|
||||
void dialog_resize();
|
||||
void dialog_preset_download();
|
||||
|
||||
@@ -539,8 +539,8 @@ void App::dialog_resize()
|
||||
|
||||
void App::dialog_export_cube_faces()
|
||||
{
|
||||
if (canvas)
|
||||
{
|
||||
if (canvas)
|
||||
{
|
||||
canvas->m_canvas->export_cube_faces(doc_name, [this] {
|
||||
#if defined(__IOS__)
|
||||
message_box("Export Cube Faces", "Image and depth exported to Files/PanoPainter");
|
||||
|
||||
@@ -22,7 +22,7 @@ void App::title_update()
|
||||
|
||||
void App::init_toolbar_main()
|
||||
{
|
||||
if (auto* button = layout[main_id]->find<NodeButton>("btn-anim"))
|
||||
if (auto* button = layout[main_id]->find<NodeButton>("btn-anim"))
|
||||
{
|
||||
button->on_click = [this, button](Node*) {
|
||||
if (canvas)
|
||||
|
||||
@@ -2125,8 +2125,8 @@ bool Canvas::project_save_thread(std::string file_path, bool show_progress)
|
||||
|
||||
auto start = file_path.rfind('/') + 1;
|
||||
std::string file_name = file_path.substr(start, file_path.length() - start - strlen(".ppi"));
|
||||
std::string tmp_path = App::I->data_path + '/' + file_name + ".tmp.ppi";
|
||||
std::string lapse_path = App::I->data_path + '/' + file_name + ".pptl";
|
||||
std::string tmp_path = App::I->data_path + '/' + file_name + ".tmp.ppi";
|
||||
std::string lapse_path = App::I->data_path + '/' + file_name + ".pptl";
|
||||
|
||||
LOG("file name %s", file_name.c_str());
|
||||
LOG("tmp path %s", tmp_path.c_str());
|
||||
@@ -2312,21 +2312,21 @@ bool Canvas::project_save_thread(std::string file_path, bool show_progress)
|
||||
m_unsaved = false;
|
||||
m_newdoc = false;
|
||||
|
||||
// save timelapse
|
||||
if (Canvas::I->m_encoder)
|
||||
{
|
||||
BinaryStreamWriter sw;
|
||||
sw.init(BinaryStream::ByteOrder::LittleEndian);
|
||||
// save timelapse
|
||||
if (Canvas::I->m_encoder)
|
||||
{
|
||||
BinaryStreamWriter sw;
|
||||
sw.init(BinaryStream::ByteOrder::LittleEndian);
|
||||
Serializer::Descriptor info;
|
||||
info.class_id = "tracks-info";
|
||||
info.name = L"Timelapse Tracks";
|
||||
info.props["has-track-360"] = std::make_shared<Serializer::Boolean>(true);
|
||||
info.props["version"] = std::make_shared<Serializer::Integer>(1);
|
||||
sw << info;
|
||||
sw << *Canvas::I->m_encoder;
|
||||
if (!sw.save(lapse_path))
|
||||
LOG("cannot save timelase to %s", lapse_path.c_str());
|
||||
}
|
||||
sw << *Canvas::I->m_encoder;
|
||||
if (!sw.save(lapse_path))
|
||||
LOG("cannot save timelase to %s", lapse_path.c_str());
|
||||
}
|
||||
#if __WEB__
|
||||
webgl_sync();
|
||||
#endif
|
||||
@@ -2523,13 +2523,13 @@ bool Canvas::project_open_thread(std::string file_path)
|
||||
fclose(fp);
|
||||
LOG("project restore from %s", file_path.c_str());
|
||||
|
||||
auto start = file_path.rfind('/') + 1;
|
||||
std::string file_name = file_path.substr(start, file_path.length() - start - strlen(".ppi"));
|
||||
std::string lapse_path = App::I->data_path + '/' + file_name + ".pptl";
|
||||
if (Asset::exist(lapse_path))
|
||||
{
|
||||
BinaryStreamReader sr;
|
||||
sr.load(lapse_path, BinaryStream::ByteOrder::LittleEndian);
|
||||
auto start = file_path.rfind('/') + 1;
|
||||
std::string file_name = file_path.substr(start, file_path.length() - start - strlen(".ppi"));
|
||||
std::string lapse_path = App::I->data_path + '/' + file_name + ".pptl";
|
||||
if (Asset::exist(lapse_path))
|
||||
{
|
||||
BinaryStreamReader sr;
|
||||
sr.load(lapse_path, BinaryStream::ByteOrder::LittleEndian);
|
||||
Serializer::Descriptor info;
|
||||
sr >> info;
|
||||
if (info.value<Serializer::Boolean>("has-track-360"))
|
||||
@@ -2538,11 +2538,11 @@ bool Canvas::project_open_thread(std::string file_path)
|
||||
sr >> *m_encoder;
|
||||
m_encoder->init();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
timelapse_reset_encoder();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
timelapse_reset_encoder();
|
||||
}
|
||||
|
||||
m_current_layer_idx = 0;
|
||||
m_current_stroke = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user