Skip to content

Commit da0c61e

Browse files
committed
- issue 3274: when deleting parametersets, go back to overview
1 parent 665ee37 commit da0c61e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

copasi/UI/CQParameterOverviewWidget.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,13 @@ bool CQParameterOverviewWidget::updateProtected(ListViews::ObjectType objectType
141141
}
142142
}
143143

144+
if (action == ListViews::DELETE && objectType == ListViews::ObjectType::MODELPARAMETERSET)
145+
{
146+
mpParameterSet = NULL;
147+
CopasiUI3Window::getMainWindow()->getMainWidget()->switchToOtherWidget(ListViews::WidgetType::ParameterSets, CRegisteredCommonName());
148+
return true;
149+
}
150+
144151
if (mIgnoreUpdates || !isVisible())
145152
{
146153
return true;
@@ -175,6 +182,7 @@ bool CQParameterOverviewWidget::updateProtected(ListViews::ObjectType objectType
175182
case ListViews::DELETE:
176183
mObjectCN.clear();
177184
mpObject = NULL;
185+
mpParameterSet = NULL;
178186

179187
enterProtected();
180188
break;
@@ -361,6 +369,8 @@ void CQParameterOverviewWidget::slotBtnDelete()
361369
ListViews::addUndoMetaData(this, UndoData);
362370

363371
slotNotifyChanges(mpDataModel->applyData(UndoData));
372+
373+
mpParameterSet = NULL;
364374
}
365375

366376
// virtual

0 commit comments

Comments
 (0)