Apply editor settings when handling key presses

This commit is contained in:
Gres 2020-05-04 21:22:11 +03:00
parent 283624a564
commit 1d185c9402

View File

@ -236,11 +236,16 @@ void CaptureAreaSelector::hideEvent(QHideEvent * /*event*/)
void CaptureAreaSelector::keyPressEvent(QKeyEvent *event)
{
if (event->key() == Qt::Key_Escape) {
if (editor_ && editor_->isVisible())
applyEditor();
cancel();
return;
}
if (event->key() == Qt::Key_Return) {
if (editor_ && editor_->isVisible())
applyEditor();
if (!areas_.empty()) {
captureAll();
} else {