]> git.donarmstrong.com Git - mothur.git/blobdiff - collectorscurvedata.h
sffinfo bug with flow grams right index when clipQualRight=0
[mothur.git] / collectorscurvedata.h
index bde016a62c1c6adbbcc88bfec758530a0840e52d..d32a9e06480c72e5a00e5eaac5a123f407d759c0 100644 (file)
@@ -43,13 +43,23 @@ public:
        void registerDisplay(Display* o)                {       displays.insert(o);                     };
        void removeDisplay(Display* o)                  {       displays.erase(o);      delete o;       };
        void SharedDataChanged()                                {       notifyDisplays();                               };
-       void updateSharedData(vector<SharedRAbundVector*> s, int numSeqs, int numGroupComb)     {       shared = s; NumSeqs = numSeqs; NumGroupComb = numGroupComb; SharedDataChanged();        };
+       void updateSharedData(vector<SharedRAbundVector*> s, int numSeqs, int numGroupComb, bool p)     {       pairs = p; shared = s; NumSeqs = numSeqs; NumGroupComb = numGroupComb; SharedDataChanged();     };
        
        void notifyDisplays(){  
                for(set<Display*>::iterator pos=displays.begin();pos!=displays.end();pos++){
-//cout << (*pos)->getName() << endl;
-                       if ( ( ((*pos)->isCalcMultiple() == true) && ((*pos)->getAll() == true) ) || (shared.size() == 2)  ) {
+                       
+                       if ((*pos)->calcNeedsAll() == true) {
                                (*pos)->update(shared, NumSeqs, NumGroupComb);
+                       }else{
+                               
+                               if ( ((*pos)->isCalcMultiple() == true) && ((*pos)->getAll() == true) && (!pairs) ) {
+                                       (*pos)->update(shared, NumSeqs, NumGroupComb);
+                               }else {
+                                       vector<SharedRAbundVector*> temp; temp.push_back(shared[0]); temp.push_back(shared[1]);
+                                       shared = temp; 
+                                       
+                                       (*pos)->update(shared, NumSeqs, NumGroupComb);
+                               }
                        }
                }       
        };
@@ -59,6 +69,7 @@ private:
        vector<Display*> multiDisplays;
        vector<SharedRAbundVector*> shared;
        int NumSeqs, NumGroupComb;
+       bool pairs;
 };
 
 /***********************************************************************/