diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index 404c9a2cac..e672525ce8 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -2084,10 +2084,15 @@ void BufferParams::makeDocumentClass() } -bool BufferParams::moduleCanBeAdded(string const & modName) const +bool BufferParams::layoutModuleCanBeAdded(string const & modName) const { - return cite_engine_.moduleCanBeAdded(modName, baseClass()) && - layout_modules_.moduleCanBeAdded(modName, baseClass()); + return layout_modules_.moduleCanBeAdded(modName, baseClass()); +} + + +bool BufferParams::citationModuleCanBeAdded(string const & modName) const +{ + return cite_engine_.moduleCanBeAdded(modName, baseClass()); } diff --git a/src/BufferParams.h b/src/BufferParams.h index 98f79a57fb..80025abff1 100644 --- a/src/BufferParams.h +++ b/src/BufferParams.h @@ -146,13 +146,15 @@ public: { return removed_modules_; } /// /// Add a module to the list of modules in use. This checks only that the - /// module is not already in the list, so use moduleIsCompatible first if - /// you want to check for compatibility. + /// module is not already in the list, so use layoutModuleCanBeAdeed first + /// if you want to check for compatibility. /// \return true if module was successfully added. bool addLayoutModule(std::string const & modName); /// checks to make sure module's requriements are satisfied, that it does /// not conflict with already-present modules, isn't already loaded, etc. - bool moduleCanBeAdded(std::string const & modName) const; + bool layoutModuleCanBeAdded(std::string const & modName) const; + /// same, but for citaton modules. + bool citationModuleCanBeAdded(std::string const & modName) const; /// void addRemovedModule(std::string const & modName) { removed_modules_.push_back(modName); } diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 31c95cf764..fd26a81709 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -1274,7 +1274,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr) case LFUN_LAYOUT_MODULE_ADD: { BufferParams const & params = buffer_.params(); - if (!params.moduleCanBeAdded(argument)) { + if (!params.layoutModuleCanBeAdded(argument)) { LYXERR0("Module `" << argument << "' cannot be added due to failed requirements or " "conflicts with installed modules."); diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 73ece2e62f..dbdf691ba1 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -341,7 +341,7 @@ void ModuleSelectionManager::updateAddPB() string const modname = getAvailableModel()->getIDString(idx.row()); bool const enable = - container_->params().moduleCanBeAdded(modname); + container_->params().layoutModuleCanBeAdded(modname); addPB->setEnabled(enable); }