Add new entry at end if nothing selected in stream/devGrp list
This commit is contained in:
parent
cca2e94bb3
commit
3aa44343f0
@ -170,13 +170,13 @@ void DevicesWidget::on_deviceInfo_toggled(bool checked)
|
|||||||
|
|
||||||
void DevicesWidget::on_actionNewDeviceGroup_triggered()
|
void DevicesWidget::on_actionNewDeviceGroup_triggered()
|
||||||
{
|
{
|
||||||
// In case nothing is selected, insert 1 row at the top
|
|
||||||
int row = 0, count = 1;
|
|
||||||
QItemSelection selection = deviceGroupList->selectionModel()->selection();
|
|
||||||
|
|
||||||
if (!portGroups_)
|
if (!portGroups_)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// In case nothing is selected, insert 1 row at the end
|
||||||
|
int row = portGroups_->getDeviceGroupModel()->rowCount(), count = 1;
|
||||||
|
QItemSelection selection = deviceGroupList->selectionModel()->selection();
|
||||||
|
|
||||||
// In case we have a single range selected; insert as many rows as
|
// In case we have a single range selected; insert as many rows as
|
||||||
// in the singe selected range before the top of the selected range
|
// in the singe selected range before the top of the selected range
|
||||||
if (selection.size() == 1) {
|
if (selection.size() == 1) {
|
||||||
|
@ -769,8 +769,8 @@ void PortsWindow::on_actionNew_Stream_triggered()
|
|||||||
{
|
{
|
||||||
qDebug("New Stream Action");
|
qDebug("New Stream Action");
|
||||||
|
|
||||||
// In case nothing is selected, insert 1 row at the top
|
// In case nothing is selected, insert 1 row at the end
|
||||||
int row = 0, count = 1;
|
int row = plm->getStreamModel()->rowCount(), count = 1;
|
||||||
|
|
||||||
// In case we have a single range selected; insert as many rows as
|
// In case we have a single range selected; insert as many rows as
|
||||||
// in the singe selected range before the top of the selected range
|
// in the singe selected range before the top of the selected range
|
||||||
|
Loading…
Reference in New Issue
Block a user