#undef ControlModifier
#endif
+#ifdef FocusIn
+#undef FocusIn
+#endif
+
namespace lyx {
namespace frontend {
QPushButton * down,
QAbstractListModel * amod,
QAbstractListModel * smod)
+ : availableLV(avail), selectedLV(sel), addPB(add), deletePB(del),
+ upPB(up), downPB(down), availableModel(amod), selectedModel(smod),
+ selectedHasFocus_(false)
{
- availableLV = avail;
- selectedLV = sel;
- addPB = add;
- deletePB = del;
- upPB = up;
- downPB = down;
- availableModel = amod;
- selectedModel = smod;
selectedLV->setModel(smod);
availableLV->setModel(amod);
// This is designed to work both with the main enter key
// and the one on the numeric keypad.
if (keyPressed == Qt::Key_Enter || keyPressed == Qt::Key_Return) {
- if (!keyModifiers)
- addPB_clicked();
- else if (keyModifiers == Qt::ControlModifier ||
- keyModifiers == Qt::KeypadModifier ||
- keyModifiers == (Qt::ControlModifier | Qt::KeypadModifier)) {
- if (addPB->isEnabled()) {
+ if (addPB->isEnabled()) {
+ if (!keyModifiers) {
+ addPB_clicked();
+ } else if (keyModifiers == Qt::ControlModifier ||
+ keyModifiers == Qt::KeypadModifier ||
+ keyModifiers == (Qt::ControlModifier | Qt::KeypadModifier)) {
addPB_clicked();
okHook(); //signal
}