]> OCCT Git - occt-wok.git/commitdiff
No comments
authorcas <cas@opencascade.com>
Fri, 28 Jun 2002 18:10:53 +0000 (18:10 +0000)
committercas <cas@opencascade.com>
Fri, 28 Jun 2002 18:10:53 +0000 (18:10 +0000)
src/WOKStep/WOKStep_TKReplace.cxx

index b6eb60e0c48c56d99c033ff67da25dad947cf839..17f43eb0ce8815541d2d9e21bff13bde1b1dce26 100755 (executable)
@@ -365,6 +365,10 @@ Handle(TCollection_HAsciiString) WOKStep_TKReplace::GetTKForUnit(const Handle(TC
   if(mytks.Extent())
     {
       Standard_Integer i, uidx = myuds.FindIndex(aunit);
+      if ( uidx == 0 ) { 
+       // aunit  is not in the list -> certainly a toolkit ; so return aunit
+       result = aunit ;
+      } else {
 
       for(i=mymatrix->LowerRow(); i<=mymatrix->UpperRow(); i++)
        {
@@ -390,7 +394,10 @@ _TEST_BREAK();
                }
            }
        }
+      }
+
     }
+
   return result;
 }
 
@@ -413,9 +420,7 @@ Handle(WOKMake_OutputFile) WOKStep_TKReplace::SubstituteInput(const Handle(WOKMa
       Handle(TCollection_HAsciiString) current = TheUnit->Name();
 
       mytreated.Add(current);
-
       Handle(TCollection_HAsciiString) curtk = GetTKForUnit(current);
-
       if(!curtk.IsNull())
        {
          // gerer l'apparition de ce TK
@@ -550,7 +555,7 @@ Handle(WOKMake_OutputFile) WOKStep_TKReplace::SubstituteInput(const Handle(WOKMa
                                                                   afile -> File () -> Nesting ()
                                                                  );
    Handle( TCollection_HAsciiString ) current = TheUnit -> Name ();
-   Handle( TCollection_HAsciiString ) curtk   = GetTKForUnit ( current );
+   Handle( TCollection_HAsciiString ) curtk = GetTKForUnit ( current );
    Handle( TCollection_HAsciiString ) libname = curtk.IsNull () ? current : curtk;
 
    if (  !mytreated.Contains ( libname )  ) {
@@ -605,8 +610,7 @@ _TEST_BREAK();
 #endif  // WNT
            {
              Handle(WOKernel_DevUnit) TheUnit = Unit()->Session()->GetDevUnit(afile->File()->Nesting());
-             Handle(TCollection_HAsciiString) atk = GetTKForUnit(TheUnit->Name());
-             
+             Handle(TCollection_HAsciiString) atk = TheUnit->Name() ;
              if(!atk.IsNull())
                {
                  mydirecttks.Add(atk);