Skip to content

Commit

Permalink
Remove LifetimedPtr from MeshWarpingTabSharedState
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkewley committed Feb 14, 2025
1 parent 78859df commit 659dbe4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions libopensimcreator/UI/MeshWarper/MeshWarpingTabSharedState.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace osc
std::shared_ptr<SceneCache> sceneCache_) :

m_TabID{tabID_},
m_Parent{parent_.weak_ref()},
m_Parent{&parent_},
m_SceneCache{std::move(sceneCache_)}
{
OSC_ASSERT(m_SceneCache != nullptr);
Expand Down Expand Up @@ -183,8 +183,9 @@ namespace osc

void closeTab()
{
CloseTabEvent e{m_TabID};
m_Parent->on_event(e);
if (m_Parent) {
App::post_event<CloseTabEvent>(*m_Parent, m_TabID);
}
}

bool canUndo() const
Expand Down Expand Up @@ -260,7 +261,7 @@ namespace osc
UID m_TabID;

// handle to the screen that owns the TPS3D tab
LifetimedPtr<Widget> m_Parent;
Widget* m_Parent;

// cached TPS3D algorithm result (to prevent recomputing it over and over)
TPSResultCache m_WarpingCache;
Expand Down

0 comments on commit 659dbe4

Please sign in to comment.