More correct submenu detection.
This commit is contained in:
parent
6358629269
commit
f33c0431b9
@ -46,8 +46,7 @@ bool ResultDialog::eventFilter (QObject *object, QEvent *event) {
|
|||||||
Qt::MouseButton button = static_cast<QMouseEvent *>(event)->button ();
|
Qt::MouseButton button = static_cast<QMouseEvent *>(event)->button ();
|
||||||
if (button == Qt::RightButton) {
|
if (button == Qt::RightButton) {
|
||||||
QAction *action = contextMenu_->exec (QCursor::pos ());
|
QAction *action = contextMenu_->exec (QCursor::pos ());
|
||||||
QWidget *subMenu = action->parentWidget ();
|
if (recognizeSubMenu_->findChildren<QAction *> ().contains (action)) {
|
||||||
if (recognizeSubMenu_->isAncestorOf (subMenu)) {
|
|
||||||
ProcessingItem item = item_;
|
ProcessingItem item = item_;
|
||||||
item.translated = item.recognized = QString ();
|
item.translated = item.recognized = QString ();
|
||||||
item.ocrLanguage = dictionary_.ocrUiToCode (action->text ());
|
item.ocrLanguage = dictionary_.ocrUiToCode (action->text ());
|
||||||
|
Loading…
Reference in New Issue
Block a user