Apply editor settings when handling key presses
This commit is contained in:
parent
283624a564
commit
1d185c9402
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user