Loading include/wxBasePcbFrame.h +2 −1 Original line number Diff line number Diff line Loading @@ -150,8 +150,9 @@ public: * of "selecting" an item more formal, and to indivisibly tie the operation * of selecting an item to displaying it using BOARD_ITEM::Display_Infos(). * @param aItem The BOARD_ITEM to make the selected item or NULL if none. * @param aDisplayInfo = true to display item info, false if not (default = true) */ void SetCurItem( BOARD_ITEM* aItem ); void SetCurItem( BOARD_ITEM* aItem, bool aDisplayInfo = true ); BOARD_ITEM* GetCurItem(); /** Loading pcbnew/CMakeLists.txt +0 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,6 @@ set(PCBNEW_SRCS plot_rtn.cpp queue.cpp ratsnest.cpp router.cpp set_color.cpp set_grid.cpp solve.cpp Loading pcbnew/basepcbframe.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -245,13 +245,14 @@ void WinEDA_BasePcbFrame::ProcessItemSelection( wxCommandEvent& event ) /*****************************************************************/ void WinEDA_BasePcbFrame::SetCurItem( BOARD_ITEM* aItem ) void WinEDA_BasePcbFrame::SetCurItem( BOARD_ITEM* aItem, bool aDisplayInfo ) /*****************************************************************/ { GetScreen()->SetCurItem( aItem ); if( aItem ) { if( aDisplayInfo ) aItem->DisplayInfo( this ); #if 0 && defined(DEBUG) Loading pcbnew/class_track.cpp +26 −10 Original line number Diff line number Diff line Loading @@ -133,7 +133,7 @@ int TRACK::GetDrillValue() const double TRACK::GetLength() { wxPoint delta = m_End - m_Start; return sqrt( (double)delta.x*delta.x + (double)delta.y*delta.y ); return sqrt( ((double)delta.x*delta.x) + ((double)delta.y*delta.y ) ); } /***********************/ Loading Loading @@ -906,6 +906,31 @@ void TRACK::DisplayInfo( WinEDA_DrawFrame* frame ) wxString msg; BOARD* board = ( (WinEDA_BasePcbFrame*) frame )->GetBoard(); // Display basic infos DisplayInfoBase( frame ); // Display full track length (in pcbnew) if( frame->m_Ident == PCB_FRAME ) { int trackLen = 0; Marque_Une_Piste( board, this, NULL, &trackLen, false ); valeur_param( trackLen, msg ); frame->MsgPanel->AppendMessage( _( "Track Len" ), msg, DARKCYAN ); } } /* * Function DisplayInfoBase * has knowledge about the frame and how and where to put status information * about this object into the frame's message panel. * Display info about the track segment only, and does not calculate the full track length * @param frame A WinEDA_DrawFrame in which to print status information. */ void TRACK::DisplayInfoBase( WinEDA_DrawFrame* frame ) { wxString msg; BOARD* board = ( (WinEDA_BasePcbFrame*) frame )->GetBoard(); frame->MsgPanel->EraseMsgBox(); switch( Type() ) Loading Loading @@ -1018,15 +1043,6 @@ void TRACK::DisplayInfo( WinEDA_DrawFrame* frame ) valeur_param( wxRound( GetLength() ), msg ); frame->MsgPanel->AppendMessage( _( "Seg Len" ), msg, DARKCYAN ); } // Display full track length (in pcbnew) if( frame->m_Ident == PCB_FRAME ) { int trackLen; Marque_Une_Piste( board, this, NULL, &trackLen, false ); valeur_param( trackLen, msg ); frame->MsgPanel->AppendMessage( _( "Track Len" ), msg, DARKCYAN ); } } Loading pcbnew/class_track.h +9 −0 Original line number Diff line number Diff line Loading @@ -201,10 +201,19 @@ public: * has knowledge about the frame and how and where to put status information * about this object into the frame's message panel. * Is virtual from EDA_BaseStruct. * Display info about the track segment and the full track length * @param frame A WinEDA_DrawFrame in which to print status information. */ void DisplayInfo( WinEDA_DrawFrame* frame ); /** * Function DisplayInfoBase * has knowledge about the frame and how and where to put status information * about this object into the frame's message panel. * Display info about the track segment only, and does not calculate the full track length * @param frame A WinEDA_DrawFrame in which to print status information. */ void DisplayInfoBase( WinEDA_DrawFrame* frame ); /** * Function ShowWidth Loading Loading
include/wxBasePcbFrame.h +2 −1 Original line number Diff line number Diff line Loading @@ -150,8 +150,9 @@ public: * of "selecting" an item more formal, and to indivisibly tie the operation * of selecting an item to displaying it using BOARD_ITEM::Display_Infos(). * @param aItem The BOARD_ITEM to make the selected item or NULL if none. * @param aDisplayInfo = true to display item info, false if not (default = true) */ void SetCurItem( BOARD_ITEM* aItem ); void SetCurItem( BOARD_ITEM* aItem, bool aDisplayInfo = true ); BOARD_ITEM* GetCurItem(); /** Loading
pcbnew/CMakeLists.txt +0 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,6 @@ set(PCBNEW_SRCS plot_rtn.cpp queue.cpp ratsnest.cpp router.cpp set_color.cpp set_grid.cpp solve.cpp Loading
pcbnew/basepcbframe.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -245,13 +245,14 @@ void WinEDA_BasePcbFrame::ProcessItemSelection( wxCommandEvent& event ) /*****************************************************************/ void WinEDA_BasePcbFrame::SetCurItem( BOARD_ITEM* aItem ) void WinEDA_BasePcbFrame::SetCurItem( BOARD_ITEM* aItem, bool aDisplayInfo ) /*****************************************************************/ { GetScreen()->SetCurItem( aItem ); if( aItem ) { if( aDisplayInfo ) aItem->DisplayInfo( this ); #if 0 && defined(DEBUG) Loading
pcbnew/class_track.cpp +26 −10 Original line number Diff line number Diff line Loading @@ -133,7 +133,7 @@ int TRACK::GetDrillValue() const double TRACK::GetLength() { wxPoint delta = m_End - m_Start; return sqrt( (double)delta.x*delta.x + (double)delta.y*delta.y ); return sqrt( ((double)delta.x*delta.x) + ((double)delta.y*delta.y ) ); } /***********************/ Loading Loading @@ -906,6 +906,31 @@ void TRACK::DisplayInfo( WinEDA_DrawFrame* frame ) wxString msg; BOARD* board = ( (WinEDA_BasePcbFrame*) frame )->GetBoard(); // Display basic infos DisplayInfoBase( frame ); // Display full track length (in pcbnew) if( frame->m_Ident == PCB_FRAME ) { int trackLen = 0; Marque_Une_Piste( board, this, NULL, &trackLen, false ); valeur_param( trackLen, msg ); frame->MsgPanel->AppendMessage( _( "Track Len" ), msg, DARKCYAN ); } } /* * Function DisplayInfoBase * has knowledge about the frame and how and where to put status information * about this object into the frame's message panel. * Display info about the track segment only, and does not calculate the full track length * @param frame A WinEDA_DrawFrame in which to print status information. */ void TRACK::DisplayInfoBase( WinEDA_DrawFrame* frame ) { wxString msg; BOARD* board = ( (WinEDA_BasePcbFrame*) frame )->GetBoard(); frame->MsgPanel->EraseMsgBox(); switch( Type() ) Loading Loading @@ -1018,15 +1043,6 @@ void TRACK::DisplayInfo( WinEDA_DrawFrame* frame ) valeur_param( wxRound( GetLength() ), msg ); frame->MsgPanel->AppendMessage( _( "Seg Len" ), msg, DARKCYAN ); } // Display full track length (in pcbnew) if( frame->m_Ident == PCB_FRAME ) { int trackLen; Marque_Une_Piste( board, this, NULL, &trackLen, false ); valeur_param( trackLen, msg ); frame->MsgPanel->AppendMessage( _( "Track Len" ), msg, DARKCYAN ); } } Loading
pcbnew/class_track.h +9 −0 Original line number Diff line number Diff line Loading @@ -201,10 +201,19 @@ public: * has knowledge about the frame and how and where to put status information * about this object into the frame's message panel. * Is virtual from EDA_BaseStruct. * Display info about the track segment and the full track length * @param frame A WinEDA_DrawFrame in which to print status information. */ void DisplayInfo( WinEDA_DrawFrame* frame ); /** * Function DisplayInfoBase * has knowledge about the frame and how and where to put status information * about this object into the frame's message panel. * Display info about the track segment only, and does not calculate the full track length * @param frame A WinEDA_DrawFrame in which to print status information. */ void DisplayInfoBase( WinEDA_DrawFrame* frame ); /** * Function ShowWidth Loading