forked from osmocom/wireshark
Reload IO Graph Y fields when reload Lua plugins
Change-Id: Ic3b9096c3c25839dd7d7bfe7af71eeb5b0bd745d Reviewed-on: https://code.wireshark.org/review/10239 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
parent
bc4487a6fc
commit
7b35992b7a
|
@ -334,6 +334,7 @@ void IOGraphDialog::addGraph(bool checked, QString name, QString dfilter, int co
|
|||
ti->setData(sma_period_col_, Qt::UserRole, moving_average);
|
||||
|
||||
connect(this, SIGNAL(recalcGraphData(capture_file *)), iog, SLOT(recalcGraphData(capture_file *)));
|
||||
connect(this, SIGNAL(reloadValueUnitFields()), iog, SLOT(reloadValueUnitField()));
|
||||
connect(&cap_file_, SIGNAL(captureFileClosing()), iog, SLOT(captureFileClosing()));
|
||||
connect(iog, SIGNAL(requestRetap()), this, SLOT(scheduleRetap()));
|
||||
connect(iog, SIGNAL(requestRecalc()), this, SLOT(scheduleRecalc()));
|
||||
|
@ -456,6 +457,11 @@ void IOGraphDialog::scheduleRetap(bool now)
|
|||
if (now) updateStatistics();
|
||||
}
|
||||
|
||||
void IOGraphDialog::reloadFields()
|
||||
{
|
||||
emit reloadValueUnitFields();
|
||||
}
|
||||
|
||||
void IOGraphDialog::keyPressEvent(QKeyEvent *event)
|
||||
{
|
||||
int pan_pixels = event->modifiers() & Qt::ShiftModifier ? 1 : 10;
|
||||
|
@ -1931,6 +1937,13 @@ void IOGraph::captureFileClosing()
|
|||
remove_tap_listener(this);
|
||||
}
|
||||
|
||||
void IOGraph::reloadValueUnitField()
|
||||
{
|
||||
if (vu_field_.length() > 0) {
|
||||
setValueUnitField(vu_field_);
|
||||
}
|
||||
}
|
||||
|
||||
void IOGraph::setInterval(int interval)
|
||||
{
|
||||
interval_ = interval;
|
||||
|
|
|
@ -95,6 +95,7 @@ public:
|
|||
public slots:
|
||||
void recalcGraphData(capture_file *cap_file);
|
||||
void captureFileClosing();
|
||||
void reloadValueUnitField();
|
||||
|
||||
signals:
|
||||
void requestReplot();
|
||||
|
@ -150,6 +151,7 @@ public slots:
|
|||
void scheduleReplot(bool now = false);
|
||||
void scheduleRecalc(bool now = false);
|
||||
void scheduleRetap(bool now = false);
|
||||
void reloadFields();
|
||||
|
||||
protected:
|
||||
void keyPressEvent(QKeyEvent *event);
|
||||
|
@ -159,6 +161,7 @@ signals:
|
|||
void goToPacket(int packet_num);
|
||||
void recalcGraphData(capture_file *);
|
||||
void intervalChanged(int interval);
|
||||
void reloadValueUnitFields();
|
||||
|
||||
private:
|
||||
Ui::IOGraphDialog *ui;
|
||||
|
|
|
@ -201,6 +201,7 @@ signals:
|
|||
void displayFilterSuccess(bool success);
|
||||
void monospaceFontChanged(const QFont &mono_font);
|
||||
void closePacketDialogs();
|
||||
void reloadFields();
|
||||
|
||||
public slots:
|
||||
// in main_window_slots.cpp
|
||||
|
|
|
@ -1325,6 +1325,8 @@ void MainWindow::fieldsChanged()
|
|||
// Recreate packet list columns according to new/changed/deleted fields
|
||||
packet_list_->fieldsChanged(CaptureFile::globalCapFile());
|
||||
}
|
||||
|
||||
emit reloadFields();
|
||||
}
|
||||
|
||||
void MainWindow::showAccordionFrame(AccordionFrame *show_frame, bool toggle)
|
||||
|
@ -2883,6 +2885,7 @@ void MainWindow::statCommandIOGraph(const char *, void *)
|
|||
{
|
||||
IOGraphDialog *iog_dialog = new IOGraphDialog(*this, capture_file_);
|
||||
connect(iog_dialog, SIGNAL(goToPacket(int)), packet_list_, SLOT(goToPacket(int)));
|
||||
connect(this, SIGNAL(reloadFields()), iog_dialog, SLOT(reloadFields()));
|
||||
iog_dialog->show();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue