From 3a24550765c7c64e3978e7c4af1231d0b7b2b1dc Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Sun, 5 Jul 2020 02:19:20 +0200 Subject: [PATCH] Remove GuiRef::typeAllowed, as it is now always allowed. --- src/frontends/qt/GuiRef.cpp | 12 ++---------- src/frontends/qt/GuiRef.h | 2 -- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/frontends/qt/GuiRef.cpp b/src/frontends/qt/GuiRef.cpp index c1870bed98..d819e45ff8 100644 --- a/src/frontends/qt/GuiRef.cpp +++ b/src/frontends/qt/GuiRef.cpp @@ -211,7 +211,7 @@ void GuiRef::refHighlighted(QTreeWidgetItem * sel) if (at_ref_) gotoRef(); gotoPB->setEnabled(true); - if (typeAllowed() && !isBufferReadonly()) + if (!isBufferReadonly()) typeCO->setEnabled(true); nameED->setHidden(!nameAllowed()); nameL->setHidden(!nameAllowed()); @@ -351,9 +351,7 @@ void GuiRef::updateContents() else typeCO->setCurrentIndex( typeCO->findData(toqstr(params_.getCmdName()))); - typeCO->setEnabled(typeAllowed() && !isBufferReadonly()); - if (!typeAllowed()) - typeCO->setCurrentIndex(0); + typeCO->setEnabled(!isBufferReadonly()); pluralCB->setChecked(params_["plural"] == "true"); capsCB->setChecked(params_["caps"] == "true"); @@ -412,12 +410,6 @@ bool GuiRef::nameAllowed() } -bool GuiRef::typeAllowed() -{ - return docType() != DOCBOOK; -} - - void GuiRef::setGoBack() { gotoPB->setText(qt_("&Go Back")); diff --git a/src/frontends/qt/GuiRef.h b/src/frontends/qt/GuiRef.h index f7e007724a..335ff02076 100644 --- a/src/frontends/qt/GuiRef.h +++ b/src/frontends/qt/GuiRef.h @@ -75,8 +75,6 @@ private: /// is name allowed for this ? bool nameAllowed(); - /// is type allowed for this ? - bool typeAllowed(); /// go to current reference void gotoRef(); /// set go back button