callbacks init

This commit is contained in:
osamahammad21
2020-10-05 16:11:18 +02:00
parent c095760fc6
commit 9c4d5359a5
4 changed files with 10 additions and 0 deletions

View File

@@ -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_);

View File

@@ -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();