Skip to content

Commit

Permalink
- issue 3274: when deleting parametersets, go back to overview
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergmann committed Jan 15, 2025
1 parent 665ee37 commit da0c61e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions copasi/UI/CQParameterOverviewWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ bool CQParameterOverviewWidget::updateProtected(ListViews::ObjectType objectType
}
}

if (action == ListViews::DELETE && objectType == ListViews::ObjectType::MODELPARAMETERSET)
{
mpParameterSet = NULL;
CopasiUI3Window::getMainWindow()->getMainWidget()->switchToOtherWidget(ListViews::WidgetType::ParameterSets, CRegisteredCommonName());
return true;
}

if (mIgnoreUpdates || !isVisible())
{
return true;
Expand Down Expand Up @@ -175,6 +182,7 @@ bool CQParameterOverviewWidget::updateProtected(ListViews::ObjectType objectType
case ListViews::DELETE:
mObjectCN.clear();
mpObject = NULL;
mpParameterSet = NULL;

enterProtected();
break;
Expand Down Expand Up @@ -361,6 +369,8 @@ void CQParameterOverviewWidget::slotBtnDelete()
ListViews::addUndoMetaData(this, UndoData);

slotNotifyChanges(mpDataModel->applyData(UndoData));

mpParameterSet = NULL;
}

// virtual
Expand Down

0 comments on commit da0c61e

Please sign in to comment.