Skip to content

Commit

Permalink
Bug 3221: Renaming is only performed in the model the change occurs.
Browse files Browse the repository at this point in the history
  • Loading branch information
shoops committed Mar 19, 2024
1 parent 6286e96 commit 356adb4
Show file tree
Hide file tree
Showing 180 changed files with 1,042 additions and 992 deletions.
136 changes: 66 additions & 70 deletions copasi/CopasiDataModel/CDataModel.cpp

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions copasi/MIRIAMUI/CQMiriamWidget.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 - 2021 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand Down Expand Up @@ -120,8 +120,8 @@ CQMiriamWidget::CQMiriamWidget(QWidget *parent, const char *name)

connect((*itDM), SIGNAL(signalNotifyChanges(const CUndoData::CChangeSet &)),
this, SLOT(slotNotifyChanges(const CUndoData::CChangeSet &)));
connect((*itDM), SIGNAL(notifyGUI(ListViews::ObjectType, ListViews::Action, const CCommonName &)),
this, SLOT(protectedNotify(ListViews::ObjectType, ListViews::Action, const CCommonName &)));
connect((*itDM), SIGNAL(notifyGUI(ListViews::ObjectType, ListViews::Action, const CRegisteredCommonName &)),
this, SLOT(protectedNotify(ListViews::ObjectType, ListViews::Action, const CRegisteredCommonName &)));
connect((*itDM), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)),
this, SLOT(dataChanged(const QModelIndex &, const QModelIndex &)));
}
Expand Down Expand Up @@ -313,7 +313,7 @@ void CQMiriamWidget::slotBtnClearClicked()
}
}

bool CQMiriamWidget::updateProtected(ListViews::ObjectType objectType, ListViews::Action action, const CCommonName & cn)
bool CQMiriamWidget::updateProtected(ListViews::ObjectType objectType, ListViews::Action action, const CRegisteredCommonName & cn)
{
// Assure that the pointer is still valid;
mpAnnotation = CAnnotation::castObject(mpObject);
Expand All @@ -327,7 +327,7 @@ bool CQMiriamWidget::updateProtected(ListViews::ObjectType objectType, ListViews
mpModifiedDM->setMIRIAMInfo(NULL);

mpMIRIAMInfo = NULL;
mObjectCN = CCommonName("");
mObjectCN = CRegisteredCommonName();

return true;
}
Expand Down
4 changes: 2 additions & 2 deletions copasi/MIRIAMUI/CQMiriamWidget.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 - 2021 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand Down Expand Up @@ -49,7 +49,7 @@ class CQMiriamWidget : public CopasiWidget, public Ui::CQMiriamWidget

protected:
virtual bool enterProtected();
virtual bool updateProtected(ListViews::ObjectType objectType, ListViews::Action action, const CCommonName & cn);
virtual bool updateProtected(ListViews::ObjectType objectType, ListViews::Action action, const CRegisteredCommonName & cn) override;
virtual bool leaveProtected();
virtual void showEvent(QShowEvent * event);

Expand Down
4 changes: 2 additions & 2 deletions copasi/MIRIAMUI/CQRDFTreeView.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand Down Expand Up @@ -54,7 +54,7 @@ CQRDFTreeView::~CQRDFTreeView()

bool CQRDFTreeView::updateProtected(ListViews::ObjectType /* objectType */,
ListViews::Action /* action */,
const CCommonName & cn)
const CRegisteredCommonName & cn)
{
// Assure that the pointer is still valid;
mpAnnotation = CAnnotation::castObject(mpObject);
Expand Down
9 changes: 7 additions & 2 deletions copasi/MIRIAMUI/CQRDFTreeView.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
// Copyright (C) 2017 by Pedro Mendes, Virginia Tech Intellectual
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.

// Copyright (C) 2017 - 2018 by Pedro Mendes, Virginia Tech Intellectual
// Properties, Inc., University of Heidelberg, and University of
// of Connecticut School of Medicine.
// All rights reserved.
Expand Down Expand Up @@ -35,7 +40,7 @@ class CQRDFTreeView : public CopasiWidget, public Ui::CQRDFTreeView
CQRDFTreeView(QWidget* parent = 0, const char* name = 0);
virtual ~CQRDFTreeView();

virtual bool updateProtected(ListViews::ObjectType objectType, ListViews::Action action, const CCommonName & cn);
virtual bool updateProtected(ListViews::ObjectType objectType, ListViews::Action action, const CRegisteredCommonName & cn) override;

protected:
virtual bool enterProtected();
Expand Down
4 changes: 2 additions & 2 deletions copasi/UI/CLNAResultWidget.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand Down Expand Up @@ -69,7 +69,7 @@ bool CLNAResultWidget::saveToBackend()

bool CLNAResultWidget::updateProtected(ListViews::ObjectType objectType,
ListViews::Action action,
const CCommonName & cn)
const CRegisteredCommonName & cn)
{
if (objectType == ListViews::ObjectType::MODEL && action == ListViews::ADD)
mCentralWidget->loadAll(NULL);
Expand Down
4 changes: 2 additions & 2 deletions copasi/UI/CLNAResultWidget.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 - 2020 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand Down Expand Up @@ -35,7 +35,7 @@ protected slots:

protected:
virtual bool enterProtected();
virtual bool updateProtected(ListViews::ObjectType objectType, ListViews::Action action, const CCommonName & cn);
virtual bool updateProtected(ListViews::ObjectType objectType, ListViews::Action action, const CRegisteredCommonName & cn) override;
virtual bool leaveProtected();

bool saveToBackend();
Expand Down
4 changes: 2 additions & 2 deletions copasi/UI/CMCAResultWidget.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand Down Expand Up @@ -81,7 +81,7 @@ bool CMCAResultWidget::saveToBackend()

bool CMCAResultWidget::updateProtected(ListViews::ObjectType objectType,
ListViews::Action action,
const CCommonName & cn)
const CRegisteredCommonName & cn)
{
if (objectType == ListViews::ObjectType::MODEL && action == ListViews::ADD)
mCentralWidget->loadAll(NULL);
Expand Down
4 changes: 2 additions & 2 deletions copasi/UI/CMCAResultWidget.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 - 2020 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand Down Expand Up @@ -45,7 +45,7 @@ protected slots:

protected:
virtual bool enterProtected();
virtual bool updateProtected(ListViews::ObjectType objectType, ListViews::Action action, const CCommonName & cn);
virtual bool updateProtected(ListViews::ObjectType objectType, ListViews::Action action, const CRegisteredCommonName & cn) override;
virtual bool leaveProtected();

bool saveToBackend();
Expand Down
4 changes: 2 additions & 2 deletions copasi/UI/CQAnalyticsWidget.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 - 2023 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand Down Expand Up @@ -363,7 +363,7 @@ void CQAnalyticsWidget::updateValues()
}

