mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-05 08:57:35 +00:00
Use combo box data rather than looking up info from InsetRef.
(cherry picked from commit c4fdab6993
)
This commit is contained in:
parent
982be56270
commit
90d56cbb4a
@ -148,10 +148,10 @@ void GuiRef::enableView(bool enable)
|
|||||||
|
|
||||||
void GuiRef::enableBoxes()
|
void GuiRef::enableBoxes()
|
||||||
{
|
{
|
||||||
bool const isFormatted =
|
QString const reftype =
|
||||||
(InsetRef::getName(typeCO->currentIndex()) == "formatted");
|
typeCO->itemData(typeCO->currentIndex()).toString();
|
||||||
bool const isLabelOnly =
|
bool const isFormatted = (reftype == "formatted");
|
||||||
(InsetRef::getName(typeCO->currentIndex()) == "labelonly");
|
bool const isLabelOnly = (reftype == "labelonly");
|
||||||
bool const usingRefStyle = buffer().params().use_refstyle;
|
bool const usingRefStyle = buffer().params().use_refstyle;
|
||||||
pluralCB->setEnabled(isFormatted && usingRefStyle);
|
pluralCB->setEnabled(isFormatted && usingRefStyle);
|
||||||
capsCB->setEnabled(isFormatted && usingRefStyle);
|
capsCB->setEnabled(isFormatted && usingRefStyle);
|
||||||
|
@ -492,12 +492,6 @@ int InsetRef::getType(string const & name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
string const & InsetRef::getName(int type)
|
|
||||||
{
|
|
||||||
return types[type].latex_name;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
docstring InsetRef::getTOCString() const
|
docstring InsetRef::getTOCString() const
|
||||||
{
|
{
|
||||||
return tooltip_.empty() ? screenLabel() : tooltip_;
|
return tooltip_.empty() ? screenLabel() : tooltip_;
|
||||||
|
@ -31,8 +31,6 @@ public:
|
|||||||
static const type_info types[];
|
static const type_info types[];
|
||||||
///
|
///
|
||||||
static int getType(std::string const & name);
|
static int getType(std::string const & name);
|
||||||
///
|
|
||||||
static std::string const & getName(int type);
|
|
||||||
|
|
||||||
///
|
///
|
||||||
InsetRef(Buffer * buffer, InsetCommandParams const &);
|
InsetRef(Buffer * buffer, InsetCommandParams const &);
|
||||||
|
Loading…
Reference in New Issue
Block a user