File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -289,16 +289,21 @@ std::string generate_full_text_report(
289289
290290 size_t max_activity_width = 0 ;
291291 for (const auto & item : itinerary.items ) {
292- max_activity_width = std::max (max_activity_width, item.activity .length ());
292+ size_t len = item.activity .length ();
293+ if (item.activity == " Resting" ) len += 2 ;
294+ max_activity_width = std::max (max_activity_width, len);
293295 }
294296
295297 std::string tz_string = std::string (" UTC" ) + (itinerary.tz_offset >= 0 ? " +" : " " ) + std::to_string (itinerary.tz_offset );
296298 f << " \n Schedule for " << name << " (" << tz_string << " ):\n " ;
297299
298300 for (const auto & item : itinerary.items ) {
299301 double dur = item.end_local .diff_seconds (item.start_local );
302+ std::string display_act = item.activity ;
303+ if (display_act == " Resting" ) display_act = " " + display_act;
304+
300305 f << " " << item.start_local .to_string () << " to " << item.end_local .time_string ()
301- << " " << std::left << std::setw (max_activity_width) << item. activity
306+ << " " << std::left << std::setw (max_activity_width) << display_act
302307 << " (" << DateTime::format_duration ((long long )dur) << " )\n " ;
303308 }
304309 }
You can’t perform that action at this time.
0 commit comments