Reset event browser before it's added

* When we add it, if a log is already open that's when we get the
  callback to OnLogFileOpened to initialised. If we close afterwards,
  we'll be in an inconsistent state.
This commit is contained in:
baldurk
2017-06-01 18:50:14 +01:00
parent bf791b7854
commit 10aa73528d
+2 -2
View File
@@ -60,6 +60,8 @@ EventBrowser::EventBrowser(ICaptureContext &ctx, QWidget *parent)
{
ui->setupUi(this);
OnLogfileClosed();
m_Ctx.AddLogViewer(this);
clearBookmarks();
@@ -131,8 +133,6 @@ EventBrowser::EventBrowser(ICaptureContext &ctx, QWidget *parent)
ui->events->setContextMenuPolicy(Qt::CustomContextMenu);
QObject::connect(ui->events, &RDTreeWidget::customContextMenuRequested, this,
&EventBrowser::events_contextMenu);
OnLogfileClosed();
}
EventBrowser::~EventBrowser()