Commit c4b557a6 authored by Claes Sjofors's avatar Claes Sjofors

Xtt trend export bugfix

parent 6e3f8fe1
......@@ -424,6 +424,9 @@ void GeCurveGtk::activate_export_ok( GtkWidget *w, gpointer data)
int nr;
int idx = 0;
from = pwr_cNTime;
time_GetTime( &to);
value = gtk_combo_box_get_active_text( GTK_COMBO_BOX(((GeCurveGtk *)curve)->export_attrcombo_widget));
if ( !value) return;
......
......@@ -700,7 +700,23 @@ int XttTCurve::tcurve_export_cb( void *ctx, pwr_tTime *from, pwr_tTime *to, int
int rowcnt;
int resolution;
dcli_translate_filename( fname, filename);
// Replace $date with date
strncpy( fname, filename, sizeof(fname));
char *s1 = strstr( fname, "$date");
if ( s1) {
char timstr[40];
pwr_tFileName str;
sts = time_AtoAscii( 0, time_eFormat_FileDateAndTime,
timstr, sizeof(timstr));
strncpy( str, s1 + strlen("$date"), sizeof(str));
*s1 = 0;
strncat( fname, timstr, sizeof(fname));
strncat( fname, str, sizeof(fname));
}
dcli_translate_filename( fname, fname);
fp = fopen( fname, "w");
if ( !fp)
......
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