mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Disabled ability to use hotkeys when selecting color in photo editor.
This commit is contained in:
parent
9dacf69d41
commit
8420b7dc17
3 changed files with 9 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue