[GME-commit] GMESRC/GME/Gme/AutoRoute AutoRouter.cpp,1.9,1.10

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Wed Aug 25 16:36:34 CDT 2004


Update of /var/lib/gme/GMESRC/GME/Gme/AutoRoute
In directory braindrain:/tmp/cvs-serv9882/GME/Gme/AutoRoute

Modified Files:
	AutoRouter.cpp 
Log Message:
Optional label avoidance for connections

CVS User: volgy

Index: AutoRouter.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/AutoRoute/AutoRouter.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** AutoRouter.cpp	19 Jul 2004 15:22:59 -0000	1.9
--- AutoRouter.cpp	25 Aug 2004 20:36:32 -0000	1.10
***************
*** 179,187 ****
  	CRect loc = object->GetLocation();
  	box->SetRect(loc);
! 	
! 	CArBox *nameBox;
! 	nameBox = router->CreateBox();
! 	CRect nameLoc = object->GetNameLocation();
! 	nameBox->SetRect(nameLoc);
  
  	CGuiPortList &ports = object->GetPorts();
--- 179,189 ----
  	CRect loc = object->GetLocation();
  	box->SetRect(loc);
! 
! 	CArBox *nameBox = NULL;
! 	if (theApp.labelAvoidance) {
! 		nameBox = router->CreateBox();
! 		CRect nameLoc = object->GetNameLocation();
! 		nameBox->SetRect(nameLoc);
! 	}
  
  	CGuiPortList &ports = object->GetPorts();
***************
*** 198,204 ****
  
  	object->SetRouterBox(box);
! 	object->SetRouterNameBox(nameBox);
  	router->Add(box);
! 	router->Add(nameBox);
  }
  
--- 200,212 ----
  
  	object->SetRouterBox(box);
! 	if (theApp.labelAvoidance) {
! 		object->SetRouterNameBox(nameBox);
! 	}
! 
  	router->Add(box);
! 
! 	if (theApp.labelAvoidance) {
! 		router->Add(nameBox);
! 	}
  }
  
***************
*** 245,249 ****
  	if (object->IsVisible()) {
  		router->Delete(object->GetRouterBox());
! 		router->Delete(object->GetRouterNameBox());
  		object->SetRouterBox(0);
  		object->SetRouterNameBox(0);
--- 253,262 ----
  	if (object->IsVisible()) {
  		router->Delete(object->GetRouterBox());
! 		if (theApp.labelAvoidance) {
! 			CArBox *nameBox = object->GetRouterNameBox();
! 			if (nameBox) {
! 				router->Delete(nameBox);
! 			}
! 		}
  		object->SetRouterBox(0);
  		object->SetRouterNameBox(0);
***************
*** 298,302 ****
  		CGuiObject *obj = objectList.GetNext(pos);
  		router->ShiftBy(obj->GetRouterBox(),offs);
! 		router->ShiftBy(obj->GetRouterNameBox(),offs);
  	}
  	AutoRoute();
--- 311,321 ----
  		CGuiObject *obj = objectList.GetNext(pos);
  		router->ShiftBy(obj->GetRouterBox(),offs);
! 		if (theApp.labelAvoidance) {
! 			CArBox *nameBox = obj->GetRouterNameBox();
! 			if (nameBox) {
! 				router->ShiftBy(nameBox,offs);
! 			}
! 			
! 		}
  	}
  	AutoRoute();



More information about the GME-commit mailing list