diff options
author | Irene RĂ¼ngeler <I.Ruengeler@fh-muenster.de> | 2013-12-17 09:51:34 +0000 |
---|---|---|
committer | Irene RĂ¼ngeler <I.Ruengeler@fh-muenster.de> | 2013-12-17 09:51:34 +0000 |
commit | 7eb50571f4fd69c7ce0ad3c39e193ad36bbcc437 (patch) | |
tree | 895e7f3388552784bec08e07ce82c9eca28d6828 /ui/qt/sctp_graph_byte_dialog.cpp | |
parent | 25a74d3f2aaff7c0273d66c0313ed172d3f37662 (diff) | |
download | wireshark-7eb50571f4fd69c7ce0ad3c39e193ad36bbcc437.tar.gz |
Find the right frame when plottable was clicked.
svn path=/trunk/; revision=54167
Diffstat (limited to 'ui/qt/sctp_graph_byte_dialog.cpp')
-rw-r--r-- | ui/qt/sctp_graph_byte_dialog.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/ui/qt/sctp_graph_byte_dialog.cpp b/ui/qt/sctp_graph_byte_dialog.cpp index 8619b39b95..8c6e3da989 100644 --- a/ui/qt/sctp_graph_byte_dialog.cpp +++ b/ui/qt/sctp_graph_byte_dialog.cpp @@ -57,15 +57,12 @@ void SCTPGraphByteDialog::drawBytesGraph() tsn_t *tsn; guint8 type; guint32 maxBytes; - // guint32 minBytes, maxBytes; long sumBytes = 0; - // printf("drawBytesGraph\n"); + if (direction == 1) { - //minBytes = 0; //selected_assoc->min_tsn1; maxBytes = selected_assoc->n_data_bytes_ep1; listTSN = g_list_last(selected_assoc->tsn1); } else { - //minBytes = 0; //selected_assoc->min_tsn2; maxBytes = selected_assoc->n_data_bytes_ep2; listTSN = g_list_last(selected_assoc->tsn2); } @@ -83,7 +80,6 @@ void SCTPGraphByteDialog::drawBytesGraph() sumBytes += length; yb.append(sumBytes); xb.append(tsn->secs + tsn->usecs/1000000.0); - // printf("x=%f y=%ld\n", tsn->secs + tsn->usecs/1000000.0, sumBytes); fb.append(tsn->frame_number); } tlist = g_list_next(tlist); @@ -143,7 +139,7 @@ void SCTPGraphByteDialog::on_pushButton_4_clicked() void SCTPGraphByteDialog::graphClicked(QCPAbstractPlottable* plottable, QMouseEvent* event) { if (plottable->name().contains("Bytes", Qt::CaseInsensitive)) { - double bytes = (ui->sctpPlot->yAxis->pixelToCoord(event->pos().y())); // FIXME IRENE + double bytes = ui->sctpPlot->yAxis->pixelToCoord(event->pos().y()); int i; for (i = 0; i < yb.size(); i++) { if (bytes <= yb.value(i)) { @@ -157,8 +153,8 @@ void SCTPGraphByteDialog::graphClicked(QCPAbstractPlottable* plottable, QMouseEv ui->hintLabel->setText(QString("<small><i>Graph %1: Received bytes=%2 Time=%3 secs </i></small>") .arg(plottable->name()) - .arg(yb.value(i)) - .arg(xb.value(i))); + .arg(yb.value(i)) + .arg(xb.value(i))); } } |