2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 15:05:56 +00:00

Added ability to pass data for photo editor.

This commit is contained in:
23rd
2021-02-21 10:28:37 +03:00
parent a2e674bdb6
commit 2045252cfd
9 changed files with 44 additions and 13 deletions

View File

@@ -46,7 +46,8 @@ constexpr auto kPrecision = 100000;
PhotoEditor::PhotoEditor(
not_null<Ui::RpWidget*> parent,
std::shared_ptr<Image> photo,
PhotoModifications modifications)
PhotoModifications modifications,
EditorData data)
: RpWidget(parent)
, _modifications(std::move(modifications))
, _undoController(std::make_shared<UndoController>())
@@ -54,7 +55,8 @@ PhotoEditor::PhotoEditor(
this,
photo,
_modifications,
_undoController))
_undoController,
std::move(data)))
, _controls(base::make_unique_q<PhotoEditorControls>(this, _undoController))
, _colorPicker(std::make_unique<ColorPicker>(
this,