mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-25 15:34:36 +00:00
Save plot height view data.
This commit is contained in:
parent
da8c2340b3
commit
b879f5b519
@ -145,6 +145,7 @@ void UserData::LoadState( ViewData& data )
|
|||||||
if( ini_sget( ini, "options", "ghostZones", "%d", &v ) ) data.ghostZones = v;
|
if( ini_sget( ini, "options", "ghostZones", "%d", &v ) ) data.ghostZones = v;
|
||||||
if( ini_sget( ini, "options", "frameTarget", "%d", &v ) ) data.frameTarget = v;
|
if( ini_sget( ini, "options", "frameTarget", "%d", &v ) ) data.frameTarget = v;
|
||||||
if( ini_sget( ini, "options", "shortenName", "%d", &v ) ) data.shortenName = (ShortenName)v;
|
if( ini_sget( ini, "options", "shortenName", "%d", &v ) ) data.shortenName = (ShortenName)v;
|
||||||
|
if( ini_sget( ini, "options", "plotHeight", "%d", &v ) ) data.plotHeight = v;
|
||||||
ini_free( ini );
|
ini_free( ini );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -193,6 +194,7 @@ void UserData::SaveState( const ViewData& data )
|
|||||||
fprintf( f, "ghostZones = %d\n", data.ghostZones );
|
fprintf( f, "ghostZones = %d\n", data.ghostZones );
|
||||||
fprintf( f, "frameTarget = %d\n", data.frameTarget );
|
fprintf( f, "frameTarget = %d\n", data.frameTarget );
|
||||||
fprintf( f, "shortenName = %d\n", (int)data.shortenName );
|
fprintf( f, "shortenName = %d\n", (int)data.shortenName );
|
||||||
|
fprintf( f, "plotHeight = %d\n", data.plotHeight );
|
||||||
fclose( f );
|
fclose( f );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ bool View::DrawPlot( const TimelineContext& ctx, PlotData& plot, const std::vect
|
|||||||
const auto hover = ctx.hover;
|
const auto hover = ctx.hover;
|
||||||
const auto ty = ctx.ty;
|
const auto ty = ctx.ty;
|
||||||
|
|
||||||
const auto PlotHeight = GetViewData().plotHeight * GetScale();
|
const auto PlotHeight = m_vd.plotHeight * GetScale();
|
||||||
|
|
||||||
auto yPos = wpos.y + offset;
|
auto yPos = wpos.y + offset;
|
||||||
if( yPos + PlotHeight >= ctx.yMin && yPos <= ctx.yMax )
|
if( yPos + PlotHeight >= ctx.yMin && yPos <= ctx.yMax )
|
||||||
|
Loading…
Reference in New Issue
Block a user