// virtual
bool CQAnalyticsWidget::updateProtected(ListViews::ObjectType objectType, ListViews::Action action, const CCommonName & cn)
bool CQAnalyticsWidget::updateProtected(ListViews::ObjectType objectType, ListViews::Action action, const CRegisteredCommonName & cn)
{
TaskWidget::updateProtected(objectType, action, cn);

Expand Down
4 changes: 2 additions & 2 deletions copasi/UI/CQAnalyticsWidget.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand Down Expand Up @@ -45,7 +45,7 @@ class CQAnalyticsWidget : public TaskWidget, public Ui::CQAnalyticsWidget
virtual bool saveTaskProtected();
virtual bool loadTaskProtected();
virtual bool taskFinishedEvent();
virtual bool updateProtected(ListViews::ObjectType objectType, ListViews::Action action, const CCommonName & cn);
virtual bool updateProtected(ListViews::ObjectType objectType, ListViews::Action action, const CRegisteredCommonName & cn) override;

protected slots:

Expand Down
4 changes: 2 additions & 2 deletions copasi/UI/CQBaseDataModel.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 - 2021 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2019 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand Down Expand Up @@ -76,7 +76,7 @@ public slots:
bool mFetchDisabled;

signals:
void notifyGUI(ListViews::ObjectType objectType, ListViews::Action action, const CCommonName & cn);
void notifyGUI(ListViews::ObjectType objectType, ListViews::Action action, const CRegisteredCommonName & cn);
void signalNotifyChanges(const CUndoData::CChangeSet & changes);
};

Expand Down
4 changes: 2 additions & 2 deletions copasi/UI/CQBaseTreeDataModel.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2020 by Pedro Mendes, Rector and Visitors of the
// Copyright (C) 2020 - 2024 by Pedro Mendes, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
Expand Down Expand Up @@ -53,7 +53,7 @@ public slots:
int mFramework;

signals:
void notifyGUI(ListViews::ObjectType objectType, ListViews::Action action, const CCommonName & cn);
void notifyGUI(ListViews::ObjectType objectType, ListViews::Action action, const CRegisteredCommonName & cn);
void signalNotifyChanges(const CUndoData::CChangeSet & changes);
};

Expand Down
Loading

0 comments on commit 356adb4

Please sign in to comment.