2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Added ability to save and restore items state in photo editor.

This commit is contained in:
23rd
2021-07-07 21:14:50 +03:00
parent d2d97a3e47
commit 78b25c694e
10 changed files with 89 additions and 5 deletions

View File

@@ -136,6 +136,10 @@ PhotoEditor::PhotoEditor(
.action = PhotoEditorMode::Action::Save,
};
} else if (mode == PhotoEditorMode::Mode::Transform) {
_mode = PhotoEditorMode{
.mode = PhotoEditorMode::Mode::Out,
.action = PhotoEditorMode::Action::Save,
};
save();
}
}, lifetime());
@@ -149,6 +153,10 @@ PhotoEditor::PhotoEditor(
.action = PhotoEditorMode::Action::Discard,
};
} else if (mode == PhotoEditorMode::Mode::Transform) {
_mode = PhotoEditorMode{
.mode = PhotoEditorMode::Mode::Out,
.action = PhotoEditorMode::Action::Discard,
};
_cancel.fire({});
}
}, lifetime());