diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8df429b34b0b6a81bcd5d7ed519b2d0cb3815b9e..74c5329c76141ce293dc33f70880f734a54099c7 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -28,8 +28,8 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Xml_EXECUTABLE_COMPILE_FLAGS} ${Qt5
 
 #sudo apt-get install libpappsomspp-dev
 #FIND_PACKAGE( Pappsomspp REQUIRED )
-#SET (PAPPSOMSPP_DIR  "/home/olivier/eclipse/git/pappsomspp")
- SET (PAPPSOMSPP_DIR  "/home/langella/developpement/git/pappsomspp")
+SET (PAPPSOMSPP_DIR  "/home/olivier/eclipse/git/pappsomspp")
+# SET (PAPPSOMSPP_DIR  "/home/langella/developpement/git/pappsomspp")
  SET (PAPPSOMSPP_INCLUDE_DIR "${PAPPSOMSPP_DIR}/src")
  SET (PAPPSOMSPP_QT5_LIBRARY "${PAPPSOMSPP_DIR}/cbuild/src/libpappsomspp-qt5.so")
  SET (PAPPSOMSPP_WIDGET_QT5_LIBRARY "${PAPPSOMSPP_DIR}/cbuild/src/pappsomspp/widget/libpappsomspp-widget-qt5.so")
diff --git a/src/gui/peptide_detail_view/peptide_detail_view.ui b/src/gui/peptide_detail_view/peptide_detail_view.ui
index d0fd5c0816d0feabbd3d74eedb6f0471b57499aa..c443433f3a1ccd37a8c426b0aa04dbdaa844bd3a 100644
--- a/src/gui/peptide_detail_view/peptide_detail_view.ui
+++ b/src/gui/peptide_detail_view/peptide_detail_view.ui
@@ -293,28 +293,7 @@
             </property>
             <layout class="QHBoxLayout" name="horizontalLayout_6">
              <item>
-              <widget class="QComboBox" name="precision_unit_combobox">
-               <item>
-                <property name="text">
-                 <string>dalton</string>
-                </property>
-               </item>
-               <item>
-                <property name="text">
-                 <string>ppm</string>
-                </property>
-               </item>
-              </widget>
-             </item>
-             <item>
-              <widget class="QDoubleSpinBox" name="precision_spinbox">
-               <property name="singleStep">
-                <double>0.100000000000000</double>
-               </property>
-               <property name="value">
-                <double>0.500000000000000</double>
-               </property>
-              </widget>
+              <widget class="pappso::PrecisionWidget" name="precision_widget" native="true"/>
              </item>
             </layout>
            </widget>
@@ -353,6 +332,12 @@
    <header>pappsomspp/widget/spectrumwidget/spectrumwidget.h</header>
    <container>1</container>
   </customwidget>
+  <customwidget>
+   <class>pappso::PrecisionWidget</class>
+   <extends>QWidget</extends>
+   <header>pappsomspp/widget/precisionwidget/precisionwidget.h</header>
+   <container>1</container>
+  </customwidget>
  </customwidgets>
  <resources/>
  <connections>
@@ -372,38 +357,6 @@
     </hint>
    </hints>
   </connection>
-  <connection>
-   <sender>precision_spinbox</sender>
-   <signal>valueChanged(double)</signal>
-   <receiver>PeptideDetailView</receiver>
-   <slot>doMsmsPrecisionValueChanged(double)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>801</x>
-     <y>346</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>870</x>
-     <y>368</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>precision_unit_combobox</sender>
-   <signal>currentIndexChanged(QString)</signal>
-   <receiver>PeptideDetailView</receiver>
-   <slot>doMsmsPrecisionUnitChanged(QString)</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>716</x>
-     <y>324</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>873</x>
-     <y>278</y>
-    </hint>
-   </hints>
-  </connection>
   <connection>
    <sender>pushButton_2</sender>
    <signal>clicked()</signal>
@@ -436,12 +389,30 @@
     </hint>
    </hints>
   </connection>
+  
+  
+  <connection>
+   <sender>precision_widget</sender>
+   <signal>precisionChanged(pappso::PrecisionP)</signal>
+   <receiver>PeptideDetailView</receiver>
+   <slot>doMsmsPrecisionChanged(pappso::PrecisionP)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>373</x>
+     <y>117</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>977</x>
+     <y>204</y>
+    </hint>
+   </hints>
+  </connection>
+  
  </connections>
  <slots>
   <slot>chooseDefaultMzDataDir()</slot>
   <slot>openInPeptideViewer()</slot>
-  <slot>doMsmsPrecisionValueChanged(double)</slot>
-  <slot>doMsmsPrecisionUnitChanged(QString)</slot>
   <slot>doSaveSvg()</slot>
+  <slot>doMsmsPrecisionChanged(pappso::PrecisionP)</slot>
  </slots>
 </ui>
diff --git a/src/gui/peptide_detail_view/peptidewindow.cpp b/src/gui/peptide_detail_view/peptidewindow.cpp
index 63b69ca0911b1af87e0ab947fb3a80223c978f17..12a38faf9f8ab9ec836e860df9948109ac2d4b30 100644
--- a/src/gui/peptide_detail_view/peptidewindow.cpp
+++ b/src/gui/peptide_detail_view/peptidewindow.cpp
@@ -79,8 +79,8 @@ PeptideWindow::PeptideWindow(ProjectWindow *parent):
     QString unit = settings.value("peptideview/precision_unit", "dalton").toString();
     pappso::mz precision = settings.value("peptideview/precision_value", "0.2").toDouble();
 
-    ui->precision_unit_combobox->setCurrentIndex(ui->precision_unit_combobox->findText(unit));
-    ui->precision_spinbox->setValue(precision);
+    //ui->precision_unit_combobox->setCurrentIndex(ui->precision_unit_combobox->findText(unit));
+    //ui->precision_spinbox->setValue(precision);
 
     if (unit == "dalton") {
         _p_precision = pappso::Precision::getDaltonInstance(precision);
@@ -292,48 +292,20 @@ void PeptideWindow::setPeptideEvidence(PeptideEvidence * p_peptide_evidence) {
     qDebug() << "PeptideWindow::setPeptideEvidence end";
 }
 
-void PeptideWindow::doMsmsPrecisionUnitChanged(QString unit) {
+void PeptideWindow::doMsmsPrecisionChanged(pappso::PrecisionP precision) {
 
-    qDebug() << "PeptideWindow::doMsmsPrecisionUnitChanged begin " << unit;
+    qDebug() << "PeptideWindow::doMsmsPrecisionChanged begin " << precision->toString();
     QSettings settings;
-    pappso::mz precision = ui->precision_spinbox->value();
-
-
-    if (unit == "dalton") {
-        _p_precision = pappso::Precision::getDaltonInstance(precision);
-    } else {
-        _p_precision = pappso::Precision::getPpmInstance(precision);
-    }
+    _p_precision = precision;
     ui->spectrum_widget->setMs2Precision(_p_precision);
     qDebug() << "PeptideWindow::doMsmsPrecisionUnitChanged plot ";
     ui->spectrum_widget->plot();
 
-    settings.setValue("peptideview/precision_unit", unit);
+    settings.setValue("peptideview/precision", precision->toString());
 
-    qDebug() << "PeptideWindow::doMsmsPrecisionUnitChanged end " << unit;
+    qDebug() << "PeptideWindow::doMsmsPrecisionUnitChanged end ";
 }
 
-void PeptideWindow::doMsmsPrecisionValueChanged(double precision_value) {
-
-    QSettings settings;
-    QString unit = ui->precision_unit_combobox->currentText();
-    pappso::mz precision = precision_value;
-
-
-    if (unit == "dalton") {
-        _p_precision = pappso::Precision::getDaltonInstance(precision);
-    } else {
-        _p_precision = pappso::Precision::getPpmInstance(precision);
-    }
-    ui->spectrum_widget->setMs2Precision(_p_precision);
-
-    qDebug() << "PeptideWindow::doMsmsPrecisionValueChanged plot ";
-    ui->spectrum_widget->plot();
-
-    settings.setValue("peptideview/precision_value", precision);
-}
-
-
 void PeptideWindow::doSaveSvg() {
 
     try {
diff --git a/src/gui/peptide_detail_view/peptidewindow.h b/src/gui/peptide_detail_view/peptidewindow.h
index 3b06d289f7bdf5b67e1ef1f0e6825306e17e5471..6c1709138c43a6fe241b4bd729bea4d5377f71b7 100644
--- a/src/gui/peptide_detail_view/peptidewindow.h
+++ b/src/gui/peptide_detail_view/peptidewindow.h
@@ -79,8 +79,7 @@ signals:
 
 protected slots:
     void doSpectrumSpReady(pappso::SpectrumSp spectrum_sp, QString error, QString fatal_error);
-    void doMsmsPrecisionValueChanged(double precision_value);
-    void doMsmsPrecisionUnitChanged(QString unit);
+    void doMsmsPrecisionChanged(pappso::PrecisionP);
     void doSaveSvg();
     void chooseDefaultMzDataDir();
     void openInPeptideViewer();