Double click port to open port config dialog
Or select and press Enter using the keyboard Fixes #344
This commit is contained in:
parent
32ddf223b6
commit
b645e02963
@ -97,7 +97,9 @@ PortsWindow::PortsWindow(PortGroupList *pgl, QWidget *parent)
|
||||
connect(plm->getPortModel(), SIGNAL(modelReset()),
|
||||
SLOT(when_portModel_reset()));
|
||||
|
||||
connect( tvPortList->selectionModel(),
|
||||
connect(tvPortList, SIGNAL(activated(const QModelIndex&)),
|
||||
SLOT(on_actionPort_Configuration_triggered(const QModelIndex&)));
|
||||
connect(tvPortList->selectionModel(),
|
||||
SIGNAL(currentChanged(const QModelIndex&, const QModelIndex&)),
|
||||
this, SLOT(when_portView_currentChanged(const QModelIndex&,
|
||||
const QModelIndex&)));
|
||||
@ -597,9 +599,11 @@ void PortsWindow::on_actionExclusive_Control_triggered(bool checked)
|
||||
}
|
||||
}
|
||||
|
||||
void PortsWindow::on_actionPort_Configuration_triggered()
|
||||
void PortsWindow::on_actionPort_Configuration_triggered(
|
||||
const QModelIndex &portIndex)
|
||||
{
|
||||
QModelIndex current = tvPortList->selectionModel()->currentIndex();
|
||||
QModelIndex current = portIndex.isValid() ?
|
||||
portIndex : tvPortList->selectionModel()->currentIndex();
|
||||
|
||||
if (proxyPortModel)
|
||||
current = proxyPortModel->mapToSource(current);
|
||||
|
@ -80,7 +80,8 @@ private slots:
|
||||
void on_actionDisconnect_Port_Group_triggered();
|
||||
|
||||
void on_actionExclusive_Control_triggered(bool checked);
|
||||
void on_actionPort_Configuration_triggered();
|
||||
void on_actionPort_Configuration_triggered(
|
||||
const QModelIndex &portIndex = QModelIndex());
|
||||
|
||||
private:
|
||||
PortGroupList *plm;
|
||||
|
Loading…
Reference in New Issue
Block a user