[Kst] extragear/graphics/kst/src/libkstapp

Eli Fidler eli at staikos.net
Tue Feb 20 01:43:46 CET 2007


SVN commit 635438 by fidler:

use full tags to identify object... this will fix some of the issues
with changed objects not being updated in the data manager (see bug
141597)

This does not fix updating equations.


 M  +22 -22    kstdatamanager_i.cpp  


--- trunk/extragear/graphics/kst/src/libkstapp/kstdatamanager_i.cpp #635437:635438
@@ -842,17 +842,17 @@
   for (QListViewItem *i = DataView->firstChild(); i; i = i->nextSibling()) {
     KstObjectItem *oi = static_cast<KstObjectItem*>(i);
     if (i->rtti() == RTTI_OBJ_OBJECT) {
-      if (KST::dataObjectList.findTag(oi->tag().tag()) == KST::dataObjectList.end()) {
+      if (KST::dataObjectList.findTag(oi->tag().tagString()) == KST::dataObjectList.end()) {
         trash.push(i);
       }
     } else if (i->rtti() == RTTI_OBJ_DATA_MATRIX || 
                i->rtti() == RTTI_OBJ_MATRIX ||
                i->rtti() == RTTI_OBJ_STATIC_MATRIX) {
-      if (KST::matrixList.findTag(oi->tag().tag()) == KST::matrixList.end()) {
+      if (KST::matrixList.findTag(oi->tag().tagString()) == KST::matrixList.end()) {
         trash.push(i);  
       }
     } else {
-      if (KST::vectorList.findTag(oi->tag().tag()) == KST::vectorList.end()) {
+      if (KST::vectorList.findTag(oi->tag().tagString()) == KST::vectorList.end()) {
         trash.push(i);
       }
     }
@@ -871,7 +871,7 @@
     bool found = false;
     for (QListViewItem *i = DataView->firstChild(); i; i = i->nextSibling()) {
       KstObjectItem *oi = static_cast<KstObjectItem*>(i);
-      if (oi->rtti() == RTTI_OBJ_OBJECT && oi->tag().tag() == (*it)->tag().tag()) {
+      if (oi->rtti() == RTTI_OBJ_OBJECT && oi->tag().tagString() == (*it)->tag().tagString()) {
         oi->update();
         found = true;
         break;
@@ -892,7 +892,7 @@
     bool found = false;
     for (QListViewItem *i = DataView->firstChild(); i; i = i->nextSibling()) {
       KstObjectItem *oi = static_cast<KstObjectItem*>(i);
-      if (oi->rtti() == RTTI_OBJ_DATA_VECTOR && oi->tag().tag() == (*it)->tag().tag()) {
+      if (oi->rtti() == RTTI_OBJ_DATA_VECTOR && oi->tag().tagString() == (*it)->tag().tagString()) {
         oi->update(true, 1);
         found = true;
         break;
@@ -911,7 +911,7 @@
     bool found = false;
     for (QListViewItem *i = DataView->firstChild(); i; i = i->nextSibling()) {
       KstObjectItem *oi = static_cast<KstObjectItem*>(i);
-      if (oi->rtti() == RTTI_OBJ_STATIC_VECTOR && oi->tag().tag() == (*it)->tag().tag()) {
+      if (oi->rtti() == RTTI_OBJ_STATIC_VECTOR && oi->tag().tagString() == (*it)->tag().tagString()) {
         oi->update(true, 1);
         found = true;
         break;
@@ -932,7 +932,7 @@
     bool found = false;
     for (QListViewItem *i = DataView->firstChild(); i; i = i->nextSibling()) {
       KstObjectItem *oi = static_cast<KstObjectItem*>(i);
-      if (oi->rtti() == RTTI_OBJ_DATA_MATRIX && oi->tag().tag() == (*it)->tag().tag()) {
+      if (oi->rtti() == RTTI_OBJ_DATA_MATRIX && oi->tag().tagString() == (*it)->tag().tagString()) {
         oi->update(true, 1);
         found = true;
         break;
@@ -951,7 +951,7 @@
     bool found = false;
     for (QListViewItem *i = DataView->firstChild(); i; i = i->nextSibling()) {
       KstObjectItem *oi = static_cast<KstObjectItem*>(i);
-      if (oi->rtti() == RTTI_OBJ_STATIC_MATRIX && oi->tag().tag() == (*it)->tag().tag()) {
+      if (oi->rtti() == RTTI_OBJ_STATIC_MATRIX && oi->tag().tagString() == (*it)->tag().tagString()) {
         oi->update(true, 1);
         found = true;
         break;
@@ -1025,25 +1025,25 @@
 
   if (koi->removable()) {
     if (qi->rtti() == RTTI_OBJ_OBJECT) {
-      doc->removeDataObject(koi->tag().tag());
+      doc->removeDataObject(koi->tag().tagString());
     } else if (qi->rtti() == RTTI_OBJ_DATA_VECTOR) {
       KST::vectorList.lock().writeLock();
-      KST::vectorList.removeTag(koi->tag().tag());
+      KST::vectorList.removeTag(koi->tag().tagString());
       KST::vectorList.lock().unlock();
       doUpdates();
     } else if (qi->rtti() == RTTI_OBJ_STATIC_VECTOR) {
       KST::vectorList.lock().writeLock();
-      KST::vectorList.removeTag(koi->tag().tag());
+      KST::vectorList.removeTag(koi->tag().tagString());
       KST::vectorList.lock().unlock();
       doUpdates();
     } else if (qi->rtti() == RTTI_OBJ_DATA_MATRIX) {
       KST::matrixList.lock().writeLock();
-      KST::matrixList.removeTag(koi->tag().tag());
+      KST::matrixList.removeTag(koi->tag().tagString());
       KST::matrixList.lock().unlock();  
       doUpdates();
     } else if (qi->rtti() == RTTI_OBJ_STATIC_MATRIX) {
       KST::matrixList.lock().writeLock();
-      KST::matrixList.removeTag(koi->tag().tag());
+      KST::matrixList.removeTag(koi->tag().tagString());
       KST::matrixList.lock().unlock();  
       doUpdates();
     }
@@ -1055,50 +1055,50 @@
 
       if (qi->rtti() == RTTI_OBJ_OBJECT) {
         koi->dataObject()->deleteDependents();
-        doc->removeDataObject(koi->tag().tag());
+        doc->removeDataObject(koi->tag().tagString());
       } else if (qi->rtti() == RTTI_OBJ_DATA_VECTOR) {
-        KstRVectorPtr x = kst_cast<KstRVector>(*KST::vectorList.findTag(koi->tag().tag()));
+        KstRVectorPtr x = kst_cast<KstRVector>(*KST::vectorList.findTag(koi->tag().tagString()));
         if (x) {
           x->deleteDependents();
           x = 0L;
           KST::vectorList.lock().writeLock();
-          KST::vectorList.removeTag(koi->tag().tag());
+          KST::vectorList.removeTag(koi->tag().tagString());
           KST::vectorList.lock().unlock();
           doUpdates();
         } else {
           KMessageBox::sorry(this, i18n("Unknown error deleting data vector."));
         }
       } else if (qi->rtti() == RTTI_OBJ_STATIC_VECTOR) {
-        KstSVectorPtr x = kst_cast<KstSVector>(*KST::vectorList.findTag(koi->tag().tag()));
+        KstSVectorPtr x = kst_cast<KstSVector>(*KST::vectorList.findTag(koi->tag().tagString()));
         if (x) {
           x->deleteDependents();
           x = 0L;
           KST::vectorList.lock().writeLock();
-          KST::vectorList.removeTag(koi->tag().tag());
+          KST::vectorList.removeTag(koi->tag().tagString());
           KST::vectorList.lock().unlock();
           doUpdates();
         } else {
           KMessageBox::sorry(this, i18n("Unknown error deleting static vector."));
         }
       } else if (qi->rtti() == RTTI_OBJ_DATA_MATRIX) {
-        KstRMatrixPtr x = kst_cast<KstRMatrix>(*KST::matrixList.findTag(koi->tag().tag()));
+        KstRMatrixPtr x = kst_cast<KstRMatrix>(*KST::matrixList.findTag(koi->tag().tagString()));
         if (x) {
           x->deleteDependents();
           x = 0L;
           KST::matrixList.lock().writeLock();
-          KST::matrixList.removeTag(koi->tag().tag());
+          KST::matrixList.removeTag(koi->tag().tagString());
           KST::matrixList.lock().unlock();
           doUpdates();
         } else {
           KMessageBox::sorry(this, i18n("Unknown error deleting data matrix."));
         }
       } else if (qi->rtti() == RTTI_OBJ_STATIC_MATRIX) {
-        KstSMatrixPtr x = kst_cast<KstSMatrix>(*KST::matrixList.findTag(koi->tag().tag()));
+        KstSMatrixPtr x = kst_cast<KstSMatrix>(*KST::matrixList.findTag(koi->tag().tagString()));
         if (x) {
           x->deleteDependents();
           x = 0L;
           KST::matrixList.lock().writeLock();
-          KST::matrixList.removeTag(koi->tag().tag());
+          KST::matrixList.removeTag(koi->tag().tagString());
           KST::matrixList.lock().unlock();
           doUpdates();
         } else {


More information about the Kst mailing list