mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fixed clearing of redo list after adding sticker item in photo editor.
This commit is contained in:
parent
9166423598
commit
858b5831e8
1 changed files with 11 additions and 6 deletions
|
@ -57,12 +57,6 @@ Paint::Paint(
|
||||||
_view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
_view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
_view->setStyleSheet(kViewStyle.utf8());
|
_view->setStyleSheet(kViewStyle.utf8());
|
||||||
|
|
||||||
_scene->mousePresses(
|
|
||||||
) | rpl::start_with_next([=] {
|
|
||||||
_hasUndo = true;
|
|
||||||
clearRedoList();
|
|
||||||
}, lifetime());
|
|
||||||
|
|
||||||
_scene->addsItem(
|
_scene->addsItem(
|
||||||
) | rpl::start_with_next([=] {
|
) | rpl::start_with_next([=] {
|
||||||
updateUndoState();
|
updateUndoState();
|
||||||
|
@ -126,6 +120,17 @@ Paint::Paint(
|
||||||
_scene->clearSelection();
|
_scene->clearSelection();
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rpl::merge(
|
||||||
|
controllers->stickersPanelController
|
||||||
|
? controllers->stickersPanelController->stickerChosen(
|
||||||
|
) | rpl::to_empty
|
||||||
|
: rpl::never<>(),
|
||||||
|
_scene->mousePresses()
|
||||||
|
) | rpl::start_with_next([=] {
|
||||||
|
_hasUndo = true;
|
||||||
|
clearRedoList();
|
||||||
|
}, lifetime());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Paint::applyTransform(QRect geometry, int angle, bool flipped) {
|
void Paint::applyTransform(QRect geometry, int angle, bool flipped) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue