From: Gerald Combs Date: Thu, 19 Jan 2017 23:23:29 +0000 (-0800) Subject: Qt: Fix a sequence dialog crash. X-Git-Url: http://git.samba.org/?p=metze%2Fwireshark%2Fwip.git;a=commitdiff_plain;h=c38f2be9907eb24d50ac29e9bd9c4c3e54805979 Qt: Fix a sequence dialog crash. 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 Petri-Dish: Gerald Combs Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- diff --git a/ui/qt/sequence_dialog.cpp b/ui/qt/sequence_dialog.cpp index a1d6868465..4033a14c2a 100644 --- a/ui/qt/sequence_dialog.cpp +++ b/ui/qt/sequence_dialog.cpp @@ -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)));