Skip to content

Commit

Permalink
[FIX] fixed the show box plot button toggling
Browse files Browse the repository at this point in the history
  • Loading branch information
azmat committed Feb 11, 2021
1 parent bf9862d commit 9c84f04
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
5 changes: 5 additions & 0 deletions src/gui/mzroll/eicwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1784,6 +1784,11 @@ void EicWidget::showBarPlot(bool f) {
optionBarPlotChecked(f);
}

void EicWidget::showBoxPlot(bool f) {
_showBoxPlot = f;
optionBoxPlotChecked(f);
}

void EicWidget::contextMenuEvent(QContextMenuEvent * event)
{
event->ignore();
Expand Down
5 changes: 2 additions & 3 deletions src/gui/mzroll/eicwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,7 @@ public Q_SLOTS:

void showBarPlot(bool f);

void showBoxPlot(bool f) {
_showBoxPlot = f;
}
void showBoxPlot(bool f);

void autoZoom(bool f) {
_autoZoom = f;
Expand Down Expand Up @@ -191,6 +189,7 @@ public Q_SLOTS:
void compoundSet(Compound*);
void optionTicChecked(bool);
void optionBarPlotChecked(bool);
void optionBoxPlotChecked(bool);

private:
EICLogic* eicParameters;
Expand Down
8 changes: 5 additions & 3 deletions src/gui/mzroll/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4247,9 +4247,11 @@ QWidget* MainWindowWidgetAction::createWidget(QWidget *parent) {
btnShowBoxplot->setToolTip(tr("Show box-plot"));
btnShowBoxplot->setCheckable(true);
btnShowBoxplot->setChecked(false);
connect(btnShowBoxplot,SIGNAL(toggled(bool)), mw->getEicWidget(),SLOT(showBoxPlot(bool)));
connect(btnShowBoxplot,SIGNAL(toggled(bool)),mw,SLOT(analyticsBoxPlot()));
connect(btnShowBoxplot,SIGNAL(toggled(bool)), mw->getEicWidget(), SLOT(replot()));
connect(btnShowBoxplot, &QToolButton::toggled, mw->getEicWidget(), &EicWidget::showBoxPlot);
connect(btnShowBoxplot, SIGNAL(toggled(bool)), mw, SLOT(analyticsBoxPlot()));
connect(btnShowBoxplot, SIGNAL(toggled(bool)), mw->getEicWidget(), SLOT(replot()));
connect(mw->getEicWidget(), &EicWidget::optionBoxPlotChecked, btnShowBoxplot, &QToolButton::setChecked);

return btnShowBoxplot;
}
else if (btnName == "spacer") {
Expand Down

0 comments on commit 9c84f04

Please sign in to comment.