Compare commits

...

2 commits

Author SHA1 Message Date
xiaoyifang 59f9b3d04f opt: dictionary tab switch show blank widget when source changed 2024-11-08 20:48:31 +08:00
shenleban tongying f6434f4219 fix a mistake of https://github.com/xiaoyifang/goldendict-ng/pull/1912
Some checks are pending
SonarCloud / Build and analyze (push) Waiting to run
2024-11-08 01:36:29 -05:00
2 changed files with 3 additions and 3 deletions

View file

@ -111,7 +111,7 @@ HotKey::HotKey( QKeySequence const & seq ):
QKeySequence HotKey::toKeySequence() const
{
if ( key2 != 0 || key2 != Qt::Key::Key_unknown ) {
if ( key2 != 0 && key2 != Qt::Key::Key_unknown ) {
return { QKeyCombination( modifiers, static_cast< Qt::Key >( key1 ) ),
QKeyCombination( modifiers, static_cast< Qt::Key >( key2 ) ) };
}

View file

@ -200,7 +200,7 @@ void EditDictionaries::acceptChangedSources( bool rebuildGroups )
#ifndef NO_TTS_SUPPORT
cfg.voiceEngines = sources.getVoiceEngines();
#endif
ui.tabs->setUpdatesEnabled( false );
setUpdatesEnabled( false );
// Those hold pointers to dictionaries, we need to free them.
groupInstances.clear();
@ -225,7 +225,7 @@ void EditDictionaries::acceptChangedSources( bool rebuildGroups )
connect( groups, &Groups::showDictionaryInfo, this, &EditDictionaries::showDictionaryInfo );
connect( orderAndProps, &OrderAndProps::showDictionaryHeadwords, this, &EditDictionaries::showDictionaryHeadwords );
}
ui.tabs->setUpdatesEnabled( true );
setUpdatesEnabled( true );
}
EditDictionaries::~EditDictionaries()
{