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:
@@ -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());
|
||||
|
Reference in New Issue
Block a user