fix: scanpopup was trigger twice

fix #304
This commit is contained in:
Xiao YiFang 2023-01-02 22:45:07 +08:00
parent 4a30302864
commit d8398a2be7

View file

@ -2986,7 +2986,7 @@ void MainWindow::installHotKeys()
if ( cfg.preferences.enableMainWindowHotkey ) if ( cfg.preferences.enableMainWindowHotkey )
hotkeyWrapper->setGlobalKey( cfg.preferences.mainWindowHotkey,0 ); 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 ); hotkeyWrapper->setGlobalKey( cfg.preferences.clipboardHotkey,1 );
} }
@ -3196,6 +3196,7 @@ void MainWindow::scanEnableToggled( bool on )
} }
} }
installHotKeys();
updateTrayIcon(); updateTrayIcon();
} }