mirror of
https://github.com/The-OpenROAD-Project/OpenDB.git
synced 2026-03-06 17:31:17 +08:00
callbacks init
This commit is contained in:
@@ -438,6 +438,11 @@ void dbITerm::connect(dbITerm* iterm_, dbNet* net_)
|
||||
_dbNet* net = (_dbNet*) net_;
|
||||
_dbBlock* block = (_dbBlock*) iterm->getOwner();
|
||||
|
||||
//Do Nothing if already connected
|
||||
if (iterm->_net==net->getOID())
|
||||
return;
|
||||
|
||||
|
||||
if (iterm->_net != 0)
|
||||
disconnect(iterm_);
|
||||
|
||||
|
||||
@@ -427,6 +427,9 @@ void dbInst::setOrigin(int x, int y)
|
||||
_dbBlock* block = (_dbBlock*) inst->getOwner();
|
||||
int prev_x = inst->_x;
|
||||
int prev_y = inst->_y;
|
||||
//Do Nothin if same origin, But What if uninitialized and x=y=0
|
||||
if(prev_x==x&&prev_y==y)
|
||||
return;
|
||||
|
||||
inst->_x = x;
|
||||
inst->_y = y;
|
||||
@@ -495,6 +498,8 @@ dbOrientType dbInst::getOrient()
|
||||
|
||||
void dbInst::setOrient(dbOrientType orient)
|
||||
{
|
||||
if(orient==getOrient())
|
||||
return;
|
||||
_dbInst* inst = (_dbInst*) this;
|
||||
_dbBlock* block = (_dbBlock*) inst->getOwner();
|
||||
|
||||
|
||||
BIN
tests/unitTestsPython/__pycache__/helper.cpython-38.pyc
Normal file
BIN
tests/unitTestsPython/__pycache__/helper.cpython-38.pyc
Normal file
Binary file not shown.
BIN
tests/unitTestsPython/__pycache__/odbUnitTest.cpython-38.pyc
Normal file
BIN
tests/unitTestsPython/__pycache__/odbUnitTest.cpython-38.pyc
Normal file
Binary file not shown.
Reference in New Issue
Block a user