From 2b6ec786a8a37a50146a26f7d23a54f39dad9571 Mon Sep 17 00:00:00 2001 From: dickelbeck Date: Tue, 14 Aug 2007 23:09:01 +0000 Subject: [PATCH] PcbGeneralLocateAndDisplay() can return a TEXT object too --- pcbnew/edit.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index bf50ce6219..57975a84a5 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -326,7 +326,9 @@ void WinEDA_PcbFrame::SendMessageToEESCHEMA( EDA_BaseStruct* objectToSync ) if( objectToSync->m_StructType == TYPEMODULE ) module = (MODULE*) objectToSync; else if( objectToSync->m_StructType == TYPEPAD ) - module = (MODULE*)((D_PAD*)objectToSync)->m_Parent; + module = (MODULE*) objectToSync->m_Parent; + else if( objectToSync->m_StructType == TYPETEXTEMODULE ) + module = (MODULE*) objectToSync->m_Parent; // ask only for the reference for now, maybe pins later. if( module )