Commit 36b5dc94 authored by Claes Sjofors's avatar Claes Sjofors

Xtt sev curve window, initial time period set

parent d7725839
......@@ -99,6 +99,8 @@ XttSevHistGtk::XttSevHistGtk( void *parent_ctx,
curve->remove_cb = sevhist_remove_cb;
curve->export_cb = sevhist_export_cb;
curve->enable( curve_mEnable_Timebox | curve_mEnable_Export | curve_mEnable_ExportTime);
if ( initial_period != time_ePeriod_)
curve->set_period( initial_period, 1);
if ( w)
*w = (GtkWidget *)curve->get_widget();
......
......@@ -72,7 +72,7 @@ XttSevHist::XttSevHist( void *parent_ctx,
sevcli_tCtx xn_scctx,
int *sts) :
xnav(parent_ctx), gcd(0), curve(0), rows(0), vsize(0), timerid(0), close_cb(0), help_cb(0),
get_select_cb(0), first_scan(1), scctx(xn_scctx), time_low_old(0), time_high_old(0)
get_select_cb(0), first_scan(1), scctx(xn_scctx), time_low_old(0), time_high_old(0), initial_period(time_ePeriod_)
{
pwr_tTime from, to;
......@@ -101,8 +101,11 @@ XttSevHist::XttSevHist( void *parent_ctx,
time_Period( time_ePeriod_OneMonth, &from, &to, 0, 0);
get_data( sts, from, to);
if ( EVEN(*sts)) return;
initial_period = time_ePeriod_OneMonth;
}
else if ( EVEN(*sts)) return;
else
initial_period = time_ePeriod_OneHour;
}
else {
get_multidata( sts, from, to);
......@@ -122,7 +125,7 @@ XttSevHist::XttSevHist( void *parent_ctx,
char *filename,
int *sts) :
xnav(parent_ctx), gcd(0), curve(0), rows(0), vsize(0), timerid(0), close_cb(0), help_cb(0),
get_select_cb(0), first_scan(1), scctx(0), time_low_old(0), time_high_old(0)
get_select_cb(0), first_scan(1), scctx(0), time_low_old(0), time_high_old(0), initial_period(time_ePeriod_)
{
strncpy( title, filename, sizeof(title));
......
......@@ -94,6 +94,7 @@ class XttSevHist {
long int time_low_old;
long int time_high_old;
bool sevhistobjectv[XTT_SEVHIST_MAX]; //!< Indicates that it is a SevHistObject
time_ePeriod initial_period;
//! Constructor
XttSevHist( void *xn_parent_ctx,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment