Skip to content
Snippets Groups Projects
Commit 78897e15 authored by Langella Olivier's avatar Langella Olivier
Browse files

max or sum selection bug fixed

parent 39b108fd
No related branches found
No related tags found
No related merge requests found
......@@ -137,8 +137,12 @@ ExportMasschroqDialog::getMasschroqFileParameters() const
params.xic_extraction_range = ui->xicRangeWidget->getPrecision();
params.xic_extraction_method = ui->xic_extraction_method_widget->getXicExtractionMethod();
params.xic_extraction_method =
ui->xic_extraction_method_widget->getXicExtractionMethod();
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__ << " "
<< (int)params.xic_extraction_method;
return params;
}
......
......@@ -124,9 +124,9 @@ MasschroqFileParameters::load()
settings.value("export_masschroqml/xic_extraction_range", "10 ppm")
.toString());
/*
xic_extraction_method =
settings.value("export_masschroqml/xic_extraction_method", "max")
.toString();
*/
(pappso::XicExtractMethod)settings
.value("export_masschroqml/xic_extraction_method",
QString("%1").arg((std::uint8_t)pappso::XicExtractMethod::max))
.toUInt();
}
......@@ -56,8 +56,21 @@ XicExtractionMethodWidget::XicExtractionMethodWidget(QWidget *parent)
QString("%1").arg((std::uint8_t)pappso::XicExtractMethod::max))
.toUInt();
mp_methodComboBox->setCurrentIndex((std::uint8_t)m_oldMethod);
if((m_oldMethod != pappso::XicExtractMethod::max) &&
((m_oldMethod != pappso::XicExtractMethod::sum)))
{
m_oldMethod = pappso::XicExtractMethod::max;
}
if(m_oldMethod == pappso::XicExtractMethod::max)
{
mp_methodComboBox->setCurrentIndex(0);
}
if(m_oldMethod == pappso::XicExtractMethod::sum)
{
mp_methodComboBox->setCurrentIndex(1);
}
connect(mp_methodComboBox,
SIGNAL(currentIndexChanged(int)),
this,
......@@ -74,8 +87,24 @@ XicExtractionMethodWidget::~XicExtractionMethodWidget()
void
XicExtractionMethodWidget::setCurrentIndex(int index)
{
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__;
pappso::XicExtractMethod new_method = (pappso::XicExtractMethod)index;
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__ << " "
<< index;
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__ << " "
<< (int)m_oldMethod;
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__ << " "
<< (int)pappso::XicExtractMethod::max;
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__ << " "
<< (int)pappso::XicExtractMethod::sum;
pappso::XicExtractMethod new_method = pappso::XicExtractMethod::max;
if(index == 0)
{
new_method = pappso::XicExtractMethod::max;
}
if(index == 1)
{
new_method = pappso::XicExtractMethod::sum;
}
if(m_oldMethod != new_method)
{
......@@ -91,5 +120,8 @@ XicExtractionMethodWidget::setCurrentIndex(int index)
pappso::XicExtractMethod
XicExtractionMethodWidget::getXicExtractionMethod() const
{
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__ << " "
<< (int)m_oldMethod;
return m_oldMethod;
}
......@@ -71,6 +71,8 @@ MassChroQml::MassChroQml(const QString &out_filename,
: m_params(params)
{
//_p_digestion_pipeline = p_digestion_pipeline;
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__ << " "
<< (int)m_params.xic_extraction_method;
//_mzidentml = "http://psidev.info/psi/pi/mzIdentML/1.1";
QString complete_out_filename = out_filename;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment