mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 19:14:51 +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()) {
|
if (starred && !currentStyle.stardesc.empty()) {
|
||||||
string val =
|
string val =
|
||||||
bp.documentClass().getCiteMacro(bp.citeEngineType(), currentStyle.stardesc);
|
bp.documentClass().getCiteMacro(bp.citeEngineType(), currentStyle.stardesc);
|
||||||
|
docstring guistring;
|
||||||
if (!val.empty()) {
|
if (!val.empty()) {
|
||||||
docstring const trans =
|
guistring = translateIfPossible(from_utf8(val));
|
||||||
translateIfPossible(from_utf8(val));
|
starredCB->setText(toqstr(guistring));
|
||||||
starredCB->setText(toqstr(trans));
|
|
||||||
starredCB->setEnabled(haveSelection);
|
starredCB->setEnabled(haveSelection);
|
||||||
}
|
}
|
||||||
if (!currentStyle.startooltip.empty()) {
|
if (!currentStyle.startooltip.empty()) {
|
||||||
val = bp.documentClass().getCiteMacro(bp.citeEngineType(),
|
val = bp.documentClass().getCiteMacro(bp.citeEngineType(),
|
||||||
currentStyle.startooltip);
|
currentStyle.startooltip);
|
||||||
if (!val.empty()) {
|
if (!val.empty())
|
||||||
docstring const trans =
|
guistring = translateIfPossible(from_utf8(val));
|
||||||
translateIfPossible(from_utf8(val));
|
|
||||||
starredCB->setToolTip(toqstr(trans));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// Tooltip might also be empty
|
||||||
|
starredCB->setToolTip(toqstr(guistring));
|
||||||
} else {
|
} else {
|
||||||
// This is the default meaning of the starred commands
|
// This is the default meaning of the starred commands
|
||||||
starredCB->setText(qt_("All aut&hors"));
|
starredCB->setText(qt_("All aut&hors"));
|
||||||
|
Loading…
Reference in New Issue
Block a user