Pcbnew: GAL canvas selection tool bug fixes.

* Fix Python scripting error causing pcbnew_wrap.cxx to fail to build.
* Fix OpenGL canvas ratsnest missing connections in copper zones.
This commit is contained in:
Maciej Suminski 2014-03-12 20:55:59 -04:00 committed by Wayne Stambaugh
commit 527011208c
3 changed files with 12 additions and 9 deletions

View File

@ -871,6 +871,7 @@ public:
m_NetInfo.AppendNet( aNewNet ); m_NetInfo.AppendNet( aNewNet );
} }
#ifndef SWIG
/** /**
* Function BeginNets * Function BeginNets
* @return iterator to the first element of the NETINFO_ITEMs list * @return iterator to the first element of the NETINFO_ITEMs list
@ -888,6 +889,7 @@ public:
{ {
return m_NetInfo.end(); return m_NetInfo.end();
} }
#endif
/** /**
* Function GetNetCount * Function GetNetCount

View File

@ -145,6 +145,7 @@ public:
*/ */
int Translate( int aNetCode ) const; int Translate( int aNetCode ) const;
#ifndef SWIG
///> Wrapper class, so you can iterate through NETINFO_ITEM*s, not ///> Wrapper class, so you can iterate through NETINFO_ITEM*s, not
///> std::pair<int/wxString, NETINFO_ITEM*> ///> std::pair<int/wxString, NETINFO_ITEM*>
class iterator class iterator
@ -212,6 +213,7 @@ public:
{ {
return iterator( m_netMapping.end(), this ); return iterator( m_netMapping.end(), this );
} }
#endif
/** /**
* Function GetSize * Function GetSize
@ -329,6 +331,7 @@ public:
typedef boost::unordered_map<const wxString, NETINFO_ITEM*, WXSTRING_HASH> NETNAMES_MAP; typedef boost::unordered_map<const wxString, NETINFO_ITEM*, WXSTRING_HASH> NETNAMES_MAP;
typedef boost::unordered_map<const int, NETINFO_ITEM*> NETCODES_MAP; typedef boost::unordered_map<const int, NETINFO_ITEM*> NETCODES_MAP;
#ifndef SWIG
///> Wrapper class, so you can iterate through NETINFO_ITEM*s, not ///> Wrapper class, so you can iterate through NETINFO_ITEM*s, not
///> std::pair<int/wxString, NETINFO_ITEM*> ///> std::pair<int/wxString, NETINFO_ITEM*>
class iterator class iterator
@ -388,6 +391,7 @@ public:
{ {
return iterator( m_netNames.end() ); return iterator( m_netNames.end() );
} }
#endif
private: private:
/** /**
@ -438,25 +442,22 @@ class NETINFO_ITEM
friend class NETINFO_LIST; friend class NETINFO_LIST;
private: private:
const int m_NetCode; ///< A number equivalent to the net name. int m_NetCode; ///< A number equivalent to the net name.
///< Used for fast comparisons in ratsnest and DRC computations. ///< Used for fast comparisons in ratsnest and DRC computations.
const wxString m_Netname; ///< Full net name like /mysheet/mysubsheet/vout wxString m_Netname; ///< Full net name like /mysheet/mysubsheet/vout used by Eeschema
///< used by Eeschema
const wxString m_ShortNetname; // short net name, like vout from wxString m_ShortNetname; ///< short net name, like vout from /mysheet/mysubsheet/vout
// /mysheet/mysubsheet/vout
wxString m_NetClassName; // Net Class name. if void this is equivalent wxString m_NetClassName; // Net Class name. if void this is equivalent
// to "default" (the first // to "default" (the first
// item of the net classes list // item of the net classes list
NETCLASS* m_NetClass; NETCLASS* m_NetClass;
BOARD_ITEM* m_parent; ///< The parent board item object the net belongs to. BOARD_ITEM* m_parent; ///< The parent board item object the net belongs to.
public: public:
std::vector <D_PAD*> m_PadInNetList; // List of pads connected to this net std::vector<D_PAD*> m_PadInNetList; ///< List of pads connected to this net
unsigned m_RatsnestStartIdx; /* Starting point of ratsnests of this unsigned m_RatsnestStartIdx; /* Starting point of ratsnests of this
* net (included) in a general buffer of * net (included) in a general buffer of

View File

@ -356,8 +356,8 @@ bool RN_POLY::HitTest( const RN_NODE_PTR& aNode ) const
x2 = xOld; y2 = yOld; x2 = xOld; y2 = yOld;
} }
if( ( xNew < xt ) == ( xt <= xOld ) /* edge "open" at left end */ if( ( xNew < xt ) == ( xt <= xOld ) && /* edge "open" at left end */
&& ( yt - y1 ) * ( x2 - x1 ) < ( y2 - y1 ) * ( xt - x1 ) ) (double)( yt - y1 ) * (double)( x2 - x1 ) < (double)( y2 - y1 ) * (double)( xt - x1 ) )
{ {
inside = !inside; inside = !inside;
} }