From d86abcd88cfce647e10f9ef2298d3359e05cdc1e Mon Sep 17 00:00:00 2001
From: Olivier Langella <olivier.langella@u-psud.fr>
Date: Sat, 20 Jan 2018 11:20:25 +0100
Subject: [PATCH] raise protein list window

---
 src/core/tandem_run/tandemcondorprocess.cpp | 5 +++++
 src/gui/project_view/projectwindow.cpp      | 5 +++--
 src/input/xtandemsaxhandler.cpp             | 5 +++++
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/core/tandem_run/tandemcondorprocess.cpp b/src/core/tandem_run/tandemcondorprocess.cpp
index 67708b38d..f7fb0630f 100644
--- a/src/core/tandem_run/tandemcondorprocess.cpp
+++ b/src/core/tandem_run/tandemcondorprocess.cpp
@@ -329,6 +329,11 @@ void TandemCondorProcess::getCondorJobState() {
     arguments << "-xml" << QString("%1").arg(_condor_cluster_number);
 
     QProcess condor_q_process;
+    //QProcess::error(QProcess::ProcessError)
+    //finished(int,QProcess::ExitStatus)
+    //connect(&condor_q_process, &QProcess::finished, this, &TandemCondorProcess::receivedCondorQueueProcessCompleted);
+    //connect(&condor_q_process, &QProcess::error, this, &TandemCondorProcess::receivedCondorQueueProcessError);
+
     //hk_process->setWorkingDirectory(QFileInfo(_hardklor_exe).absolutePath());
     qDebug() << "TandemCondorProcess::getCondorJobState command " << _condor_q_command << " " << arguments.join(" ");
     condor_q_process.start(_condor_q_command, arguments);
diff --git a/src/gui/project_view/projectwindow.cpp b/src/gui/project_view/projectwindow.cpp
index 2b5767403..ae2680806 100644
--- a/src/gui/project_view/projectwindow.cpp
+++ b/src/gui/project_view/projectwindow.cpp
@@ -155,6 +155,7 @@ void ProjectWindow::connectNewPtmIslandListWindow() {
 void ProjectWindow::connectNewProteinListWindow() {
     qDebug() << "ProjectWindow::connectNewProteinListWindow begin";
     _p_current_protein_list_window = new ProteinListWindow(this);
+    
     _protein_list_window_collection.push_back(_p_current_protein_list_window);
 
     qDebug() << "ProjectWindow::connectNewProteinListWindow end";
@@ -572,8 +573,8 @@ void ProjectWindow::doViewProteinList(IdentificationGroup* p_identification_grou
 
 
     _p_current_protein_list_window->show();
-    //_p_current_protein_list_window->raise();
-    //_p_current_protein_list_window->activateWindow();
+    _p_current_protein_list_window->raise();
+    _p_current_protein_list_window->activateWindow();
 
     qDebug() << "ProjectWindow::doViewProteinList end " << p_identification_group;
     _p_current_protein_list_window->setIdentificationGroup(p_identification_group);
diff --git a/src/input/xtandemsaxhandler.cpp b/src/input/xtandemsaxhandler.cpp
index 7647f8155..38eb327b8 100644
--- a/src/input/xtandemsaxhandler.cpp
+++ b/src/input/xtandemsaxhandler.cpp
@@ -348,6 +348,11 @@ bool XtandemSaxHandler::endElement_note() {
             //to fit most cases, just check that the :reversed chars added by X!Tandem are not in the description. if so, then add it too in the accession
             _p_protein_match->getProteinXtpSp().get()->setAccession(QString("%1%2").arg(_p_protein_match->getProteinXtpSp().get()->getAccession()).arg(":reversed"));
         }
+        //for older versions < 2013.09.01.1
+        if (!_p_protein_match->getProteinXtpSp().get()->getAccession().endsWith("|reversed") && _p_protein_match->getProteinXtpSp().get()->getDescription().endsWith("|reversed")) {
+            //to fit most cases, just check that the :reversed chars added by X!Tandem are not in the description. if so, then add it too in the accession
+            _p_protein_match->getProteinXtpSp().get()->setAccession(QString("%1%2").arg(_p_protein_match->getProteinXtpSp().get()->getAccession()).arg("|reversed"));
+        }
     }
     else {
 
-- 
GitLab