Fixes #1294 - Companion, Delete action without a selection
This commit is contained in:
@@ -272,6 +272,9 @@ void InputsPanel::setSelectedByExpoList(QList<int> list)
|
|||||||
|
|
||||||
void InputsPanel::exposDelete(bool ask)
|
void InputsPanel::exposDelete(bool ask)
|
||||||
{
|
{
|
||||||
|
QList<int> list = createExpoListFromSelected();
|
||||||
|
if(list.isEmpty()) return;
|
||||||
|
|
||||||
QMessageBox::StandardButton ret = QMessageBox::No;
|
QMessageBox::StandardButton ret = QMessageBox::No;
|
||||||
|
|
||||||
if(ask)
|
if(ask)
|
||||||
@@ -281,7 +284,7 @@ void InputsPanel::exposDelete(bool ask)
|
|||||||
|
|
||||||
|
|
||||||
if ((ret == QMessageBox::Yes) || (!ask)) {
|
if ((ret == QMessageBox::Yes) || (!ask)) {
|
||||||
exposDeleteList(createExpoListFromSelected());
|
exposDeleteList(list);
|
||||||
emit modified();
|
emit modified();
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -322,6 +322,9 @@ void MixesPanel::setSelectedByMixList(QList<int> list)
|
|||||||
|
|
||||||
void MixesPanel::mixersDelete(bool ask)
|
void MixesPanel::mixersDelete(bool ask)
|
||||||
{
|
{
|
||||||
|
QList<int> list = createMixListFromSelected();
|
||||||
|
if(list.isEmpty()) return;
|
||||||
|
|
||||||
QMessageBox::StandardButton ret = QMessageBox::No;
|
QMessageBox::StandardButton ret = QMessageBox::No;
|
||||||
|
|
||||||
if(ask)
|
if(ask)
|
||||||
@@ -331,7 +334,7 @@ void MixesPanel::mixersDelete(bool ask)
|
|||||||
|
|
||||||
|
|
||||||
if ((ret == QMessageBox::Yes) || (!ask)) {
|
if ((ret == QMessageBox::Yes) || (!ask)) {
|
||||||
mixersDeleteList(createMixListFromSelected());
|
mixersDeleteList(list);
|
||||||
emit modified();
|
emit modified();
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user