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)
|
void CaptureAreaSelector::keyPressEvent(QKeyEvent *event)
|
||||||
{
|
{
|
||||||
if (event->key() == Qt::Key_Escape) {
|
if (event->key() == Qt::Key_Escape) {
|
||||||
|
if (editor_ && editor_->isVisible())
|
||||||
|
applyEditor();
|
||||||
cancel();
|
cancel();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event->key() == Qt::Key_Return) {
|
if (event->key() == Qt::Key_Return) {
|
||||||
|
if (editor_ && editor_->isVisible())
|
||||||
|
applyEditor();
|
||||||
|
|
||||||
if (!areas_.empty()) {
|
if (!areas_.empty()) {
|
||||||
captureAll();
|
captureAll();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user