Save thumbnails next to infinipaint savefile

This commit is contained in:
Yousef Khadadeh 2026-04-28 17:07:28 +03:00
parent 962665ffd4
commit c9c61a8b68
10 changed files with 281 additions and 215 deletions

View file

@ -1,6 +1,7 @@
#pragma once
#include <Helpers/NetworkingObjects/DelayUpdateSerializedClassManager.hpp>
#include <Helpers/NetworkingObjects/NetObjOrderedList.hpp>
#include "CoordSpaceHelper.hpp"
#include "CustomEvents.hpp"
#include "Helpers/NetworkingObjects/NetObjUnorderedSet.hpp"
#include "WorldUndoManager.hpp"
@ -20,6 +21,8 @@ class MainProgram;
//#define ENABLE_ORDERED_LIST_TEST
struct WorldScreenshotInfo;
class World {
public:
static constexpr std::string DOT_FILE_EXTENSION = ".infpnt";
@ -63,7 +66,7 @@ class World {
bool clientStillConnecting = false;
void autosave_to_directory(const std::filesystem::path& directoryToSaveAt);
void save_to_file(const std::filesystem::path& filePathToSaveAt);
void save_to_file(const std::filesystem::path& filePathToSaveAt, bool disableThumbnailSaving = false);
void load_from_file(const std::filesystem::path& filePathToLoadFrom, std::string_view buffer);
void undo_with_checks();
@ -107,7 +110,7 @@ class World {
void input_multi_finger_touch_callback(const InputManager::MultiFingerTouchCallbackArgs& touch);
void input_multi_finger_motion_callback(const InputManager::MultiFingerMotionCallbackArgs& motion);
private:
bool saveThumbnail = false;
bool hasUnsavedLocalChanges = false;
void load_empty_canvas(const std::optional<std::filesystem::path>& filePathEmptyAutoSaveDir = std::nullopt);