~ubuntu-branches/ubuntu/precise/fritzing/precise

« back to all changes in this revision

Viewing changes to src/items/via.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Georges Khaznadar
  • Date: 2011-08-26 10:11:05 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110826101105-w5hmn7zcf93ig5v6
Tags: 0.6.3b-1
* upgrapded to the newer upstream version
* parameters of the function GraphicsUtils::distanceFromLine in 
  src/svg/groundplanegenerator.cpp:767 are now declared as doubles,
  which Closes: #636441
* the new version fixes src/utils/folderutils.cpp, which
  Closes: #636061

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
********************************************************************
20
20
 
21
 
$Revision: 5143 $:
 
21
$Revision: 5233 $:
22
22
$Author: cohen@irascible.com $:
23
 
$Date: 2011-07-01 02:37:01 +0200 (Fri, 01 Jul 2011) $
 
23
$Date: 2011-07-15 00:15:31 +0200 (Fri, 15 Jul 2011) $
24
24
 
25
25
********************************************************************/
26
26
 
87
87
 
88
88
void Via::setBothConnectors(ItemBase * itemBase, SvgIdLayer * svgIdLayer) 
89
89
{
90
 
        foreach (QGraphicsItem * child, itemBase->childItems()) {
91
 
                ConnectorItem * connectorItem = dynamic_cast<ConnectorItem *>(child);
92
 
                if (connectorItem == NULL) continue;
93
 
 
 
90
        foreach (ConnectorItem * connectorItem, itemBase->cachedConnectorItems()) {
94
91
                connectorItem->setRect(svgIdLayer->m_rect);
95
92
                connectorItem->setTerminalPoint(svgIdLayer->m_point);
96
93
                connectorItem->setRadius(svgIdLayer->m_radius, svgIdLayer->m_strokeWidth);
124
121
}
125
122
 
126
123
ConnectorItem * Via::connectorItem() {
127
 
        foreach (QGraphicsItem * item, childItems()) {
128
 
                ConnectorItem * connectorItem = dynamic_cast<ConnectorItem *>(item);
129
 
                if (connectorItem) return connectorItem;
 
124
        foreach (ConnectorItem * connectorItem, cachedConnectorItems()) {
 
125
                return connectorItem;
130
126
        }
131
127
 
132
128
        return NULL;