mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +00:00
opt: do not show dictionary menu when set the dictionary count=0 (#1652)
* opt: do not show dictionary menu when set the dictionary count=0 * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
6486e7b57c
commit
7669316bcd
|
@ -1610,6 +1610,7 @@ void ArticleView::contextMenuRequested( QPoint const & pos )
|
||||||
unsigned refsAdded = 0;
|
unsigned refsAdded = 0;
|
||||||
bool maxDictionaryRefsReached = false;
|
bool maxDictionaryRefsReached = false;
|
||||||
|
|
||||||
|
if ( cfg.preferences.maxDictionaryRefsInContextMenu > 0 ) {
|
||||||
for ( QStringList::const_iterator i = ids.constBegin(); i != ids.constEnd(); ++i, ++refsAdded ) {
|
for ( QStringList::const_iterator i = ids.constBegin(); i != ids.constEnd(); ++i, ++refsAdded ) {
|
||||||
// Find this dictionary
|
// Find this dictionary
|
||||||
|
|
||||||
|
@ -1637,6 +1638,7 @@ void ArticleView::contextMenuRequested( QPoint const & pos )
|
||||||
if ( maxDictionaryRefsReached )
|
if ( maxDictionaryRefsReached )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
menu.addSeparator();
|
menu.addSeparator();
|
||||||
if ( !popupView || cfg.pinPopupWindow )
|
if ( !popupView || cfg.pinPopupWindow )
|
||||||
|
|
Loading…
Reference in a new issue