mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 21:40:19 +00:00
Consider possibility of empty tooltip
This commit is contained in:
parent
f6d4bce123
commit
7fe596b459
@ -270,21 +270,20 @@ void GuiCitation::updateFormatting(CitationStyle currentStyle)
|
||||
if (starred && !currentStyle.stardesc.empty()) {
|
||||
string val =
|
||||
bp.documentClass().getCiteMacro(bp.citeEngineType(), currentStyle.stardesc);
|
||||
docstring guistring;
|
||||
if (!val.empty()) {
|
||||
docstring const trans =
|
||||
translateIfPossible(from_utf8(val));
|
||||
starredCB->setText(toqstr(trans));
|
||||
guistring = translateIfPossible(from_utf8(val));
|
||||
starredCB->setText(toqstr(guistring));
|
||||
starredCB->setEnabled(haveSelection);
|
||||
}
|
||||
if (!currentStyle.startooltip.empty()) {
|
||||
val = bp.documentClass().getCiteMacro(bp.citeEngineType(),
|
||||
currentStyle.startooltip);
|
||||
if (!val.empty()) {
|
||||
docstring const trans =
|
||||
translateIfPossible(from_utf8(val));
|
||||
starredCB->setToolTip(toqstr(trans));
|
||||
}
|
||||
if (!val.empty())
|
||||
guistring = translateIfPossible(from_utf8(val));
|
||||
}
|
||||
// Tooltip might also be empty
|
||||
starredCB->setToolTip(toqstr(guistring));
|
||||
} else {
|
||||
// This is the default meaning of the starred commands
|
||||
starredCB->setText(qt_("All aut&hors"));
|
||||
|
Loading…
Reference in New Issue
Block a user