When deleting spot, selects the remaining one just before, fixes #5269
This commit is contained in:
@@ -1718,28 +1718,32 @@ int ControlSpotPanel::getSelectedSpot()
|
||||
return id;
|
||||
}
|
||||
|
||||
void ControlSpotPanel::setSelectedSpot(const int id)
|
||||
bool ControlSpotPanel::setSelectedSpot(const int id)
|
||||
{
|
||||
// printf("setSelectedSpot: %d\n", id);
|
||||
|
||||
MyMutex::MyLock lock(mTreeview);
|
||||
|
||||
disableParamlistener(true);
|
||||
|
||||
const Gtk::TreeModel::Children children = treemodel_->children();
|
||||
|
||||
for (auto iter = children.begin(); iter != children.end(); iter++) {
|
||||
const Gtk::TreeModel::Row row = *iter;
|
||||
|
||||
if (row[spots_.id] == id) {
|
||||
disableParamlistener(true);
|
||||
|
||||
treeview_->set_cursor(treemodel_->get_path(row));
|
||||
load_ControlSpot_param();
|
||||
updateParamVisibility();
|
||||
updateCurveOpacity(row);
|
||||
|
||||
disableParamlistener(false);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
disableParamlistener(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
int ControlSpotPanel::getNewId()
|
||||
|
Reference in New Issue
Block a user