PNS: Fix a few issues with debug logging
Hide non-copper layers for clarity Fix saving of router settings
This commit is contained in:
parent
ca55656850
commit
5cbe3c5d42
|
@ -479,8 +479,10 @@ bool JSON_SETTINGS::SaveToFile( const wxString& aDirectory, bool aForce )
|
|||
}
|
||||
|
||||
|
||||
const std::string JSON_SETTINGS::FormatAsString() const
|
||||
const std::string JSON_SETTINGS::FormatAsString()
|
||||
{
|
||||
Store();
|
||||
|
||||
LOCALE_IO dummy;
|
||||
|
||||
std::stringstream buffer;
|
||||
|
|
|
@ -224,10 +224,10 @@ c * @return true if the file was saved
|
|||
* @param aTarget is the storage destination
|
||||
* @return True if set, false if not
|
||||
*/
|
||||
static bool SetIfPresent( const nlohmann::json& aObj, const std::string& aPath,
|
||||
static bool SetIfPresent( const nlohmann::json& aObj, const std::string& aPath ,
|
||||
unsigned int& aTarget );
|
||||
|
||||
const std::string FormatAsString() const;
|
||||
const std::string FormatAsString();
|
||||
|
||||
bool LoadFromRawFile( const wxString& aPath );
|
||||
|
||||
|
|
|
@ -592,17 +592,20 @@ void ROUTER_TOOL::saveRouterDebugLog()
|
|||
fname_settings.SetPath( cwd );
|
||||
fname_settings.SetName( "pns.settings" );
|
||||
|
||||
wxString msg = wxString::Format( _( "Event file: %s\nBoard dump: %s" ), fname_log.GetFullPath(), fname_log.GetFullPath() );
|
||||
wxString msg = wxString::Format( _( "Event file: %s\nBoard dump: %s" ), fname_log.GetFullPath(),
|
||||
fname_log.GetFullPath() );
|
||||
|
||||
int rv = OKOrCancelDialog( nullptr, _("Save router log"), _("Would you like to save the router\nevent log for debugging purposes?"), msg, _("OK"), _("Cancel") );
|
||||
int rv = OKOrCancelDialog( nullptr, _( "Save router log" ),
|
||||
_( "Would you like to save the router\nevent log for debugging purposes?" ), msg,
|
||||
_( "OK" ), _( "Cancel" ) );
|
||||
|
||||
if( !rv )
|
||||
return;
|
||||
|
||||
FILE *f = fopen( fname_settings.GetFullPath().c_str(), "wb" );
|
||||
FILE* f = fopen( fname_settings.GetFullPath().c_str(), "wb" );
|
||||
std::string settingsStr = m_router->Settings().FormatAsString();
|
||||
fprintf(f,"%s\n", settingsStr.c_str( ) );
|
||||
fclose(f);
|
||||
fprintf( f, "%s\n", settingsStr.c_str() );
|
||||
fclose( f );
|
||||
|
||||
f = fopen( fname_log.GetFullPath().c_str(), "wb" );
|
||||
|
||||
|
|
|
@ -172,6 +172,9 @@ PNS_LOG_VIEWER_FRAME::PNS_LOG_VIEWER_FRAME( wxFrame* frame ) : PNS_LOG_VIEWER_FR
|
|||
m_overlay.reset( new PNS_LOG_VIEWER_OVERLAY ( m_galPanel->GetGAL() ) );
|
||||
m_galPanel->GetView()->Add( m_overlay.get() );
|
||||
m_galPanel->GetViewControls()->EnableCursorWarping(false);
|
||||
|
||||
for( PCB_LAYER_ID layer : LSET::AllNonCuMask().Seq() )
|
||||
m_galPanel->GetView()->SetLayerVisible( layer, false );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue