From d8398a2be73379bf1f87c3fbc977eb2dca56ffb2 Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Mon, 2 Jan 2023 22:45:07 +0800 Subject: [PATCH] fix: scanpopup was trigger twice fix #304 --- mainwindow.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mainwindow.cc b/mainwindow.cc index 0073468e..7590fb89 100644 --- a/mainwindow.cc +++ b/mainwindow.cc @@ -2986,7 +2986,7 @@ void MainWindow::installHotKeys() if ( cfg.preferences.enableMainWindowHotkey ) hotkeyWrapper->setGlobalKey( cfg.preferences.mainWindowHotkey,0 ); - if ( cfg.preferences.enableClipboardHotkey && scanPopup.get() ) + if ( cfg.preferences.enableClipboardHotkey && scanPopup.get() && !enableScanningAction->isChecked() ) { hotkeyWrapper->setGlobalKey( cfg.preferences.clipboardHotkey,1 ); } @@ -3196,6 +3196,7 @@ void MainWindow::scanEnableToggled( bool on ) } } + installHotKeys(); updateTrayIcon(); }