mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Disabled ability to use hotkeys when selecting color in photo editor.
This commit is contained in:
@@ -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() {
|
||||||
|
Reference in New Issue
Block a user