Qt: Fix a sequence dialog crash.
authorGerald Combs <gerald@wireshark.org>
Thu, 19 Jan 2017 23:23:29 +0000 (15:23 -0800)
committerAnders Broman <a.broman58@gmail.com>
Fri, 20 Jan 2017 02:25:36 +0000 (02:25 +0000)
If gui.geom.SequenceDialog.maximized is TRUE, loadGeometry will trigger
a resize event, which will in turn call resetAxes. Call loadGeometry
after we've initialized our various QCustomPlot bits so that resetAxes
doesn't crash.

Bug: 13329
Change-Id: I4d27683fb3eee0a7c897800401bfa3869e97662b
Reviewed-on: https://code.wireshark.org/review/19683
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
ui/qt/sequence_dialog.cpp

index a1d6868465e28607b519a4af4949fc5993aacd19..4033a14c2a3420f6cb2775cbcb15c9662554a17c 100644 (file)
@@ -74,7 +74,6 @@ SequenceDialog::SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *i
     sequence_w_(1)
 {
     ui->setupUi(this);
-    loadGeometry(parent.width(), parent.height() * 4 / 5);
 
     QCustomPlot *sp = ui->sequencePlot;
     setWindowSubtitle(info_ ? tr("Call Flow") : tr("Flow"));
@@ -175,6 +174,8 @@ SequenceDialog::SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *i
 
     ProgressFrame::addToButtonBox(ui->buttonBox, &parent);
 
+    loadGeometry(parent.width(), parent.height() * 4 / 5);
+
     connect(ui->horizontalScrollBar, SIGNAL(valueChanged(int)), this, SLOT(hScrollBarChanged(int)));
     connect(ui->verticalScrollBar, SIGNAL(valueChanged(int)), this, SLOT(vScrollBarChanged(int)));
     connect(sp->xAxis2, SIGNAL(rangeChanged(QCPRange)), this, SLOT(xAxisChanged(QCPRange)));