mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-02 05:55:38 +00:00
The last little bit of comment, etc, cleanup here.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26905 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b73d5450b7
commit
6a5a7d7e20
@ -357,7 +357,7 @@ void ModuleSelectionManager::updateDownPB()
|
|||||||
|
|
||||||
// Enable it if this module isn't required.
|
// Enable it if this module isn't required.
|
||||||
// FIXME This should perhaps be more flexible and check whether, even
|
// FIXME This should perhaps be more flexible and check whether, even
|
||||||
// if this one is required, there is also an earlier one that is required.
|
// if the next one is required, there is also an earlier one that will do.
|
||||||
downPB->setEnabled(
|
downPB->setEnabled(
|
||||||
find(reqs.begin(), reqs.end(), curModName) == reqs.end());
|
find(reqs.begin(), reqs.end(), curModName) == reqs.end());
|
||||||
}
|
}
|
||||||
@ -370,7 +370,6 @@ void ModuleSelectionManager::updateUpPB()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// determine whether immediately preceding element is required by this one
|
|
||||||
QModelIndex const & curIdx = selectedLV->selectionModel()->currentIndex();
|
QModelIndex const & curIdx = selectedLV->selectionModel()->currentIndex();
|
||||||
int curRow = curIdx.row();
|
int curRow = curIdx.row();
|
||||||
if (curRow <= 0 || curRow > srows - 1) { // first item or invalid
|
if (curRow <= 0 || curRow > srows - 1) { // first item or invalid
|
||||||
@ -378,6 +377,8 @@ void ModuleSelectionManager::updateUpPB()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string const curModName = getSelectedModel()->getIDString(curRow);
|
string const curModName = getSelectedModel()->getIDString(curRow);
|
||||||
|
|
||||||
|
// determine whether immediately preceding element is required by this one
|
||||||
vector<string> reqs = getRequiredList(curModName);
|
vector<string> reqs = getRequiredList(curModName);
|
||||||
|
|
||||||
// if this one doesn't require anything....
|
// if this one doesn't require anything....
|
||||||
@ -389,8 +390,8 @@ void ModuleSelectionManager::updateUpPB()
|
|||||||
string preModName = getSelectedModel()->getIDString(curRow - 1);
|
string preModName = getSelectedModel()->getIDString(curRow - 1);
|
||||||
|
|
||||||
// Enable it if the preceding module isn't required.
|
// Enable it if the preceding module isn't required.
|
||||||
// NOTE This is less flexible than it might be. You could check whether, even
|
// NOTE This is less flexible than it might be. We could check whether, even
|
||||||
// if this one is required, there is also an earlier one that is required.
|
// if the previous one is required, there is an earlier one that would do.
|
||||||
upPB->setEnabled(find(reqs.begin(), reqs.end(), preModName) == reqs.end());
|
upPB->setEnabled(find(reqs.begin(), reqs.end(), preModName) == reqs.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1337,13 +1338,13 @@ void GuiDocument::classChanged()
|
|||||||
|
|
||||||
// check whether the selected modules have changed.
|
// check whether the selected modules have changed.
|
||||||
bool modulesChanged = false;
|
bool modulesChanged = false;
|
||||||
int const srows = selectedModel()->rowCount();
|
unsigned int const srows = selectedModel()->rowCount();
|
||||||
if (srows != bp_.getModules().size())
|
if (srows != bp_.getModules().size())
|
||||||
modulesChanged = true;
|
modulesChanged = true;
|
||||||
else {
|
else {
|
||||||
list<string>::const_iterator mit = bp_.getModules().begin();
|
list<string>::const_iterator mit = bp_.getModules().begin();
|
||||||
list<string>::const_iterator men = bp_.getModules().end();
|
list<string>::const_iterator men = bp_.getModules().end();
|
||||||
for (int i = 0; i < srows && mit != men; ++i, ++mit)
|
for (unsigned int i = 0; i < srows && mit != men; ++i, ++mit)
|
||||||
if (selectedModel()->getIDString(i) != *mit) {
|
if (selectedModel()->getIDString(i) != *mit) {
|
||||||
modulesChanged = true;
|
modulesChanged = true;
|
||||||
break;
|
break;
|
||||||
@ -2015,6 +2016,7 @@ void GuiDocument::paramsToDialog()
|
|||||||
latexModule->optionsLE->setText(QString());
|
latexModule->optionsLE->setText(QString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// latex
|
||||||
latexModule->defaultOptionsCB->setChecked(
|
latexModule->defaultOptionsCB->setChecked(
|
||||||
bp_.use_default_options);
|
bp_.use_default_options);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user