Update: (ovqt) CBinOpDialogT<NL3D::CPlaneBasis> not supported all operations.

This commit is contained in:
dnk-88 2010-11-11 16:44:01 +02:00
parent d73dc65ec2
commit a769ddf9b0
2 changed files with 15 additions and 7 deletions

View file

@ -39,12 +39,6 @@ CBinOpDialog::CBinOpDialog(QWidget *widget1, QWidget *widget2, QWidget *parent)
setWindowTitle(tr("Bin operator"));
_comboBox->clear();
_comboBox->insertItems(0, QStringList()
<< tr("SelectArg1")
<< tr("SelectArg2")
<< tr("Modulate")
<< tr("Add")
<< tr("Subtract"));
qobject_cast<QGroupBox*>(widget1)->setTitle(tr("Arg1"));
qobject_cast<QGroupBox*>(widget2)->setTitle(tr("Arg2"));

View file

@ -96,14 +96,28 @@ public:
_AttrbDlg[k]->setSchemeWrapper(&_SchemeWrapper[k]) ;
_AttrbDlg[k]->init();
}
static const char * const operators[] =
{
QT_TR_NOOP("Select Arg1"),
QT_TR_NOOP("Select Arg2"),
QT_TR_NOOP("Modulate"),
QT_TR_NOOP("Add"),
QT_TR_NOOP("Subtract"),
0
};
_comboBox->blockSignals(true);
for (k = 0 ; k < (uint) NL3D::CPSBinOp::last ; ++k)
{
if (_EditedScheme->supportOp( (NL3D::CPSBinOp::BinOp) k))
{
_comboBox->insertItem(_comboBox->count(), operators[k]);
if ((uint) _EditedScheme->getOp() == k)
_comboBox->setCurrentIndex(k);
}
}
_comboBox->blockSignals(false);
}
~CBinOpDialogT()