File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed
Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -28,13 +28,15 @@ namespace decode {
2828
2929Row::Row () :
3030 _decoder (NULL ),
31- _row (NULL )
31+ _row (NULL ),
32+ _order (-1 )
3233{
3334}
3435
35- Row::Row (const srd_decoder *decoder, const srd_decoder_annotation_row *row) :
36+ Row::Row (const srd_decoder *decoder, const srd_decoder_annotation_row *row, const int order ) :
3637 _decoder (decoder),
37- _row (row)
38+ _row (row),
39+ _order (order)
3840{
3941}
4042
@@ -69,7 +71,7 @@ const QString Row::title() const
6971bool Row::operator <(const Row &other) const
7072{
7173 return (_decoder < other._decoder ) ||
72- (_decoder == other._decoder && _row < other._row );
74+ (_decoder == other._decoder && _order < other._order );
7375}
7476
7577} // decode
Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ class Row
3939 ~Row ();
4040
4141 Row (const srd_decoder *decoder,
42- const srd_decoder_annotation_row *row = NULL );
42+ const srd_decoder_annotation_row *row = NULL ,
43+ const int order = -1 );
4344
4445 const srd_decoder* decoder () const ;
4546 const srd_decoder_annotation_row* row () const ;
@@ -51,6 +52,7 @@ class Row
5152private:
5253 const srd_decoder *_decoder;
5354 const srd_decoder_annotation_row *_row;
55+ int _order;
5456};
5557
5658} // decode
Original file line number Diff line number Diff line change @@ -147,13 +147,14 @@ void DecoderStack::build_row()
147147 }
148148
149149 // Add the decoder rows
150+ int order = 0 ;
150151 for (const GSList *l = decc->annotation_rows ; l; l = l->next )
151152 {
152153 const srd_decoder_annotation_row *const ann_row =
153154 (srd_decoder_annotation_row *)l->data ;
154155 assert (ann_row);
155156
156- const Row row (decc, ann_row);
157+ const Row row (decc, ann_row, order );
157158
158159 // Add a new empty row data object
159160 _rows[row] = decode::RowData ();
@@ -173,6 +174,8 @@ void DecoderStack::build_row()
173174 ll; ll = ll->next )
174175 _class_rows[make_pair (decc,
175176 GPOINTER_TO_INT (ll->data ))] = row;
177+
178+ order++;
176179 }
177180 }
178181}
You can’t perform that action at this time.
0 commit comments