[Ktechlab-devel] Another bug with subcircuits

P Zoltan zoltan.padrah at gmail.com
Sun Feb 15 23:34:37 UTC 2009


> PS: I'm looking for a solution to work-around this issue, because this is
> quite annoying, even if you don't mess up everything by changing your  
> local
> sub-circuits.

  Here are some findings after 2 hours of debugging:

  In
  void SubcircuitData::initECSubcircuit( ECSubcircuit * ecSubcircuit )
the member m_connectorDataMap contains connectors with the ids that  
collide with the newly created ids. In a strange manner, those connectors  
go from node with id "" to another node with id "" (that is empty string).

  If the circuit is printed with the toXML() method, those connectors don't  
show up in the output. :|

  Some general info: in the above mentioned method "this" is the subcircuit  
to be merged and the parameter of the method represents the cicuit seen by  
the user.

  Debugging this still sucks for me, because of the program is interrupted  
when a dragging operation is in process, the mouse becomes unusable for me  
(it has a "can't drop here" cursor, and can't make clicks).

  A quick-and-dirty solution^H^Hhack would be to control the behaviour of  
the Connector constructor by setting a static parameter in the class: if  
it's not set, it doesn't allow to override existing connector ids, and if  
it's set, it allows such operation. If we don't want to clean up the 0.3  
branch, and just go for the rewrite, we could accept this hacks.  
Otherwise, prepare the debuggers.. :)





More information about the Ktechlab-devel mailing list