mailr8539 - /branches/multi_structure/generic_fns/structure/api_base.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on January 19, 2009 - 15:49:
Author: bugman
Date: Mon Jan 19 15:49:58 2009
New Revision: 8539

URL: http://svn.gna.org/viewcvs/relax?rev=8539&view=rev
Log:
Fix for the ModelList.add_item() method.

If no ModelContainers are present, then don't try to change the model number!


Modified:
    branches/multi_structure/generic_fns/structure/api_base.py

Modified: branches/multi_structure/generic_fns/structure/api_base.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/multi_structure/generic_fns/structure/api_base.py?rev=8539&r1=8538&r2=8539&view=diff
==============================================================================
--- branches/multi_structure/generic_fns/structure/api_base.py (original)
+++ branches/multi_structure/generic_fns/structure/api_base.py Mon Jan 19 
15:49:58 2009
@@ -744,7 +744,7 @@
         """
 
         # If no model data exists, replace the empty first model with this 
model (just a renumbering).
-        if self.is_empty():
+        if len(self) and self.is_empty():
             self[0].num = model_num
 
         # Otherwise append an empty ModelContainer.




Related Messages


Powered by MHonArc, Updated Mon Jan 19 16:00:03 2009