Save plot height view data.

This commit is contained in:
Martijn Courteaux 2024-05-08 10:43:14 +02:00
parent da8c2340b3
commit b879f5b519
2 changed files with 3 additions and 1 deletions

View File

@ -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", "frameTarget", "%d", &v ) ) data.frameTarget = 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 );
}
}
@ -193,6 +194,7 @@ void UserData::SaveState( const ViewData& data )
fprintf( f, "ghostZones = %d\n", data.ghostZones );
fprintf( f, "frameTarget = %d\n", data.frameTarget );
fprintf( f, "shortenName = %d\n", (int)data.shortenName );
fprintf( f, "plotHeight = %d\n", data.plotHeight );
fclose( f );
}
}

View File

@ -21,7 +21,7 @@ bool View::DrawPlot( const TimelineContext& ctx, PlotData& plot, const std::vect
const auto hover = ctx.hover;
const auto ty = ctx.ty;
const auto PlotHeight = GetViewData().plotHeight * GetScale();
const auto PlotHeight = m_vd.plotHeight * GetScale();
auto yPos = wpos.y + offset;
if( yPos + PlotHeight >= ctx.yMin && yPos <= ctx.yMax )