mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Notify UserData that view state should be preserved.
This is only active when a trace is loaded from a file (and state should be persistent for future sessions using this trace), or when state is saved to a file (so that future sessions will use current state). No state is preserved by default, i.e. when the trace was not saved to a file.
This commit is contained in:
@@ -148,6 +148,7 @@ View::View( FileRead& f, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont,
|
||||
|
||||
InitTextEditor();
|
||||
SetViewToLastFrames();
|
||||
m_userData.StateShouldBePreserved();
|
||||
}
|
||||
|
||||
View::~View()
|
||||
@@ -852,6 +853,7 @@ bool View::DrawConnection()
|
||||
}
|
||||
if( f )
|
||||
{
|
||||
m_userData.StateShouldBePreserved();
|
||||
m_saveThreadState.store( SaveThreadState::Saving, std::memory_order_relaxed );
|
||||
m_saveThread = std::thread( [this, f{std::move( f )}] {
|
||||
std::shared_lock<std::shared_mutex> lock( m_worker.GetDataLock() );
|
||||
|
||||
Reference in New Issue
Block a user