diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp index b30c9b9c97..320a47cfb4 100644 --- a/eeschema/schedit.cpp +++ b/eeschema/schedit.cpp @@ -342,6 +342,9 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_POPUP_DELETE_BLOCK: + if( screen->m_BlockLocate.GetCommand() != BLOCK_MOVE ) + break; + m_canvas->MoveCursorToCrossHair(); screen->m_BlockLocate.SetCommand( BLOCK_DELETE ); screen->m_BlockLocate.SetMessageBlock( this ); @@ -350,6 +353,9 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_POPUP_COPY_BLOCK: + if( screen->m_BlockLocate.GetCommand() != BLOCK_MOVE ) + break; + m_canvas->MoveCursorToCrossHair(); screen->m_BlockLocate.SetCommand( BLOCK_COPY ); screen->m_BlockLocate.SetMessageBlock( this ); @@ -357,6 +363,9 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_POPUP_DRAG_BLOCK: + if( screen->m_BlockLocate.GetCommand() != BLOCK_MOVE ) + break; + m_canvas->MoveCursorToCrossHair(); screen->m_BlockLocate.SetCommand( BLOCK_DRAG ); screen->m_BlockLocate.SetMessageBlock( this ); diff --git a/pcb_calculator/tracks_width_versus_current.cpp b/pcb_calculator/tracks_width_versus_current.cpp index 78b82bc52d..f7569042a9 100644 --- a/pcb_calculator/tracks_width_versus_current.cpp +++ b/pcb_calculator/tracks_width_versus_current.cpp @@ -88,11 +88,6 @@ void PCB_CALCULATOR_FRAME::OnTWParametersChanged( wxCommandEvent& event ) case TW_MASTER_INT_WIDTH: OnTWCalculateFromIntWidth( event ); break; - default: -#ifdef DEBUG - assert( false ); -#endif - break; } } @@ -105,6 +100,7 @@ void PCB_CALCULATOR_FRAME::OnTWCalculateFromCurrent( wxCommandEvent& event ) event.StopPropagation(); return; } + m_TWNested = true; // Update state. @@ -190,6 +186,7 @@ void PCB_CALCULATOR_FRAME::OnTWCalculateFromIntWidth( wxCommandEvent& event ) event.StopPropagation(); return; } + m_TWNested = true; // Update state. @@ -248,6 +245,7 @@ void PCB_CALCULATOR_FRAME::TWDisplayValues( double aCurrent, double aExtWidth, msg.Printf( wxT( "%g" ), aExtWidth / extScale ); m_ExtTrackWidthValue->SetValue( msg ); } + if( m_TWMode != TW_MASTER_INT_WIDTH ) { msg.Printf( wxT( "%g" ), aIntWidth / intScale );