Size tab now enables and disables correctly depending on the capabilities configured for the current external template (selected via the combo).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39399 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Tommaso Cucinotta 2011-07-31 18:39:51 +00:00
parent 0b1d0cef4a
commit 4b1a671190

View File

@ -512,21 +512,19 @@ void GuiExternal::updateTemplate()
TransformIDs::const_iterator tr_begin = transformIds.begin(); TransformIDs::const_iterator tr_begin = transformIds.begin();
TransformIDs::const_iterator const tr_end = transformIds.end(); TransformIDs::const_iterator const tr_end = transformIds.end();
bool found = std::find(tr_begin, tr_end, external::Rotate) != tr_end; bool rotate = std::find(tr_begin, tr_end, external::Rotate) != tr_end;
rotationGB->setEnabled(found); rotationGB->setEnabled(rotate);
found = std::find(tr_begin, tr_end, external::Resize) != tr_end; bool resize = std::find(tr_begin, tr_end, external::Resize) != tr_end;
scaleGB->setEnabled(found); scaleGB->setEnabled(resize);
found = std::find(tr_begin, tr_end, external::Clip) != tr_end; bool clip = std::find(tr_begin, tr_end, external::Clip) != tr_end;
cropGB->setEnabled(found); cropGB->setEnabled(clip);
tab->setTabEnabled(tab->indexOf(sizetab), sizetab->setEnabled(rotate || resize || clip);
rotationGB->isEnabled() tab->setTabEnabled(tab->indexOf(sizetab), rotate || resize || clip);
|| scaleGB->isEnabled()
|| cropGB->isEnabled());
found = std::find(tr_begin, tr_end, external::Extra) != tr_end; bool found = std::find(tr_begin, tr_end, external::Extra) != tr_end;
optionsGB->setEnabled(found); optionsGB->setEnabled(found);
bool scaled = displayGB->isChecked() && displayGB->isEnabled() && bool scaled = displayGB->isChecked() && displayGB->isEnabled() &&