Qt4: Allow clicking anywhere in menus
Instead of requiring clicking on the checkbox, allow clicking anywhere in a selectable line to select it.
This commit is contained in:
@@ -132,6 +132,7 @@ NetHackQtMenuWindow::NetHackQtMenuWindow(QWidget *parent) :
|
||||
grid->setRowStretch(2, 1);
|
||||
setFocusPolicy(Qt::StrongFocus);
|
||||
table->setFocusPolicy(Qt::NoFocus);
|
||||
connect(table, SIGNAL(cellClicked(int,int)), this, SLOT(cellToggleSelect(int,int)));
|
||||
|
||||
setLayout(grid);
|
||||
}
|
||||
@@ -560,6 +561,11 @@ void NetHackQtMenuWindow::ToggleSelect(int i)
|
||||
}
|
||||
}
|
||||
|
||||
void NetHackQtMenuWindow::cellToggleSelect(int i, int j)
|
||||
{
|
||||
ToggleSelect(i);
|
||||
}
|
||||
|
||||
void NetHackQtMenuWindow::DoSelection(bool)
|
||||
{
|
||||
if (how == PICK_ONE) {
|
||||
|
||||
@@ -66,6 +66,7 @@ public slots:
|
||||
void Search();
|
||||
|
||||
void ToggleSelect(int);
|
||||
void cellToggleSelect(int, int);
|
||||
void DoSelection(bool);
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user