Commit 59f25e7f authored by jean-pierre charras's avatar jean-pierre charras

fixed bugs 639774 and 639586

parent e66a007e
......@@ -323,7 +323,6 @@ bool SCH_PRINTOUT::OnBeginDocument( int startPage, int endPage )
#ifdef __WXDEBUG__
WinEDA_SchematicFrame* parent = m_Parent->GetParent();
#endif
wxLogDebug( wxT( "Printer name: " ) +
parent->GetPageSetupData().GetPrintData().GetPrinterName() );
wxLogDebug( wxT( "Paper ID: %d" ),
......@@ -335,6 +334,7 @@ bool SCH_PRINTOUT::OnBeginDocument( int startPage, int endPage )
parent->GetPageSetupData().GetPrintData().GetOrientation() );
wxLogDebug( wxT( "Quality: %d"),
parent->GetPageSetupData().GetPrintData().GetQuality() );
#endif
return true;
}
......
......@@ -603,6 +603,8 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
g_Drag_Pistes_On = true;
case ID_POPUP_PCB_MOVE_MODULE_REQUEST:
if( GetCurItem() == NULL )
break;
// If the current Item is a pad, text module ...: Get its parent
if( GetCurItem()->Type() != TYPE_MODULE )
SetCurItem( GetCurItem()->GetParent() );
......@@ -628,6 +630,8 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_PCB_GET_AND_MOVE_MODULE_REQUEST: /* get module by name and move it */
SetCurItem( GetModuleByName() );
module = (MODULE*) GetCurItem();
if( module == NULL )
break;
if( module->IsLocked() )
{
wxString msg;
......@@ -636,11 +640,8 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
DisplayInfoMessage( this, msg );
break;
}
if( GetCurItem() )
{
DrawPanel->MouseToCursorSchema();
StartMove_Module( (MODULE*) GetCurItem(), &dc );
}
DrawPanel->MouseToCursorSchema();
StartMove_Module( module, &dc );
break;
case ID_POPUP_PCB_DELETE_MODULE:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment