diff --git a/eeschema/cross-probing.cpp b/eeschema/cross-probing.cpp index 3f33193b40..6b52855442 100644 --- a/eeschema/cross-probing.cpp +++ b/eeschema/cross-probing.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2019 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2011 Wayne Stambaugh - * Copyright (C) 2004-2020 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2004-2021 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -565,17 +565,12 @@ void SCH_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail ) case MAIL_SCH_GET_NETLIST: { - if( payload.find( "quiet-annotate" ) != std::string::npos ) + if( !payload.empty() ) { - Schematic().GetSheets().AnnotatePowerSymbols(); - AnnotateComponents( true, UNSORTED, INCREMENTAL_BY_REF, 0, false, false, true, - NULL_REPORTER::GetInstance() ); - } + wxString annotationMessage( payload ); - if( payload.find( "no-annotate" ) == std::string::npos ) - { // Ensure schematic is OK for netlist creation (especially that it is fully annotated): - if( !ReadyToNetlist() ) + if( !ReadyToNetlist( annotationMessage ) ) return; } diff --git a/eeschema/dialogs/dialog_annotate.cpp b/eeschema/dialogs/dialog_annotate.cpp index 8c2da826c3..253db2248d 100644 --- a/eeschema/dialogs/dialog_annotate.cpp +++ b/eeschema/dialogs/dialog_annotate.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 1992-2017 jean-pierre Charras jp.charras at wanadoo.fr - * Copyright (C) 1992-2020 Kicad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2021 Kicad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -29,6 +29,7 @@ #include #include #include +#include #include // A window name for the annotate dialog to retrieve is if not destroyed @@ -88,8 +89,8 @@ DIALOG_ANNOTATE::DIALOG_ANNOTATE( SCH_EDIT_FRAME* parent, const wxString& messag if( !message.IsEmpty() ) { - m_userMessage->SetLabelText( message ); - m_userMessage->Show( true ); + m_infoBar->RemoveAllButtons(); + m_infoBar->ShowMessage( message ); m_rbScope->Enable( false ); } @@ -195,7 +196,7 @@ void DIALOG_ANNOTATE::OnApplyClick( wxCommandEvent& event ) if( reporter.HasMessage() ) return; - if( m_userMessage->IsShown() ) + if( m_infoBar->IsShown() ) { // Close the dialog by calling the default handler for a wxID_OK event event.SetId( wxID_OK ); diff --git a/eeschema/dialogs/dialog_annotate_base.cpp b/eeschema/dialogs/dialog_annotate_base.cpp index 548af9e7ba..faa4461f6a 100644 --- a/eeschema/dialogs/dialog_annotate_base.cpp +++ b/eeschema/dialogs/dialog_annotate_base.cpp @@ -5,6 +5,7 @@ // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/infobar.h" #include "wx_html_report_panel.h" #include "dialog_annotate_base.h" @@ -18,16 +19,16 @@ DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, con wxBoxSizer* bmainSizer; bmainSizer = new wxBoxSizer( wxVERTICAL ); + m_infoBar = new WX_INFOBAR( this ); + m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE ); + m_infoBar->SetEffectDuration( 500 ); + m_infoBar->Hide(); + + bmainSizer->Add( m_infoBar, 0, wxEXPAND|wxBOTTOM, 5 ); + wxBoxSizer* bupperSizer; bupperSizer = new wxBoxSizer( wxVERTICAL ); - m_userMessage = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_userMessage->Wrap( 1 ); - m_userMessage->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - m_userMessage->Hide(); - - bupperSizer->Add( m_userMessage, 0, wxALL|wxEXPAND, 5 ); - wxFlexGridSizer* fgSizer1; fgSizer1 = new wxFlexGridSizer( 2, 2, 0, 0 ); fgSizer1->AddGrowableCol( 0 ); diff --git a/eeschema/dialogs/dialog_annotate_base.fbp b/eeschema/dialogs/dialog_annotate_base.fbp index 73814ca340..0ef87ee6a0 100644 --- a/eeschema/dialogs/dialog_annotate_base.fbp +++ b/eeschema/dialogs/dialog_annotate_base.fbp @@ -59,6 +59,66 @@ bmainSizer wxVERTICAL none + + 5 + wxEXPAND|wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 500 + 1 + + 1 + + 0 + 1 + wxSHOW_EFFECT_NONE + wxID_ANY + + 0 + + + 0 + + 1 + m_infoBar + 1 + + + protected + 1 + + Resizable + 1 + wxSHOW_EFFECT_NONE + + WX_INFOBAR; widgets/infobar.h; forward_declare + 0 + + + + + + 6 wxEXPAND|wxTOP|wxRIGHT|wxLEFT @@ -68,67 +128,6 @@ bupperSizer wxVERTICAL none - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - ,90,92,-1,70,0 - 0 - 1 - wxID_ANY - - 0 - - 0 - - - 0 - - 1 - m_userMessage - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - 1 - - 5 wxBOTTOM|wxEXPAND diff --git a/eeschema/dialogs/dialog_annotate_base.h b/eeschema/dialogs/dialog_annotate_base.h index 503021e1fb..4802f1bbfa 100644 --- a/eeschema/dialogs/dialog_annotate_base.h +++ b/eeschema/dialogs/dialog_annotate_base.h @@ -11,14 +11,15 @@ #include #include class WX_HTML_REPORT_PANEL; +class WX_INFOBAR; #include "dialog_shim.h" -#include -#include +#include #include #include #include #include +#include #include #include #include @@ -50,7 +51,7 @@ class DIALOG_ANNOTATE_BASE : public DIALOG_SHIM private: protected: - wxStaticText* m_userMessage; + WX_INFOBAR* m_infoBar; wxRadioBox* m_rbScope; wxRadioButton* m_rbSortBy_X_Position; wxStaticBitmap* annotate_down_right_bitmap; diff --git a/eeschema/dialogs/dialog_bom.cpp b/eeschema/dialogs/dialog_bom.cpp index 2ce455c63d..9244f2e7c9 100644 --- a/eeschema/dialogs/dialog_bom.cpp +++ b/eeschema/dialogs/dialog_bom.cpp @@ -485,7 +485,7 @@ void DIALOG_BOM::OnRunGenerator( wxCommandEvent& event ) m_parent->SetExecFlags( wxEXEC_SHOW_CONSOLE ); #endif - if( m_parent->ReadyToNetlist( false, false ) ) + if( m_parent->ReadyToNetlist( _( "Generating BOM requires a fully annotated schematic." ) ) ) m_parent->WriteNetListFile( -1, fullfilename, GNL_OPT_BOM, &reporter ); m_Messages->SetValue( reportmsg ); diff --git a/eeschema/dialogs/dialog_erc_base.cpp b/eeschema/dialogs/dialog_erc_base.cpp index e5abc75537..12fd11d071 100644 --- a/eeschema/dialogs/dialog_erc_base.cpp +++ b/eeschema/dialogs/dialog_erc_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020) +// C++ code generated with wxFormBuilder (version Oct 26 2018) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -22,6 +22,8 @@ DIALOG_ERC_BASE::DIALOG_ERC_BASE( wxWindow* parent, wxWindowID id, const wxStrin m_infoBar = new WX_INFOBAR( this ); m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE ); m_infoBar->SetEffectDuration( 500 ); + m_infoBar->Hide(); + bSizer1->Add( m_infoBar, 0, wxEXPAND, 5 ); wxBoxSizer* bMainSizer; diff --git a/eeschema/dialogs/dialog_erc_base.fbp b/eeschema/dialogs/dialog_erc_base.fbp index bb1f1c4125..328d5615e0 100644 --- a/eeschema/dialogs/dialog_erc_base.fbp +++ b/eeschema/dialogs/dialog_erc_base.fbp @@ -14,7 +14,6 @@ dialog_erc_base 1000 none - 1 dialog_ERC_base @@ -26,7 +25,6 @@ 1 1 UI - 0 0 0 @@ -92,7 +90,7 @@ 1 0 - 0 + 1 wxSHOW_EFFECT_NONE wxID_ANY @@ -953,7 +951,6 @@ - 0 @@ -1098,7 +1095,6 @@ - 0 diff --git a/eeschema/dialogs/dialog_erc_base.h b/eeschema/dialogs/dialog_erc_base.h index 9128143f23..78fc9bf1c6 100644 --- a/eeschema/dialogs/dialog_erc_base.h +++ b/eeschema/dialogs/dialog_erc_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020) +// C++ code generated with wxFormBuilder (version Oct 26 2018) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! diff --git a/eeschema/dialogs/dialog_netlist.cpp b/eeschema/dialogs/dialog_netlist.cpp index 1aabd7da56..22d35c045b 100644 --- a/eeschema/dialogs/dialog_netlist.cpp +++ b/eeschema/dialogs/dialog_netlist.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2013-2017 Jean-Pierre Charras, jp.charras@wanadoo.fr * Copyright (C) 2013 Wayne Stambaugh - * Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -338,15 +338,11 @@ void NETLIST_DIALOG::OnRunExternSpiceCommand( wxCommandEvent& event ) wxString commandLine = simulatorCommand; commandLine.Replace( "%I", fn.GetFullPath(), true ); - if( m_Parent->ReadyToNetlist( false, false ) ) - m_Parent->WriteNetListFile( NET_TYPE_SPICE, fn.GetFullPath(), netlist_opt, nullptr ); - else + if( m_Parent->ReadyToNetlist( _( "Simulator requires a fully annotated schematic." ) ) ) { - wxMessageBox( _( "Schematic netlist not available" ) ); - return; + m_Parent->WriteNetListFile( NET_TYPE_SPICE, fn.GetFullPath(), netlist_opt, nullptr ); + wxExecute( commandLine, wxEXEC_ASYNC ); } - - wxExecute( commandLine, wxEXEC_ASYNC ); } @@ -578,10 +574,8 @@ bool NETLIST_DIALOG::TransferDataFromWindow() else m_Parent->SetNetListerCommand( wxEmptyString ); - if( m_Parent->ReadyToNetlist( false, false ) ) + if( m_Parent->ReadyToNetlist( _( "Exporting netlist requires a fully annotated schematic." ) ) ) m_Parent->WriteNetListFile( currPage->m_IdNetType, fullpath, netlist_opt, nullptr ); - else - wxMessageBox( _( "Schematic netlist not available" ) ); WriteCurrentNetlistSetup(); diff --git a/eeschema/netlist_exporters/netlist_generator.cpp b/eeschema/netlist_exporters/netlist_generator.cpp index 71f99ee224..a056c51a95 100644 --- a/eeschema/netlist_exporters/netlist_generator.cpp +++ b/eeschema/netlist_exporters/netlist_generator.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 1992-2018 jp.charras at wanadoo.fr * Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck - * Copyright (C) 1992-2020 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 1992-2021 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -51,7 +51,7 @@ bool SCH_EDIT_FRAME::WriteNetListFile( int aFormat, const wxString& aFullFileNam // Ensure the netlist data is up to date: RecalculateConnections( NO_CLEANUP ); - if( !ReadyToNetlist( false ) ) + if( !ReadyToNetlist( _( "Exporting netlist requires a fully annotated schematic." ) ) ) return false; bool res = true; @@ -160,7 +160,7 @@ bool SCH_EDIT_FRAME::WriteNetListFile( int aFormat, const wxString& aFullFileNam } -bool SCH_EDIT_FRAME::ReadyToNetlist( bool aSilent, bool aSilentAnnotate ) +bool SCH_EDIT_FRAME::ReadyToNetlist( const wxString& aAnnotateMessage ) { // Ensure all power symbols have a valid reference Schematic().GetSheets().AnnotatePowerSymbols(); @@ -168,24 +168,11 @@ bool SCH_EDIT_FRAME::ReadyToNetlist( bool aSilent, bool aSilentAnnotate ) // Components must be annotated if( CheckAnnotate( []( ERCE_T, const wxString&, SCH_REFERENCE*, SCH_REFERENCE* ) {} ) ) { - if( aSilentAnnotate ) - { - AnnotateComponents( true, UNSORTED, INCREMENTAL_BY_REF, 0, false, false, true, - NULL_REPORTER::GetInstance() ); - } - else - { - if( aSilent ) - return false; + // Schematic must be annotated: call Annotate dialog and tell the user why. + ModalAnnotate( aAnnotateMessage ); - // Schematic must be annotated: call Annotate dialog and tell the user why. - ModalAnnotate( _( "Exporting netlist requires a completely annotated schematic." ) ); - - if( CheckAnnotate( []( ERCE_T, const wxString&, SCH_REFERENCE*, SCH_REFERENCE* ) {} ) ) - { - return false; - } - } + if( CheckAnnotate( []( ERCE_T, const wxString&, SCH_REFERENCE*, SCH_REFERENCE* ) {} ) ) + return false; } // Test duplicate sheet names: @@ -193,7 +180,7 @@ bool SCH_EDIT_FRAME::ReadyToNetlist( bool aSilent, bool aSilentAnnotate ) if( erc.TestDuplicateSheetNames( false ) > 0 ) { - if( aSilent || !IsOK( this, _( "Error: duplicate sheet names. Continue?" ) ) ) + if( !IsOK( this, _( "Error: duplicate sheet names. Continue?" ) ) ) return false; } diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp index 3077a8245a..7a95c15316 100644 --- a/eeschema/sch_edit_frame.cpp +++ b/eeschema/sch_edit_frame.cpp @@ -1027,7 +1027,7 @@ void SCH_EDIT_FRAME::OnOpenCvpcb( wxCommandEvent& event ) wxFileName fn = Prj().AbsolutePath( Schematic().GetFileName() ); fn.SetExt( NetlistFileExtension ); - if( !ReadyToNetlist() ) + if( !ReadyToNetlist( _( "Assigning footprints requires a fully annotated schematic." ) ) ) return; try diff --git a/eeschema/sch_edit_frame.h b/eeschema/sch_edit_frame.h index fc5008df52..649801c403 100644 --- a/eeschema/sch_edit_frame.h +++ b/eeschema/sch_edit_frame.h @@ -369,11 +369,10 @@ public: * * - Test for some issues (missing or duplicate references and sheet names) * - * @param aSilent is true if annotation error dialog should be skipped - * @param aSilentAnnotate is true if components should be reannotated silently + * @param aAnnotateMessage a message to put up in case annotation needs to be performed * @returns true if all is well (i.e. you can call WriteNetListFile next) */ - bool ReadyToNetlist( bool aSilent = false, bool aSilentAnnotate = false ); + bool ReadyToNetlist( const wxString& aAnnotateMessage ); /** * Create a netlist file. diff --git a/eeschema/tools/backannotate.cpp b/eeschema/tools/backannotate.cpp index e5a6b4e880..10dd8c856e 100644 --- a/eeschema/tools/backannotate.cpp +++ b/eeschema/tools/backannotate.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2019 Alexander Shuklin - * Copyright (C) 2004-2020 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2004-2021 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -299,11 +299,10 @@ void BACK_ANNOTATE::checkForUnusedSymbols() ++i; } - if( m_matchByReference && !m_frame->ReadyToNetlist() ) + if( m_matchByReference && !m_frame->ReadyToNetlist( _( "Re-linking footprints requires a fully " + "annotated schematic." ) ) ) { - m_reporter.ReportTail( _( "Cannot relink footprints because schematic is not fully " - "annotated." ), - RPT_SEVERITY_ERROR ); + m_reporter.ReportTail( _( "Footprint re-linking cancelled by user." ), RPT_SEVERITY_ERROR ); } } diff --git a/pcbnew/cross-probing.cpp b/pcbnew/cross-probing.cpp index 5bed6e8e55..63cdcc6cd0 100644 --- a/pcbnew/cross-probing.cpp +++ b/pcbnew/cross-probing.cpp @@ -541,7 +541,7 @@ void PCB_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail ) try { NETLIST netlist; - FetchNetlistFromSchematic( netlist, NO_ANNOTATION ); + FetchNetlistFromSchematic( netlist, wxEmptyString ); BOARD_NETLIST_UPDATER updater( this, GetBoard() ); updater.SetLookupByTimestamp( false ); diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index 87d3b0756b..1d135586d3 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/pcbnew/pcb_edit_frame.cpp @@ -4,7 +4,7 @@ * Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2013 Wayne Stambaugh - * Copyright (C) 2013-2020 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2013-2021 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -1355,7 +1355,7 @@ bool PCB_EDIT_FRAME::ReannotateSchematic( std::string& aNetlist ) } -bool PCB_EDIT_FRAME::FetchNetlistFromSchematic( NETLIST& aNetlist, FETCH_NETLIST_MODE aMode ) +bool PCB_EDIT_FRAME::FetchNetlistFromSchematic( NETLIST& aNetlist, const wxString& aAnnotateMessage ) { if( !TestStandalone() ) { @@ -1366,12 +1366,8 @@ bool PCB_EDIT_FRAME::FetchNetlistFromSchematic( NETLIST& aNetlist, FETCH_NETLIST } Raise(); //Show - std::string payload; - if( aMode == NO_ANNOTATION ) - payload = "no-annotate"; - else if( aMode == QUIET_ANNOTATION ) - payload = "quiet-annotate"; + std::string payload( aAnnotateMessage ); Kiway().ExpressMail( FRAME_SCH, MAIL_SCH_GET_NETLIST, payload, this ); diff --git a/pcbnew/pcb_edit_frame.h b/pcbnew/pcb_edit_frame.h index 8b9d2b7edf..37ee125037 100644 --- a/pcbnew/pcb_edit_frame.h +++ b/pcbnew/pcb_edit_frame.h @@ -743,10 +743,11 @@ public: /** * @param aNetlist a #NETLIST owned by the caller. This function fills it in. + * @param aAnnotateMessage a message to be shown if annotation must be performed. If empty, + * annotation will be skipped. * @return true if a netlist was fetched. */ - enum FETCH_NETLIST_MODE { NO_ANNOTATION, QUIET_ANNOTATION, ANNOTATION_DIALOG }; - bool FetchNetlistFromSchematic( NETLIST& aNetlist, FETCH_NETLIST_MODE aMode ); + bool FetchNetlistFromSchematic( NETLIST& aNetlist, const wxString& aAnnotateMessage ); /** * Send a command to Eeschema to re-annotate the schematic. diff --git a/pcbnew/tools/board_editor_control.cpp b/pcbnew/tools/board_editor_control.cpp index 8f0c12f40a..c7f6216539 100644 --- a/pcbnew/tools/board_editor_control.cpp +++ b/pcbnew/tools/board_editor_control.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2014 CERN - * Copyright (C) 2014-2020 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2014-2021 KiCad Developers, see AUTHORS.txt for contributors. * @author Maciej Suminski * * This program is free software; you can redistribute it and/or @@ -496,7 +496,8 @@ int BOARD_EDITOR_CONTROL::UpdatePCBFromSchematic( const TOOL_EVENT& aEvent ) { NETLIST netlist; - if( m_frame->FetchNetlistFromSchematic( netlist, PCB_EDIT_FRAME::ANNOTATION_DIALOG ) ) + if( m_frame->FetchNetlistFromSchematic( netlist, _( "Updating PCB requires a fully annotated " + "schematic." ) ) ) { DIALOG_UPDATE_PCB updateDialog( m_frame, &netlist ); updateDialog.ShowModal(); diff --git a/pcbnew/tools/drc_tool.cpp b/pcbnew/tools/drc_tool.cpp index 03ebc4fea7..b9974f5d04 100644 --- a/pcbnew/tools/drc_tool.cpp +++ b/pcbnew/tools/drc_tool.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2020 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2020-2021 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -154,8 +154,11 @@ void DRC_TOOL::RunTests( PROGRESS_REPORTER* aProgressReporter, bool aRefillZones if( aTestFootprints && !Kiface().IsSingle() ) { - if( m_editFrame->FetchNetlistFromSchematic( netlist, PCB_EDIT_FRAME::ANNOTATION_DIALOG ) ) + if( m_editFrame->FetchNetlistFromSchematic( netlist, _( "Schematic parity tests require a " + "fully annotated schematic." ) ) ) + { netlistFetched = true; + } if( m_drcDialog ) m_drcDialog->Raise();