mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
The default modules should be kept in order.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26801 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b0c6099330
commit
2078e09e67
@ -1483,9 +1483,9 @@ bool BufferParams::setBaseClass(string const & classname)
|
||||
pimpl_->baseClass_ = classname;
|
||||
|
||||
// add any required modules not already in use
|
||||
set<string> const & mods = baseClass()->defaultModules();
|
||||
set<string>::const_iterator mit = mods.begin();
|
||||
set<string>::const_iterator men = mods.end();
|
||||
list<string> const & mods = baseClass()->defaultModules();
|
||||
list<string>::const_iterator mit = mods.begin();
|
||||
list<string>::const_iterator men = mods.end();
|
||||
for (; mit != men; mit++) {
|
||||
string const & modName = *mit;
|
||||
// see if we're already in use
|
||||
|
@ -64,7 +64,7 @@ public:
|
||||
/// check whether the TeX class is available
|
||||
bool isTeXClassAvailable() const { return texClassAvail_; }
|
||||
///
|
||||
std::set<std::string> const & defaultModules() const { return usemod_; }
|
||||
std::list<std::string> const & defaultModules() const { return usemod_; }
|
||||
private:
|
||||
/// Construct a layout with default values. Actual values loaded later.
|
||||
explicit LayoutFile(std::string const & filename,
|
||||
|
@ -492,7 +492,8 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt)
|
||||
case TC_USEMODULE: {
|
||||
lexrc.next();
|
||||
string const module = lexrc.getString();
|
||||
usemod_.insert(module);
|
||||
if (find(usemod_.begin(), usemod_.end(), module) == usemod_.end())
|
||||
usemod_.push_back(module);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -252,7 +252,7 @@ protected:
|
||||
/// latex packages requested by document class.
|
||||
std::set<std::string> requires_;
|
||||
/// modules wanted by document class
|
||||
std::set<std::string> usemod_;
|
||||
std::list<std::string> usemod_;
|
||||
///
|
||||
unsigned int columns_;
|
||||
///
|
||||
|
@ -1594,9 +1594,9 @@ void GuiDocument::apply(BufferParams & params)
|
||||
params.addLayoutModule(modules_sel_model_.getIDString(i));
|
||||
// update the list of removed modules
|
||||
params.clearRemovedModules();
|
||||
set<string> const & reqmods = params.baseClass()->defaultModules();
|
||||
set<string>::const_iterator rit = reqmods.begin();
|
||||
set<string>::const_iterator ren = reqmods.end();
|
||||
list<string> const & reqmods = params.baseClass()->defaultModules();
|
||||
list<string>::const_iterator rit = reqmods.begin();
|
||||
list<string>::const_iterator ren = reqmods.end();
|
||||
// check each of the required modules
|
||||
for (; rit != ren; rit++) {
|
||||
vector<string>::const_iterator mit = params.getModules().begin();
|
||||
|
Loading…
Reference in New Issue
Block a user