[MOAB-dev] r1422 - MOAB/trunk/tools/qvdual

tautges at mcs.anl.gov tautges at mcs.anl.gov
Tue Nov 27 07:22:53 CST 2007


Author: tautges
Date: 2007-11-27 07:22:53 -0600 (Tue, 27 Nov 2007)
New Revision: 1422

Modified:
   MOAB/trunk/tools/qvdual/DrawDual.cpp
   MOAB/trunk/tools/qvdual/DrawDual.hpp
   MOAB/trunk/tools/qvdual/uiQVDual.ui.h
Log:
Make manual pick identification update text fields in gui better.


Modified: MOAB/trunk/tools/qvdual/DrawDual.cpp
===================================================================
--- MOAB/trunk/tools/qvdual/DrawDual.cpp	2007-11-27 00:42:49 UTC (rev 1421)
+++ MOAB/trunk/tools/qvdual/DrawDual.cpp	2007-11-27 13:22:53 UTC (rev 1422)
@@ -297,7 +297,7 @@
 
 }
 
-void DrawDual::print_picked_ents(MBRange &picked_ents) 
+void DrawDual::print_picked_ents(MBRange &picked_ents, bool from_return) 
 {
   for (MBRange::iterator rit = picked_ents.begin(); rit != picked_ents.end(); rit++) {
     MBEntityHandle picked_ent = *rit;
@@ -332,8 +332,17 @@
       first = false;
     }
 
-    if (picked_ent == *picked_ents.begin()) {
+    if (from_return) {
       std::cout << oss.str() << " (" << picked_ent << ")" << std::endl;
+      pickLine2->setText(QString(oss.str().c_str()));
+      pickLine1->setText("");
+      gDrawDual->secondLastPickedEnt = gDrawDual->lastPickedEnt;
+      gDrawDual->lastPickedEnt = picked_ent;
+
+      gDrawDual->update_high_polydatas();
+    }
+    else if (picked_ent == *picked_ents.begin()) {
+      std::cout << oss.str() << " (" << picked_ent << ")" << std::endl;
       pickLine2->setText(pickLine1->displayText());
       pickLine1->setText(QString(oss.str().c_str()));
 

Modified: MOAB/trunk/tools/qvdual/DrawDual.hpp
===================================================================
--- MOAB/trunk/tools/qvdual/DrawDual.hpp	2007-11-27 00:42:49 UTC (rev 1421)
+++ MOAB/trunk/tools/qvdual/DrawDual.hpp	2007-11-27 13:22:53 UTC (rev 1422)
@@ -46,7 +46,8 @@
 
   MBErrorCode reset_drawn_sheets(MBRange *drawn_sheets = NULL);
   
-  void print_picked_ents(MBRange &picked_ents);
+  void print_picked_ents(MBRange &picked_ents,
+                         bool from_return = false);
 
 private:
 

Modified: MOAB/trunk/tools/qvdual/uiQVDual.ui.h
===================================================================
--- MOAB/trunk/tools/qvdual/uiQVDual.ui.h	2007-11-27 00:42:49 UTC (rev 1421)
+++ MOAB/trunk/tools/qvdual/uiQVDual.ui.h	2007-11-27 13:22:53 UTC (rev 1422)
@@ -1102,5 +1102,5 @@
   picked_ents.clear();
   picked_ents.insert(dual_ent);
     
-  vtkMOABUtils::drawDual->print_picked_ents(picked_ents);
+  vtkMOABUtils::drawDual->print_picked_ents(picked_ents, true);
 }




More information about the moab-dev mailing list