1
0
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:
Bartosz Taudul
2019-08-28 19:37:01 +02:00
parent 949c9cb121
commit dc5444ff0f
3 changed files with 12 additions and 0 deletions
+6
View File
@@ -10,6 +10,7 @@ namespace tracy
constexpr auto FileDescription = "description";
UserData::UserData()
: m_preserveState( false )
{
}
@@ -52,6 +53,11 @@ bool UserData::SetDescription( const char* description )
return true;
}
void UserData::StateShouldBePreserved()
{
m_preserveState = true;
}
FILE* UserData::OpenFile( const char* filename, bool write )
{
const auto path = GetSavePath( m_program.c_str(), m_time, filename, write );