Use combo box data rather than looking up info from InsetRef.

(cherry picked from commit c4fdab6993)
This commit is contained in:
Richard Kimberly Heck 2019-01-06 17:45:08 -05:00
parent 982be56270
commit 90d56cbb4a
3 changed files with 4 additions and 12 deletions

View File

@ -148,10 +148,10 @@ void GuiRef::enableView(bool enable)
void GuiRef::enableBoxes()
{
bool const isFormatted =
(InsetRef::getName(typeCO->currentIndex()) == "formatted");
bool const isLabelOnly =
(InsetRef::getName(typeCO->currentIndex()) == "labelonly");
QString const reftype =
typeCO->itemData(typeCO->currentIndex()).toString();
bool const isFormatted = (reftype == "formatted");
bool const isLabelOnly = (reftype == "labelonly");
bool const usingRefStyle = buffer().params().use_refstyle;
pluralCB->setEnabled(isFormatted && usingRefStyle);
capsCB->setEnabled(isFormatted && usingRefStyle);

View File

@ -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
{
return tooltip_.empty() ? screenLabel() : tooltip_;

View File

@ -31,8 +31,6 @@ public:
static const type_info types[];
///
static int getType(std::string const & name);
///
static std::string const & getName(int type);
///
InsetRef(Buffer * buffer, InsetCommandParams const &);