From 3b69ff4ae2020d71724400a2aa2c09c2b0b83748 Mon Sep 17 00:00:00 2001 From: omigamedev Date: Sun, 17 Nov 2019 17:29:03 +0100 Subject: [PATCH] untabify --- src/app.h | 2 +- src/app_dialogs.cpp | 4 ++-- src/app_layout.cpp | 2 +- src/canvas.cpp | 46 ++++++++++++++++++++++----------------------- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/app.h b/src/app.h index 3364259..f151b3f 100644 --- a/src/app.h +++ b/src/app.h @@ -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(); diff --git a/src/app_dialogs.cpp b/src/app_dialogs.cpp index 031aec4..8cc5d76 100644 --- a/src/app_dialogs.cpp +++ b/src/app_dialogs.cpp @@ -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"); diff --git a/src/app_layout.cpp b/src/app_layout.cpp index db355bc..ca817d3 100644 --- a/src/app_layout.cpp +++ b/src/app_layout.cpp @@ -22,7 +22,7 @@ void App::title_update() void App::init_toolbar_main() { - if (auto* button = layout[main_id]->find("btn-anim")) + if (auto* button = layout[main_id]->find("btn-anim")) { button->on_click = [this, button](Node*) { if (canvas) diff --git a/src/canvas.cpp b/src/canvas.cpp index 734d113..7b55fe1 100644 --- a/src/canvas.cpp +++ b/src/canvas.cpp @@ -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(true); info.props["version"] = std::make_shared(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("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;