aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasil Velichkov <vasko@192.168.1.12>2018-07-24 18:13:33 +0300
committerAnders Broman <a.broman58@gmail.com>2018-07-30 12:19:49 +0000
commit7e755f71ad605e7b403d5fd52ef247042715ff7f (patch)
tree476935d5dea316b71038b9d832d69b846f9aebed
parent02b2c86c53a519572a564db57ff7decafb5d8d57 (diff)
SCTPGraphDialog: fix displaying a single TSN
When the SCTP association contains a single DATA/SACK chunk in direction the max and min TSN values are equal and as a result the Y axis range is (maxTSN, maxTSN) or (0, 0) and the dots for the TSN are not visible To fix this always set the Y axis maximum to maxTSN + 1 similar to the X axis maximum of max_secs + 1 Also removed one unused local variable Change-Id: Id38eb4dbd13a8ebbba98d4df00f3707331bd1464 Reviewed-on: https://code.wireshark.org/review/28862 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--ui/qt/sctp_graph_dialog.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/ui/qt/sctp_graph_dialog.cpp b/ui/qt/sctp_graph_dialog.cpp
index c06257a734..82bc5794b3 100644
--- a/ui/qt/sctp_graph_dialog.cpp
+++ b/ui/qt/sctp_graph_dialog.cpp
@@ -363,12 +363,11 @@ void SCTPGraphDialog::drawGraph()
connect(ui->sctpPlot, SIGNAL(plottableClick(QCPAbstractPlottable*,QMouseEvent*)), this, SLOT(graphClicked(QCPAbstractPlottable*, QMouseEvent*)));
// set axes ranges, so we see all data:
QCPRange myXRange(selected_assoc->min_secs, (selected_assoc->max_secs+1));
- QCPRange myYRange;
if (relative) {
- QCPRange myYRange(0, maxTSN - minTSN);
+ QCPRange myYRange(0, maxTSN - minTSN + 1);
ui->sctpPlot->yAxis->setRange(myYRange);
} else {
- QCPRange myYRange(minTSN, maxTSN);
+ QCPRange myYRange(minTSN, maxTSN + 1);
ui->sctpPlot->yAxis->setRange(myYRange);
}
ui->sctpPlot->xAxis->setRange(myXRange);