mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 14:08:41 +00:00
Disabled ability to use hotkeys when selecting color in photo editor.
This commit is contained in:
parent
9dacf69d41
commit
8420b7dc17
@ -321,4 +321,9 @@ int ColorPicker::colorToPosition(const QColor &color) const {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ColorPicker::preventHandleKeyPress() const {
|
||||||
|
return _canvasForCircle->isVisible()
|
||||||
|
&& (_circleAnimation.animating() || _down.pressed);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Editor
|
} // namespace Editor
|
||||||
|
@ -29,6 +29,7 @@ public:
|
|||||||
|
|
||||||
void moveLine(const QPoint &position);
|
void moveLine(const QPoint &position);
|
||||||
void setVisible(bool visible);
|
void setVisible(bool visible);
|
||||||
|
bool preventHandleKeyPress() const;
|
||||||
|
|
||||||
rpl::producer<Brush> saveBrushRequests() const;
|
rpl::producer<Brush> saveBrushRequests() const;
|
||||||
|
|
||||||
|
@ -166,7 +166,9 @@ PhotoEditor::PhotoEditor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PhotoEditor::handleKeyPress(not_null<QKeyEvent*> e) {
|
void PhotoEditor::handleKeyPress(not_null<QKeyEvent*> e) {
|
||||||
_content->handleKeyPress(e) || _controls->handleKeyPress(e);
|
if (!_colorPicker->preventHandleKeyPress()) {
|
||||||
|
_content->handleKeyPress(e) || _controls->handleKeyPress(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhotoEditor::save() {
|
void PhotoEditor::save() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user