void GuiDocument::classChanged()
{
textclass_type const tc = latexModule->classCO->currentIndex();
- bp_.setJustBaseClass(tc);
+ bp_.setBaseClass(tc);
if (lyxrc.auto_reset_options)
bp_.useClassDefaults();
updateContents();
{
embeddedFilesModule->filesLW->clear();
// add current embedded files
- EmbeddedFiles & files = buffer().embeddedFiles();
- files.update();
- EmbeddedFiles::EmbeddedFileList::iterator fit = files.begin();
- EmbeddedFiles::EmbeddedFileList::iterator fit_end = files.end();
+ EmbeddedFileList & files = buffer().embeddedFiles();
+ files.update(buffer());
+ EmbeddedFileList::iterator fit = files.begin();
+ EmbeddedFileList::iterator fit_end = files.end();
for (; fit != fit_end; ++fit) {
QString label = toqstr(fit->relFilename(buffer().filePath()));
if (fit->refCount() > 1)
params.graphicsDriver =
tex_graphics[latexModule->psdriverCO->currentIndex()];
+ // text layout
+ params.setBaseClass(latexModule->classCO->currentIndex());
+
// Modules
params.clearLayoutModules();
QStringList const selMods = selectedModel()->stringList();
for (int i = 0; i != selMods.size(); ++i)
params.addLayoutModule(lyx::fromqstr(selMods[i]));
-
if (mathsModule->amsautoCB->isChecked()) {
params.use_amsmath = BufferParams::package_auto;
} else {
params.use_esint = BufferParams::package_off;
}
- // text layout
- params.setJustBaseClass(latexModule->classCO->currentIndex());
-
if (pageLayoutModule->pagestyleCO->currentIndex() == 0)
params.pagestyle = "default";
else {
void GuiDocument::useClassDefaults()
{
- bp_.setJustBaseClass(latexModule->classCO->currentIndex());
+ bp_.setBaseClass(latexModule->classCO->currentIndex());
bp_.useClassDefaults();
updateContents();
}
bool GuiDocument::isModuleAvailable(string const & modName) const
{
LyXModule * mod = moduleList[modName];
+ if (!mod)
+ return false;
return mod->isAvailable();
}
// Apply the BufferParams. Note that this will set the base class
// and then update the buffer's layout.
- //FIXME Could this be done last? Then, I think, we'd get the automatic
- //update mentioned in the next FIXME...
dispatch_bufferparams(*this, params(), LFUN_BUFFER_PARAMS_APPLY);
// Generate the colours requested by each new branch.