/* * Abort current text edit progress. * * If a text is selected, its initial coord are regenerated */ void AbortMoveDimensionText( EDA_DRAW_PANEL* aPanel, wxDC* aDC ) { DIMENSION* dimension = (DIMENSION*) aPanel->GetScreen()->GetCurItem(); ( (PCB_EDIT_FRAME*) aPanel->GetParent() )->SetCurItem( NULL ); aPanel->SetMouseCapture( NULL, NULL ); if( dimension == NULL ) // Should not occur return; dimension->Draw( aPanel, aDC, GR_XOR ); dimension->Text().SetTextPosition( initialTextPosition ); dimension->ClearFlags(); dimension->Draw( aPanel, aDC, GR_OR ); }