From: Mikko Rasa Date: Sat, 2 Apr 2011 19:48:37 +0000 (+0000) Subject: Display composition during extend X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=7f81613ba3efdff6e05246738f739e1f914e1151;p=r2c2.git Display composition during extend --- diff --git a/source/designer/manipulator.cpp b/source/designer/manipulator.cpp index 359fbbb..01633fa 100644 --- a/source/designer/manipulator.cpp +++ b/source/designer/manipulator.cpp @@ -484,11 +484,23 @@ void Manipulator::pointer_motion(int x, int y) delete *i; extend_tracks = trks; + map counts; length = 0; for(vector::iterator i=extend_tracks.begin(); i!=extend_tracks.end(); ++i) + { length += (*i)->get_type().get_total_length(); - - signal_status.emit(format("Extend: %.0fmm", length*1000)); + ++counts[(*i)->get_type().get_article_number()]; + } + + string detail; + for(map::const_iterator i=counts.begin(); i!=counts.end(); ++i) + { + if(!detail.empty()) + detail += ", "; + detail += format("%dx %s", i->second, i->first); + } + + signal_status.emit(format("Extend: %.0fmm (%s)", length*1000, detail)); } } }