Compare commits
291 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 702e8b8915 | |||
| 9226144312 | |||
| d937abb5b8 | |||
| bfd5afd6c8 | |||
| ab878cc257 | |||
| a8c275ae5d | |||
| d75329b6f1 | |||
| 861589d837 | |||
| 54f91a0221 | |||
| 8e1e8e1492 | |||
| 20ef0e54fe | |||
| aa126a12f2 | |||
| eecb54bff2 | |||
| b554c4cb66 | |||
| b447d55900 | |||
| a444addd89 | |||
| 209d593ca0 | |||
| 4fbb957fa3 | |||
| 8100a8940f | |||
| 485e4ddf05 | |||
| 4ab750e926 | |||
| a10d9628c9 | |||
| 5b175d6d53 | |||
| 10217f5507 | |||
| f185511698 | |||
| db972a708a | |||
| efaabfa852 | |||
| 932cb82c82 | |||
| f0d52ff2de | |||
| fc737ffffd | |||
| 4df36a3438 | |||
| e72bd34383 | |||
| 8fc831cbc2 | |||
| aa5b6c70a7 | |||
| 7d5c1d7b5c | |||
| f5a56c1ebc | |||
| 3af606a020 | |||
| 132358211e | |||
| f412d8d461 | |||
| 71bcc9883a | |||
| be958e3fdb | |||
| b2c99dd953 | |||
| c875af48e7 | |||
| 471c0c4c1d | |||
| 9e5e46514d | |||
| ba70f202ce | |||
| e18fc36646 | |||
| 4657614e4f | |||
| d295025964 | |||
| 2365c1e96f | |||
| 430c4862b6 | |||
| 4c81307391 | |||
| 57cbe261f2 | |||
| 50d3a507d0 | |||
| 7642a9db79 | |||
| 527e06d989 | |||
| 69b69aa431 | |||
| d6a86fa9e0 | |||
| 0a13f15a9d | |||
| ef94f31204 | |||
| 7601a3385f | |||
| ccf2a63f45 | |||
| 901685f01b | |||
| bdf235c25f | |||
| 0ffa266315 | |||
| 5c94d59e75 | |||
| 02f93805d0 | |||
| 2e324aa845 | |||
| fecb625459 | |||
| b883eee911 | |||
| 01f3a14dc3 | |||
| 2425444947 | |||
| 66e12af548 | |||
| ea38056e33 | |||
| c805144c08 | |||
| 927afe313d | |||
| 03f643ca42 | |||
| 945b841e1b | |||
| 6771ceb050 | |||
| 61853a2d7c | |||
| 92773335f7 | |||
| ef58267013 | |||
| 35e9c57555 | |||
| 1e3b3df808 | |||
| c062ba3044 | |||
| 44b4e6753c | |||
| 9c22a8000e | |||
| 83729adca4 | |||
| 2585f7e7a4 | |||
| a7d586818c | |||
| 0030ddee26 | |||
| 1853900389 | |||
| f1a04828f7 | |||
| c8b0a3697f | |||
| e8774181f8 | |||
| b253d9085d | |||
| 6d1351fa98 | |||
| d7eef72c29 | |||
| 84bae1f3df | |||
| b5bc942758 | |||
| 86f485619a | |||
| a9f832556c | |||
| 01aff3bf80 | |||
| 5ba8dcdcf1 | |||
| c2edf23118 | |||
| 00dd29ae8b | |||
| 5c4389a3c4 | |||
| c81a71627f | |||
| 6d84acfacd | |||
| 788c607d47 | |||
| 169881dcf1 | |||
| a7fbdfe918 | |||
| 3d11ce5139 | |||
| 833ce19221 | |||
| 73d0d7796c | |||
| 42dfdf8c38 | |||
| 70d00689ca | |||
| 26dfc4477f | |||
| 38a4894d92 | |||
| c2707f3cc0 | |||
| 8753051db6 | |||
| 8ae304dcca | |||
| 796893de56 | |||
| ea52101c1b | |||
| ca27b38182 | |||
| 3f6a4296d9 | |||
| 2a27899b9b | |||
| 1a534ade89 | |||
| fddfce4fb1 | |||
| ab184ba9f3 | |||
| a1615cce7e | |||
| 871556ebda | |||
| 7152c4ebb8 | |||
| 34dafdd2c1 | |||
| f12d0cb0e2 | |||
| 029e42f8d1 | |||
| 60ae18893e | |||
| e0b835fe20 | |||
| d6c4215a1f | |||
| 8b6a166698 | |||
| e9a5e5466c | |||
| 0317185860 | |||
| c02cadec2a | |||
| b608ebd058 | |||
| 6d7659fb20 | |||
| dd7029ea07 | |||
| 323a069738 | |||
| 615eda816e | |||
| 6810479a19 | |||
| d9c6765be7 | |||
| 857683d372 | |||
| 24865971af | |||
| 10ce515aca | |||
| da28ade004 | |||
| f97a0fb3e9 | |||
| cccdac136f | |||
| 2306d00c89 | |||
| 20bbf9b179 | |||
| cf4d46b24d | |||
| 739c14eaa2 | |||
| adfbfc27af | |||
| 26047615bd | |||
| dcb8f29317 | |||
| 57d58fe335 | |||
| 56d87a8613 | |||
| 9a0323fe17 | |||
| 0a9271f98e | |||
| 3c91b0c693 | |||
| 562bd7d564 | |||
| ad726dc6e4 | |||
| b2ecf097ed | |||
| 8dca61ce9c | |||
| e8e25fd732 | |||
| bd7841bf96 | |||
| 55020c2b89 | |||
| a74d1d9962 | |||
| 4d899d7820 | |||
| 4907b90215 | |||
| a399f799ad | |||
| 55cd2da432 | |||
| 096600ffc4 | |||
| b4bae29c02 | |||
| e4a5ce78aa | |||
| 522738284d | |||
| cc0d5ec46a | |||
| f2018a09d8 | |||
| 54952ca97e | |||
| a8543b1122 | |||
| 790ca19445 | |||
| f56b3bdd07 | |||
| 7d635d3d43 | |||
| 37f62e539b | |||
| 3196f4adb6 | |||
| b4d67b6b29 | |||
| f7d790598b | |||
| bbf00e0461 | |||
| a91f807e13 | |||
| 100cf757fe | |||
| 76f21d950d | |||
| 69469b254a | |||
| bfca928900 | |||
| 62f8603353 | |||
| 9a2332dfcf | |||
| 4bcfa8df1f | |||
| a0e424c2ac | |||
| f4b9a92b94 | |||
| 184a592f82 | |||
| 3e6bf7814b | |||
| 9864337914 | |||
| 78e737b9d8 | |||
| d014f0307b | |||
| 7c9340f855 | |||
| 3069b198b1 | |||
| 05d3dc533b | |||
| 1e05732f55 | |||
| 71e7b4b77b | |||
| b8a7a66a0a | |||
| 55087a9e82 | |||
| 444801ada6 | |||
| 7afe188a29 | |||
| 1ad1cf8374 | |||
| abaee94109 | |||
| d60e77176f | |||
| 7f1648934f | |||
| bef762e652 | |||
| a05ec04ee8 | |||
| 362eedc510 | |||
| 11402e2db1 | |||
| b1658fdf9a | |||
| f9d8ec6137 | |||
| e9b91b6fab | |||
| 873353d8d7 | |||
| a326d777f0 | |||
| dec310f7f8 | |||
| ca8cf14dff | |||
| ed9a3deb57 | |||
| 58b07efd99 | |||
| 1874ad2f7e | |||
| b115aec42b | |||
| 5e884d14c7 | |||
| e36381bdd2 | |||
| 45182febaf | |||
| ea99c42df6 | |||
| 0065036899 | |||
| bb388d47fc | |||
| 134b09004b | |||
| c52421869a | |||
| addc5574b4 | |||
| bd75cffff3 | |||
| 3453bf3f88 | |||
| f139cc2d9f | |||
| 6fd93eaa1e | |||
| cf8c614a02 | |||
| 9fd1ad9b7b | |||
| d45472adcd | |||
| f67c0ea8c7 | |||
| 3c2bb97eae | |||
| cbdfb5d396 | |||
| e19acb4632 | |||
| 11c967b259 | |||
| 517e44e917 | |||
| 0ec440805d | |||
| 67fe8904c0 | |||
| da850036e3 | |||
| b80595903c | |||
| c83880428c | |||
| cc84344499 | |||
| 32be48222a | |||
| b7ec594c0a | |||
| 2481b21d80 | |||
| ceb4d08ce9 | |||
| 6edc605cab | |||
| d913e6a8f7 | |||
| bde0c3e879 | |||
| b95032901e | |||
| 753e08a944 | |||
| ee1b327162 | |||
| da5f2366f9 | |||
| e7cc177d94 | |||
| 93c48b9d46 | |||
| 1b033d56a7 | |||
| ad583eab13 | |||
| 0d3246e3ab | |||
| 76fd029cd6 | |||
| 2efa878287 | |||
| 1dc78c4adc | |||
| 34d855cd53 | |||
| 9cb36e5bc5 | |||
| b6ff44cccf | |||
| e9e742816d | |||
| b403930601 |
@@ -3,6 +3,9 @@
|
||||
##########################################################################
|
||||
fedora_build_linux:
|
||||
stage: build
|
||||
tags:
|
||||
- kicad-fedora
|
||||
image: registry.gitlab.com/kicad/kicad-ci/source_containers/master/fedora:34
|
||||
extends: .only_code
|
||||
interruptible: false
|
||||
cache:
|
||||
@@ -18,14 +21,14 @@ fedora_build_linux:
|
||||
- mkdir -p build/linux
|
||||
- cd build/linux
|
||||
- cmake
|
||||
-G Ninja
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
-DKICAD_STDLIB_LIGHT_DEBUG=ON
|
||||
-DKICAD_USE_OCC=ON
|
||||
-DKICAD_SPICE=ON
|
||||
-DKICAD_BUILD_I18N=ON
|
||||
-DKICAD_BUILD_PNS_DEBUG_TOOL=ON
|
||||
../../
|
||||
- make 2>&1 | tee compilation_log.txt
|
||||
- ninja 2>&1 | tee compilation_log.txt
|
||||
- cd ../../
|
||||
artifacts:
|
||||
# Only save the artifacts that are needed for running the tests in the next stage
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
##########################################################################
|
||||
# Build KiCad on Ubuntu 20.04 and save the results
|
||||
##########################################################################
|
||||
ubuntu20.04_build:
|
||||
.ubuntu20.04_build:
|
||||
stage: build
|
||||
tags:
|
||||
- kicad-ubuntu20.04
|
||||
@@ -30,12 +30,7 @@ ubuntu20.04_build:
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
-DKICAD_STDLIB_LIGHT_DEBUG=ON
|
||||
-DKICAD_SCRIPTING=ON
|
||||
-DKICAD_SCRIPTING_MODULES=ON
|
||||
-DKICAD_SCRIPTING_PYTHON3=ON
|
||||
-DKICAD_SCRIPTING_WXPYTHON=ON
|
||||
-DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
|
||||
-DKICAD_SCRIPTING_ACTION_MENU=ON
|
||||
-DKICAD_USE_OCC=ON
|
||||
-DKICAD_SPICE=ON
|
||||
-DKICAD_BUILD_I18N=ON
|
||||
@@ -57,7 +52,7 @@ ubuntu20.04_build:
|
||||
- build/linux/compilation_log.txt
|
||||
|
||||
# Upload the compilation log in an easily downloadable form
|
||||
ubuntu20.04_report_build_warn:
|
||||
.ubuntu20.04_report_build_warn:
|
||||
stage: report
|
||||
when: always
|
||||
only:
|
||||
@@ -79,7 +74,7 @@ ubuntu20.04_report_build_warn:
|
||||
- compilation_log.txt
|
||||
|
||||
# Report on the metrics of the code
|
||||
ubuntu20.04_report_metrics:
|
||||
.ubuntu20.04_report_metrics:
|
||||
stage: report
|
||||
when: always
|
||||
only:
|
||||
@@ -100,7 +95,7 @@ ubuntu20.04_report_metrics:
|
||||
##########################################################################
|
||||
# Run the code unit tests.
|
||||
##########################################################################
|
||||
ubuntu20.04_qa:
|
||||
.ubuntu20.04_qa:
|
||||
extends:
|
||||
- .unit_test
|
||||
needs:
|
||||
|
||||
@@ -18,12 +18,7 @@ win64_build:
|
||||
-G "Ninja" `
|
||||
-DCMAKE_TOOLCHAIN_FILE=C:\build\vcpkg\scripts\buildsystems\vcpkg.cmake `
|
||||
-DCMAKE_BUILD_TYPE=Debug `
|
||||
-DKICAD_SCRIPTING=OFF `
|
||||
-DKICAD_SCRIPTING_MODULES=OFF `
|
||||
-DKICAD_SCRIPTING_PYTHON3=OFF `
|
||||
-DKICAD_SCRIPTING_WXPYTHON=OFF `
|
||||
-DKICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF `
|
||||
-DKICAD_SCRIPTING_ACTION_MENU=OFF `
|
||||
-DKICAD_USE_OCC=ON `
|
||||
-DKICAD_SPICE=ON `
|
||||
-DKICAD_BUILD_PNS_DEBUG_TOOL=ON `
|
||||
|
||||
@@ -59,12 +59,7 @@ Coverity:
|
||||
- cmake
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
-DKICAD_STDLIB_LIGHT_DEBUG=ON
|
||||
-DKICAD_SCRIPTING=ON
|
||||
-DKICAD_SCRIPTING_MODULES=ON
|
||||
-DKICAD_SCRIPTING_PYTHON3=ON
|
||||
-DKICAD_SCRIPTING_WXPYTHON=ON
|
||||
-DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
|
||||
-DKICAD_SCRIPTING_ACTION_MENU=ON
|
||||
-DKICAD_USE_OCC=ON
|
||||
-DKICAD_SPICE=ON
|
||||
- coverity/bin/cov-build --dir cov-int make -j8
|
||||
|
||||
@@ -30,12 +30,7 @@ validate_linux_metadata:
|
||||
- cmake
|
||||
-DCMAKE_BUILD_TYPE=Debug
|
||||
-DKICAD_STDLIB_LIGHT_DEBUG=ON
|
||||
-DKICAD_SCRIPTING=ON
|
||||
-DKICAD_SCRIPTING_MODULES=ON
|
||||
-DKICAD_SCRIPTING_PYTHON3=ON
|
||||
-DKICAD_SCRIPTING_WXPYTHON=ON
|
||||
-DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
|
||||
-DKICAD_SCRIPTING_ACTION_MENU=ON
|
||||
-DKICAD_USE_OCC=ON
|
||||
-DKICAD_SPICE=ON
|
||||
-DKICAD_BUILD_I18N=ON
|
||||
|
||||
@@ -165,7 +165,7 @@ void S3D_CACHE_ENTRY::SetSHA1( const unsigned char* aSHA1Sum )
|
||||
{
|
||||
if( nullptr == aSHA1Sum )
|
||||
{
|
||||
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * [BUG] NULL passed for aSHA1Sum",
|
||||
wxLogTrace( MASK_3D_CACHE, wxT( "%s:%s:%d\n * [BUG] NULL passed for aSHA1Sum" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return;
|
||||
@@ -221,7 +221,7 @@ SCENEGRAPH* S3D_CACHE::load( const wxString& aModelFile, S3D_CACHE_ENTRY** aCach
|
||||
if( full3Dpath.empty() )
|
||||
{
|
||||
// the model cannot be found; we cannot proceed
|
||||
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * [3D model] could not find model '%s'\n",
|
||||
wxLogTrace( MASK_3D_CACHE, wxT( "%s:%s:%d\n * [3D model] could not find model '%s'\n" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, aModelFile );
|
||||
return nullptr;
|
||||
}
|
||||
@@ -307,7 +307,8 @@ SCENEGRAPH* S3D_CACHE::checkCache( const wxString& aFileName, S3D_CACHE_ENTRY**
|
||||
if( m_CacheMap.insert( std::pair< wxString, S3D_CACHE_ENTRY* >
|
||||
( aFileName, ep ) ).second == false )
|
||||
{
|
||||
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * [BUG] duplicate entry in map file; key = '%s'",
|
||||
wxLogTrace( MASK_3D_CACHE,
|
||||
wxT( "%s:%s:%d\n * [BUG] duplicate entry in map file; key = '%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, aFileName );
|
||||
|
||||
m_CacheList.pop_back();
|
||||
@@ -325,7 +326,8 @@ SCENEGRAPH* S3D_CACHE::checkCache( const wxString& aFileName, S3D_CACHE_ENTRY**
|
||||
if( m_CacheMap.insert( std::pair< wxString, S3D_CACHE_ENTRY* >
|
||||
( aFileName, ep ) ).second == false )
|
||||
{
|
||||
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * [BUG] duplicate entry in map file; key = '%s'",
|
||||
wxLogTrace( MASK_3D_CACHE,
|
||||
wxT( "%s:%s:%d\n * [BUG] duplicate entry in map file; key = '%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, aFileName );
|
||||
|
||||
m_CacheList.pop_back();
|
||||
@@ -358,7 +360,7 @@ bool S3D_CACHE::getSHA1( const wxString& aFileName, unsigned char* aSHA1Sum )
|
||||
{
|
||||
if( aFileName.empty() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * [BUG] empty filename",
|
||||
wxLogTrace( MASK_3D_CACHE, wxT( "%s:%s:%d\n * [BUG] empty filename" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
@@ -366,7 +368,7 @@ bool S3D_CACHE::getSHA1( const wxString& aFileName, unsigned char* aSHA1Sum )
|
||||
|
||||
if( nullptr == aSHA1Sum )
|
||||
{
|
||||
wxLogTrace( MASK_3D_CACHE, "%s\n * [BUG] NULL pointer passed for aMD5Sum",
|
||||
wxLogTrace( MASK_3D_CACHE, wxT( "%s\n * [BUG] NULL pointer passed for aMD5Sum" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
@@ -417,7 +419,7 @@ bool S3D_CACHE::loadCacheData( S3D_CACHE_ENTRY* aCacheItem )
|
||||
if( bname.empty() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_CACHE,
|
||||
" * [3D model] cannot load cached model; no file hash available" );
|
||||
wxT( " * [3D model] cannot load cached model; no file hash available" ) );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -425,7 +427,7 @@ bool S3D_CACHE::loadCacheData( S3D_CACHE_ENTRY* aCacheItem )
|
||||
if( m_CacheDir.empty() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_CACHE,
|
||||
" * [3D model] cannot load cached model; config directory unknown" );
|
||||
wxT( " * [3D model] cannot load cached model; config directory unknown" ) );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -434,8 +436,7 @@ bool S3D_CACHE::loadCacheData( S3D_CACHE_ENTRY* aCacheItem )
|
||||
|
||||
if( !wxFileName::FileExists( fname ) )
|
||||
{
|
||||
wxString errmsg = "cannot open file";
|
||||
wxLogTrace( MASK_3D_CACHE, " * [3D model] %s '%s'", errmsg.GetData(), fname.GetData() );
|
||||
wxLogTrace( MASK_3D_CACHE, wxT( " * [3D model] cannot open file '%s'" ), fname.GetData() );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -455,7 +456,7 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem )
|
||||
{
|
||||
if( nullptr == aCacheItem )
|
||||
{
|
||||
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * NULL passed for aCacheItem",
|
||||
wxLogTrace( MASK_3D_CACHE, wxT( "%s:%s:%d\n * NULL passed for aCacheItem" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
@@ -463,7 +464,7 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem )
|
||||
|
||||
if( nullptr == aCacheItem->sceneData )
|
||||
{
|
||||
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * aCacheItem has no valid scene data",
|
||||
wxLogTrace( MASK_3D_CACHE, wxT( "%s:%s:%d\n * aCacheItem has no valid scene data" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
@@ -474,7 +475,7 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem )
|
||||
if( bname.empty() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_CACHE,
|
||||
" * [3D model] cannot load cached model; no file hash available" );
|
||||
wxT( " * [3D model] cannot load cached model; no file hash available" ) );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -482,7 +483,7 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem )
|
||||
if( m_CacheDir.empty() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_CACHE,
|
||||
" * [3D model] cannot load cached model; config directory unknown" );
|
||||
wxT( " * [3D model] cannot load cached model; config directory unknown" ) );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -493,8 +494,8 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem )
|
||||
{
|
||||
if( !wxFileName::FileExists( fname ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_CACHE, " * [3D model] path exists but is not a regular file '%s'",
|
||||
fname );
|
||||
wxLogTrace( MASK_3D_CACHE,
|
||||
wxT( " * [3D model] path exists but is not a regular file '%s'" ), fname );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -510,7 +511,7 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
|
||||
if( !m_ConfigDir.empty() )
|
||||
return false;
|
||||
|
||||
wxFileName cfgdir( ExpandEnvVarSubstitutions( aConfigDir, m_project ), "" );
|
||||
wxFileName cfgdir( ExpandEnvVarSubstitutions( aConfigDir, m_project ), wxEmptyString );
|
||||
|
||||
cfgdir.Normalize();
|
||||
|
||||
@@ -521,7 +522,7 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
|
||||
if( !cfgdir.DirExists() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_CACHE,
|
||||
"%s:%s:%d\n * failed to create 3D configuration directory '%s'",
|
||||
wxT( "%s:%s:%d\n * failed to create 3D configuration directory '%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, cfgdir.GetPath() );
|
||||
|
||||
return false;
|
||||
@@ -534,8 +535,8 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
|
||||
if( !m_FNResolver->Set3DConfigDir( m_ConfigDir ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_CACHE,
|
||||
"%s:%s:%d\n * could not set 3D Config Directory on filename resolver\n"
|
||||
" * config directory: '%s'",
|
||||
wxT( "%s:%s:%d\n * could not set 3D Config Directory on filename resolver\n"
|
||||
" * config directory: '%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, m_ConfigDir );
|
||||
}
|
||||
|
||||
@@ -548,7 +549,7 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
|
||||
// 3. MSWin: AppData\Local\kicad\3d
|
||||
wxFileName cacheDir;
|
||||
cacheDir.AssignDir( PATHS::GetUserCachePath() );
|
||||
cacheDir.AppendDir( "3d" );
|
||||
cacheDir.AppendDir( wxT( "3d" ) );
|
||||
|
||||
if( !cacheDir.DirExists() )
|
||||
{
|
||||
@@ -556,7 +557,8 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
|
||||
|
||||
if( !cacheDir.DirExists() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * failed to create 3D cache directory '%s'",
|
||||
wxLogTrace( MASK_3D_CACHE,
|
||||
wxT( "%s:%s:%d\n * failed to create 3D cache directory '%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, cacheDir.GetPath() );
|
||||
|
||||
return false;
|
||||
@@ -651,7 +653,7 @@ S3DMODEL* S3D_CACHE::GetModel( const wxString& aModelFileName )
|
||||
if( !cp )
|
||||
{
|
||||
wxLogTrace( MASK_3D_CACHE,
|
||||
"%s:%s:%d\n * [BUG] model loaded with no associated S3D_CACHE_ENTRY",
|
||||
wxT( "%s:%s:%d\n * [BUG] model loaded with no associated S3D_CACHE_ENTRY" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return nullptr;
|
||||
|
||||
@@ -65,11 +65,11 @@ S3D_PLUGIN_MANAGER::S3D_PLUGIN_MANAGER()
|
||||
{
|
||||
std::multimap< const wxString, KICAD_PLUGIN_LDR_3D* >::const_iterator sM = m_ExtMap.begin();
|
||||
std::multimap< const wxString, KICAD_PLUGIN_LDR_3D* >::const_iterator eM = m_ExtMap.end();
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, " * Extension [plugin name]:\n" );
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, wxT( " * Extension [plugin name]:\n" ) );
|
||||
|
||||
while( sM != eM )
|
||||
{
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, " + '%s' [%s]\n", sM->first.GetData(),
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, wxT( " + '%s' [%s]\n" ), sM->first.GetData(),
|
||||
sM->second->GetKicadPluginName() );
|
||||
++sM;
|
||||
}
|
||||
@@ -77,7 +77,7 @@ S3D_PLUGIN_MANAGER::S3D_PLUGIN_MANAGER()
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, " * No plugins available\n" );
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, wxT( " * No plugins available\n" ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -86,17 +86,17 @@ S3D_PLUGIN_MANAGER::S3D_PLUGIN_MANAGER()
|
||||
/// list of file filters
|
||||
std::list< wxString >::const_iterator sFF = m_FileFilters.begin();
|
||||
std::list< wxString >::const_iterator eFF = m_FileFilters.end();
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, " * File filters:\n" );
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, wxT( " * File filters:\n" ) );
|
||||
|
||||
while( sFF != eFF )
|
||||
{
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, " + '%s'\n", (*sFF).GetData() );
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, wxT( " + '%s'\n" ), (*sFF).GetData() );
|
||||
++sFF;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, " * No file filters available\n" );
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, wxT( " * No file filters available\n" ) );
|
||||
}
|
||||
#endif // DEBUG
|
||||
}
|
||||
@@ -178,7 +178,7 @@ void S3D_PLUGIN_MANAGER::loadPlugins( void )
|
||||
|
||||
while( sPL != ePL )
|
||||
{
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, "%s:%s:%d * [DEBUG] searching path: '%s'",
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, wxT( "%s:%s:%d * [DEBUG] searching path: '%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, (*sPL).ToUTF8() );
|
||||
|
||||
listPlugins( *sPL, pluginlist );
|
||||
@@ -197,13 +197,13 @@ void S3D_PLUGIN_MANAGER::loadPlugins( void )
|
||||
|
||||
if( pp->Open( sPL->ToUTF8() ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, "%s:%s:%d * [DEBUG] adding plugin",
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, wxT( "%s:%s:%d * [DEBUG] adding plugin" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
m_Plugins.push_back( pp );
|
||||
int nf = pp->GetNFilters();
|
||||
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, "%s:%s:%d * [DEBUG] adding %d filters",
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, wxT( "%s:%s:%d * [DEBUG] adding %d filters" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, nf );
|
||||
|
||||
for( int i = 0; i < nf; ++i )
|
||||
@@ -221,7 +221,7 @@ void S3D_PLUGIN_MANAGER::loadPlugins( void )
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, "%s:%s:%d * [DEBUG] deleting plugin",
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, wxT( "%s:%s:%d * [DEBUG] deleting plugin" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
delete pp;
|
||||
@@ -230,7 +230,7 @@ void S3D_PLUGIN_MANAGER::loadPlugins( void )
|
||||
++sPL;
|
||||
}
|
||||
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, "%s:%s:%d * [DEBUG] plugins loaded",
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, wxT( "%s:%s:%d * [DEBUG] plugins loaded" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
}
|
||||
|
||||
@@ -305,7 +305,7 @@ void S3D_PLUGIN_MANAGER::checkPluginName( const wxString& aPath,
|
||||
|
||||
aPluginList.push_back( wxpath );
|
||||
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, " * [INFO] found 3D plugin '%s'\n", wxpath.GetData() );
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, wxT( " * [INFO] found 3D plugin '%s'\n" ), wxpath.GetData() );
|
||||
}
|
||||
|
||||
|
||||
@@ -316,14 +316,15 @@ void S3D_PLUGIN_MANAGER::checkPluginPath( const wxString& aPath,
|
||||
if( aPath.empty() )
|
||||
return;
|
||||
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, " * [INFO] checking for 3D plugins in '%s'\n", aPath.GetData() );
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, wxT( " * [INFO] checking for 3D plugins in '%s'\n" ),
|
||||
aPath.GetData() );
|
||||
|
||||
wxFileName path;
|
||||
|
||||
if( aPath.StartsWith( "${" ) || aPath.StartsWith( "$(" ) )
|
||||
path.Assign( ExpandEnvVarSubstitutions( aPath, nullptr ), "" );
|
||||
if( aPath.StartsWith( wxT( "${" ) ) || aPath.StartsWith( wxT( "$(" ) ) )
|
||||
path.Assign( ExpandEnvVarSubstitutions( aPath, nullptr ), wxEmptyString );
|
||||
else
|
||||
path.Assign( aPath, "" );
|
||||
path.Assign( aPath, wxEmptyString );
|
||||
|
||||
path.Normalize();
|
||||
|
||||
@@ -377,7 +378,7 @@ void S3D_PLUGIN_MANAGER::addExtensionMap( KICAD_PLUGIN_LDR_3D* aPlugin )
|
||||
|
||||
int nExt = aPlugin->GetNExtensions();
|
||||
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, "%s:%s:%d * [INFO] adding %d extensions",
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, wxT( "%s:%s:%d * [INFO] adding %d extensions" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, nExt );
|
||||
|
||||
for( int i = 0; i < nExt; ++i )
|
||||
@@ -415,10 +416,10 @@ SCENEGRAPH* S3D_PLUGIN_MANAGER::Load3DModel( const wxString& aFileName, std::str
|
||||
#endif
|
||||
|
||||
// .gz files are compressed versions that may have additional information in the previous extension
|
||||
if( ext_to_find == "gz" )
|
||||
if( ext_to_find == wxT( "gz" ) )
|
||||
{
|
||||
wxFileName second( raw.GetName() );
|
||||
ext_to_find = second.GetExt() + ".gz";
|
||||
ext_to_find = second.GetExt() + wxT( ".gz" );
|
||||
}
|
||||
|
||||
std::pair < std::multimap< const wxString, KICAD_PLUGIN_LDR_3D* >::iterator,
|
||||
@@ -452,7 +453,7 @@ void S3D_PLUGIN_MANAGER::ClosePlugins( void )
|
||||
std::list< KICAD_PLUGIN_LDR_3D* >::iterator sP = m_Plugins.begin();
|
||||
std::list< KICAD_PLUGIN_LDR_3D* >::iterator eP = m_Plugins.end();
|
||||
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, "%s:%s:%d * [INFO] closing %d extensions",
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, wxT( "%s:%s:%d * [INFO] closing %d extensions" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( m_Plugins.size() ) );
|
||||
|
||||
while( sP != eP )
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
#include <wx/filename.h>
|
||||
#include <wx/log.h>
|
||||
#include "plugins/3dapi/ifsg_api.h"
|
||||
@@ -97,7 +98,7 @@ bool S3D::WriteVRML( const char* filename, bool overwrite, SGNODE* aTopNode,
|
||||
|
||||
if( op.fail() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] failed to open file '%s'",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] failed to open file '%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, filename );
|
||||
|
||||
return false;
|
||||
@@ -122,7 +123,7 @@ bool S3D::WriteVRML( const char* filename, bool overwrite, SGNODE* aTopNode,
|
||||
|
||||
CLOSE_STREAM( op );
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] problems encountered writing file '%s'",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] problems encountered writing file '%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, filename );
|
||||
|
||||
return false;
|
||||
@@ -167,7 +168,7 @@ bool S3D::WriteCache( const char* aFileName, bool overwrite, SGNODE* aNode,
|
||||
{
|
||||
if( !overwrite )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] file exists not overwriting '%s'",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] file exists not overwriting '%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, aFileName );
|
||||
|
||||
return false;
|
||||
@@ -176,7 +177,7 @@ bool S3D::WriteCache( const char* aFileName, bool overwrite, SGNODE* aNode,
|
||||
// make sure we make no attempt to write a directory
|
||||
if( !wxFileName::FileExists( aFileName ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] specified path is a directory '%s'",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] specified path is a directory '%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, aFileName );
|
||||
|
||||
return false;
|
||||
@@ -187,7 +188,7 @@ bool S3D::WriteCache( const char* aFileName, bool overwrite, SGNODE* aNode,
|
||||
|
||||
if( output.fail() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] failed to open file '%s'",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] failed to open file '%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, aFileName );
|
||||
|
||||
return false;
|
||||
@@ -205,7 +206,8 @@ bool S3D::WriteCache( const char* aFileName, bool overwrite, SGNODE* aNode,
|
||||
|
||||
if( !rval )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] problems encountered writing cache file '%s'",
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
wxT( "%s:%s:%d * [INFO] problems encountered writing cache file '%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, aFileName );
|
||||
|
||||
// delete the defective file
|
||||
@@ -226,21 +228,19 @@ SGNODE* S3D::ReadCache( const char* aFileName, void* aPluginMgr,
|
||||
|
||||
if( !wxFileName::FileExists( aFileName ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] no such file '%s'",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] no such file '%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, aFileName );
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
SGNODE* np = new SCENEGRAPH( nullptr );
|
||||
std::unique_ptr<SGNODE> np = std::make_unique<SCENEGRAPH>( nullptr );
|
||||
|
||||
OPEN_ISTREAM( file, aFileName );
|
||||
|
||||
if( file.fail() )
|
||||
{
|
||||
delete np;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] failed to open file '%s'",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] failed to open file '%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, aFileName );
|
||||
|
||||
return nullptr;
|
||||
@@ -256,9 +256,10 @@ SGNODE* S3D::ReadCache( const char* aFileName, void* aPluginMgr,
|
||||
|
||||
if( '(' != schar )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; missing left parenthesis at position '%d'",
|
||||
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( file.tellg() ) );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; missing left parenthesis"
|
||||
" at position '%d'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<int>( file.tellg() ) );
|
||||
|
||||
CLOSE_STREAM( file );
|
||||
return nullptr;
|
||||
@@ -290,9 +291,10 @@ SGNODE* S3D::ReadCache( const char* aFileName, void* aPluginMgr,
|
||||
|
||||
if( '(' != schar )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; missing left parenthesis at position '%d'",
|
||||
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( file.tellg() ) );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; missing left parenthesis"
|
||||
" at position '%d'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<int>( file.tellg() ) );
|
||||
|
||||
CLOSE_STREAM( file );
|
||||
return nullptr;
|
||||
@@ -321,15 +323,15 @@ SGNODE* S3D::ReadCache( const char* aFileName, void* aPluginMgr,
|
||||
|
||||
if( !rval )
|
||||
{
|
||||
delete np;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] problems encountered reading cache file '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, aFileName );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] problems encountered reading cache file "
|
||||
"'%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
aFileName );
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return np;
|
||||
return np.release();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -56,7 +56,8 @@ IFSG_APPEARANCE::IFSG_APPEARANCE( SGNODE* aParent )
|
||||
delete m_node;
|
||||
m_node = nullptr;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
|
||||
WrongParent );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -72,7 +73,8 @@ IFSG_APPEARANCE::IFSG_APPEARANCE( IFSG_NODE& aParent )
|
||||
#ifdef DEBUG
|
||||
if( ! pp )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, BadParent );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
|
||||
BadParent );
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -83,7 +85,8 @@ IFSG_APPEARANCE::IFSG_APPEARANCE( IFSG_NODE& aParent )
|
||||
delete m_node;
|
||||
m_node = nullptr;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
|
||||
WrongParent );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -123,7 +126,8 @@ bool IFSG_APPEARANCE::NewNode( SGNODE* aParent )
|
||||
|
||||
if( aParent != m_node->GetParent() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGAPPEARANCE",
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGAPPEARANCE" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
aParent->GetNodeTypeName( aParent->GetNodeType() ) );
|
||||
|
||||
@@ -250,7 +254,7 @@ bool IFSG_APPEARANCE::SetShininess( float aShininess ) noexcept
|
||||
|
||||
if( aShininess < 0 || aShininess > 1.0 )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] shininess out of range [0..1]",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] shininess out of range [0..1]" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
@@ -268,7 +272,7 @@ bool IFSG_APPEARANCE::SetTransparency( float aTransparency ) noexcept
|
||||
|
||||
if( aTransparency < 0 || aTransparency > 1.0 )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] transparency out of range [0..1]",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] transparency out of range [0..1]" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
|
||||
@@ -56,7 +56,7 @@ IFSG_COLORS::IFSG_COLORS( SGNODE* aParent )
|
||||
delete m_node;
|
||||
m_node = nullptr;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d", __FILE__, __FUNCTION__, __LINE__ );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d" ), __FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -73,7 +73,8 @@ IFSG_COLORS::IFSG_COLORS( IFSG_NODE& aParent )
|
||||
// Braces needed due to dangling else warning from wxLogTrace macro
|
||||
if( !pp )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, BadParent );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
|
||||
BadParent );
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -84,7 +85,7 @@ IFSG_COLORS::IFSG_COLORS( IFSG_NODE& aParent )
|
||||
delete m_node;
|
||||
m_node = nullptr;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__,
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
|
||||
WrongParent );
|
||||
|
||||
return;
|
||||
@@ -125,7 +126,7 @@ bool IFSG_COLORS::NewNode( SGNODE* aParent )
|
||||
|
||||
if( aParent != m_node->GetParent() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGCOLORS",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGCOLORS" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
aParent->GetNodeTypeName( aParent->GetNodeType() ) );
|
||||
|
||||
|
||||
@@ -57,7 +57,8 @@ IFSG_COORDINDEX::IFSG_COORDINDEX( SGNODE* aParent )
|
||||
delete m_node;
|
||||
m_node = nullptr;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
|
||||
WrongParent );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -72,7 +73,8 @@ IFSG_COORDINDEX::IFSG_COORDINDEX( IFSG_NODE& aParent )
|
||||
|
||||
if( !pp )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, BadParent );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
|
||||
BadParent );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -81,7 +83,8 @@ IFSG_COORDINDEX::IFSG_COORDINDEX( IFSG_NODE& aParent )
|
||||
|
||||
if( !m_node->SetParent( pp ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
|
||||
WrongParent );
|
||||
|
||||
delete m_node;
|
||||
m_node = nullptr;
|
||||
@@ -123,7 +126,8 @@ bool IFSG_COORDINDEX::NewNode( SGNODE* aParent )
|
||||
|
||||
if( aParent != m_node->GetParent() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGCOORDINDEX",
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGCOORDINDEX" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
aParent->GetNodeTypeName( aParent->GetNodeType() ) );
|
||||
|
||||
|
||||
@@ -56,7 +56,8 @@ IFSG_COORDS::IFSG_COORDS( SGNODE* aParent )
|
||||
delete m_node;
|
||||
m_node = nullptr;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
|
||||
WrongParent );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -72,7 +73,8 @@ IFSG_COORDS::IFSG_COORDS( IFSG_NODE& aParent )
|
||||
#ifdef DEBUG
|
||||
if( !pp )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, BadParent );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
|
||||
BadParent );
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -83,7 +85,8 @@ IFSG_COORDS::IFSG_COORDS( IFSG_NODE& aParent )
|
||||
delete m_node;
|
||||
m_node = nullptr;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
|
||||
WrongParent );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -123,7 +126,7 @@ bool IFSG_COORDS::NewNode( SGNODE* aParent )
|
||||
|
||||
if( aParent != m_node->GetParent() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGCOORDS",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGCOORDS" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
aParent->GetNodeTypeName( aParent->GetNodeType() ) );
|
||||
|
||||
|
||||
@@ -57,7 +57,8 @@ IFSG_FACESET::IFSG_FACESET( SGNODE* aParent )
|
||||
delete m_node;
|
||||
m_node = nullptr;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
|
||||
WrongParent );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -73,7 +74,8 @@ IFSG_FACESET::IFSG_FACESET( IFSG_NODE& aParent )
|
||||
#ifdef DEBUG
|
||||
if( ! pp )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, BadParent );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
|
||||
BadParent );
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -84,7 +86,8 @@ IFSG_FACESET::IFSG_FACESET( IFSG_NODE& aParent )
|
||||
delete m_node;
|
||||
m_node = nullptr;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
|
||||
WrongParent );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -124,7 +127,7 @@ bool IFSG_FACESET::NewNode( SGNODE* aParent )
|
||||
|
||||
if( aParent != m_node->GetParent() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGFACESET",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGFACESET" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
aParent->GetNodeTypeName( aParent->GetNodeType() ) );
|
||||
|
||||
|
||||
@@ -57,7 +57,8 @@ IFSG_NORMALS::IFSG_NORMALS( SGNODE* aParent )
|
||||
delete m_node;
|
||||
m_node = nullptr;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
|
||||
WrongParent );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -73,7 +74,8 @@ IFSG_NORMALS::IFSG_NORMALS( IFSG_NODE& aParent )
|
||||
#ifdef DEBUG
|
||||
if( ! pp )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, BadParent );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
|
||||
BadParent );
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -84,7 +86,8 @@ IFSG_NORMALS::IFSG_NORMALS( IFSG_NODE& aParent )
|
||||
delete m_node;
|
||||
m_node = nullptr;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
|
||||
WrongParent );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -124,7 +127,7 @@ bool IFSG_NORMALS::NewNode( SGNODE* aParent )
|
||||
|
||||
if( aParent != m_node->GetParent() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGNORMALS",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGNORMALS" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
aParent->GetNodeTypeName( aParent->GetNodeType() ) );
|
||||
|
||||
|
||||
@@ -57,7 +57,8 @@ IFSG_SHAPE::IFSG_SHAPE( SGNODE* aParent )
|
||||
delete m_node;
|
||||
m_node = nullptr;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
|
||||
WrongParent );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -73,7 +74,8 @@ IFSG_SHAPE::IFSG_SHAPE( IFSG_NODE& aParent )
|
||||
#ifdef DEBUG
|
||||
if( !pp )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, BadParent );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
|
||||
BadParent );
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -84,7 +86,8 @@ IFSG_SHAPE::IFSG_SHAPE( IFSG_NODE& aParent )
|
||||
delete m_node;
|
||||
m_node = nullptr;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
|
||||
WrongParent );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -124,7 +127,7 @@ bool IFSG_SHAPE::NewNode( SGNODE* aParent )
|
||||
|
||||
if( aParent != m_node->GetParent() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGSHAPE",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGSHAPE" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
aParent->GetNodeTypeName( aParent->GetNodeType() ) );
|
||||
|
||||
|
||||
@@ -56,7 +56,8 @@ IFSG_TRANSFORM::IFSG_TRANSFORM( SGNODE* aParent )
|
||||
delete m_node;
|
||||
m_node = nullptr;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
|
||||
WrongParent );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -96,7 +97,7 @@ bool IFSG_TRANSFORM::NewNode( SGNODE* aParent )
|
||||
|
||||
if( aParent != m_node->GetParent() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SCENEGRAPH",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SCENEGRAPH" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
aParent->GetNodeTypeName( aParent->GetNodeType() ) );
|
||||
|
||||
@@ -148,7 +149,7 @@ bool IFSG_TRANSFORM::SetScale( double aScale )
|
||||
|
||||
if( aScale < 1e-8 && aScale > -1e-8 )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] |scale| is < 1e-8 - this seems strange",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] |scale| is < 1e-8 - this seems strange" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
|
||||
@@ -49,8 +49,10 @@ SCENEGRAPH::SCENEGRAPH( SGNODE* aParent ) : SGNODE( aParent )
|
||||
{
|
||||
m_Parent = nullptr;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SCENEGRAPH (type %d)" ,
|
||||
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() );
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
wxT( "%s:%s:%d * [BUG] inappropriate parent to SCENEGRAPH (type %d)" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
aParent->GetNodeType() );
|
||||
}
|
||||
else if( nullptr != aParent && S3D::SGTYPE_TRANSFORM == aParent->GetNodeType() )
|
||||
{
|
||||
@@ -140,7 +142,7 @@ void SCENEGRAPH::unlinkNode( const SGNODE* aNode, bool isChild )
|
||||
break;
|
||||
}
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] unlinkNode() did not find its target",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] unlinkNode() did not find its target" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
}
|
||||
|
||||
@@ -166,8 +168,11 @@ bool SCENEGRAPH::addNode( SGNODE* aNode, bool isChild )
|
||||
ADD_NODE( S3D::SGTYPE_TRANSFORM, SCENEGRAPH, aNode, m_Transforms, m_RTransforms, isChild );
|
||||
ADD_NODE( S3D::SGTYPE_SHAPE, SGSHAPE, aNode, m_Shape, m_RShape, isChild );
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] object '%s' is not a valid type for this object (%d)",
|
||||
__FILE__, __FUNCTION__, __LINE__, aNode->GetName(), aNode->GetNodeType() );
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
wxT( "%s:%s:%d * [BUG] object '%s' is not a valid type for this object (%d)" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
aNode->GetName(),
|
||||
aNode->GetNodeType() );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -358,7 +363,8 @@ bool SCENEGRAPH::WriteCache( std::ostream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( aFile.fail() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream", __FILE__, __FUNCTION__, __LINE__ );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad stream" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -414,7 +420,8 @@ bool SCENEGRAPH::WriteCache( std::ostream& aFile, SGNODE* parentNode )
|
||||
{
|
||||
if( !m_Transforms[i]->WriteCache( aFile, this ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream while writing child transforms",
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
wxT( "%s:%s:%d * [INFO] bad stream while writing child transforms" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
@@ -434,7 +441,8 @@ bool SCENEGRAPH::WriteCache( std::ostream& aFile, SGNODE* parentNode )
|
||||
{
|
||||
if( !m_Shape[i]->WriteCache( aFile, this ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream while writing child shapes",
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
wxT( "%s:%s:%d * [INFO] bad stream while writing child shapes" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
@@ -467,8 +475,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
// we need to read the tag and verify its type
|
||||
if( S3D::SGTYPE_TRANSFORM != S3D::ReadTag( aFile, name ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; tag mismatch at position %ul",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; tag mismatch at position "
|
||||
"%ul" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<unsigned long>( aFile.tellg() ) );
|
||||
|
||||
@@ -504,8 +512,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
{
|
||||
if( S3D::SGTYPE_TRANSFORM != S3D::ReadTag( aFile, name ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; bad child transform tag at position %ul",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child transform tag "
|
||||
"at position %ul" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<unsigned long>( aFile.tellg() ) );
|
||||
|
||||
@@ -517,8 +525,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( !sp->ReadCache( aFile, this ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data while reading transform %ul",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data while reading transform "
|
||||
"%ul" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<unsigned long>( aFile.tellg() ) );
|
||||
|
||||
@@ -531,8 +539,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
{
|
||||
if( S3D::SGTYPE_TRANSFORM != S3D::ReadTag( aFile, name ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; bad ref transform tag at position %ul",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref transform tag at "
|
||||
"position %ul" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<unsigned long>( aFile.tellg() ) );
|
||||
|
||||
@@ -543,8 +551,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( !sp )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data: cannot find ref transform at position %ul",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: cannot find ref "
|
||||
"transform at position %ul" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<unsigned long>( aFile.tellg() ) );
|
||||
|
||||
@@ -553,8 +561,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( S3D::SGTYPE_TRANSFORM != sp->GetNodeType() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data: type is not TRANSFORM at position %ul",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: type is not TRANSFORM "
|
||||
"at position %ul" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<unsigned long>( aFile.tellg() ) );
|
||||
|
||||
@@ -569,8 +577,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
{
|
||||
if( S3D::SGTYPE_SHAPE != S3D::ReadTag( aFile, name ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; bad child shape tag at position %ul",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child shape tag at "
|
||||
"position %ul" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<unsigned long>( aFile.tellg() ) );
|
||||
|
||||
@@ -582,9 +590,9 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( !sp->ReadCache( aFile, this ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; corrupt data while reading shape at "
|
||||
"position %ul", __FILE__, __FUNCTION__, __LINE__,
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; corrupt data while "
|
||||
"reading shape at position %ul" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<unsigned long>( aFile.tellg() ) );
|
||||
|
||||
return false;
|
||||
@@ -596,8 +604,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
{
|
||||
if( S3D::SGTYPE_SHAPE != S3D::ReadTag( aFile, name ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; bad ref shape tag at position %ul",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref shape tag at "
|
||||
"position %ul" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<unsigned long>( aFile.tellg() ) );
|
||||
|
||||
@@ -608,8 +616,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( !sp )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data: cannot find ref shape at position %ul",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: cannot find ref shape "
|
||||
"at position %ul" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<unsigned long>( aFile.tellg() ) );
|
||||
|
||||
@@ -618,8 +626,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( S3D::SGTYPE_SHAPE != sp->GetNodeType() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data: type is not SGSHAPE at position %ul",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: type is not SGSHAPE at "
|
||||
"position %ul" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<unsigned long>( aFile.tellg() ) );
|
||||
|
||||
|
||||
@@ -45,7 +45,8 @@ SGAPPEARANCE::SGAPPEARANCE( SGNODE* aParent ) : SGNODE( aParent )
|
||||
{
|
||||
m_Parent = nullptr;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SGAPPEARANCE (type %s )",
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
wxT( "%s:%s:%d * [BUG] inappropriate parent to SGAPPEARANCE (type %s )" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() );
|
||||
}
|
||||
else if( nullptr != aParent && S3D::SGTYPE_SHAPE == aParent->GetNodeType() )
|
||||
@@ -98,7 +99,7 @@ bool SGAPPEARANCE::SetEmissive( float aRVal, float aGVal, float aBVal )
|
||||
|
||||
bool SGAPPEARANCE::SetEmissive( const SGCOLOR* aRGBColor )
|
||||
{
|
||||
wxCHECK_MSG( aRGBColor, false, "NULL pointer passed for aRGBColor" );
|
||||
wxCHECK_MSG( aRGBColor, false, wxT( "NULL pointer passed for aRGBColor" ) );
|
||||
|
||||
return emissive.SetColor( aRGBColor );
|
||||
}
|
||||
@@ -118,7 +119,7 @@ bool SGAPPEARANCE::SetDiffuse( float aRVal, float aGVal, float aBVal )
|
||||
|
||||
bool SGAPPEARANCE::SetDiffuse( const SGCOLOR* aRGBColor )
|
||||
{
|
||||
wxCHECK_MSG( aRGBColor, false, "NULL pointer passed for aRGBColor" );
|
||||
wxCHECK_MSG( aRGBColor, false, wxT( "NULL pointer passed for aRGBColor" ) );
|
||||
|
||||
return diffuse.SetColor( aRGBColor );
|
||||
}
|
||||
@@ -138,7 +139,7 @@ bool SGAPPEARANCE::SetSpecular( float aRVal, float aGVal, float aBVal )
|
||||
|
||||
bool SGAPPEARANCE::SetSpecular( const SGCOLOR* aRGBColor )
|
||||
{
|
||||
wxCHECK_MSG( aRGBColor, false, "NULL pointer passed for aRGBColor" );
|
||||
wxCHECK_MSG( aRGBColor, false, wxT( "NULL pointer passed for aRGBColor" ) );
|
||||
|
||||
return specular.SetColor( aRGBColor );
|
||||
}
|
||||
@@ -157,7 +158,7 @@ bool SGAPPEARANCE::SetAmbient( float aRVal, float aGVal, float aBVal )
|
||||
|
||||
bool SGAPPEARANCE::SetAmbient( const SGCOLOR* aRGBColor )
|
||||
{
|
||||
wxCHECK_MSG( aRGBColor, false, "NULL pointer passed for aRGBColor" );
|
||||
wxCHECK_MSG( aRGBColor, false, wxT( "NULL pointer passed for aRGBColor" ) );
|
||||
|
||||
return ambient.SetColor( aRGBColor );
|
||||
}
|
||||
@@ -184,20 +185,20 @@ SGNODE* SGAPPEARANCE::FindNode( const char* aNodeName, const SGNODE* aCaller) no
|
||||
void SGAPPEARANCE::unlinkChildNode( const SGNODE* aCaller ) noexcept
|
||||
{
|
||||
wxCHECK_MSG( aCaller, /* void */,
|
||||
"unexpected code branch; node should have no children or refs" );
|
||||
wxT( "unexpected code branch; node should have no children or refs" ) );
|
||||
}
|
||||
|
||||
|
||||
void SGAPPEARANCE::unlinkRefNode( const SGNODE* aCaller ) noexcept
|
||||
{
|
||||
wxCHECK_MSG( aCaller, /* void */,
|
||||
"unexpected code branch; node should have no children or refs" );
|
||||
wxT( "unexpected code branch; node should have no children or refs" ) );
|
||||
}
|
||||
|
||||
|
||||
bool SGAPPEARANCE::AddRefNode( SGNODE* aNode ) noexcept
|
||||
{
|
||||
wxCHECK_MSG( aNode, false, "this node does not accept children or refs" );
|
||||
wxCHECK_MSG( aNode, false, wxT( "this node does not accept children or refs" ) );
|
||||
|
||||
// This is redundant but it keeps gcc from generating a warning on debug builds.
|
||||
return false;
|
||||
@@ -206,7 +207,7 @@ bool SGAPPEARANCE::AddRefNode( SGNODE* aNode ) noexcept
|
||||
|
||||
bool SGAPPEARANCE::AddChildNode( SGNODE* aNode ) noexcept
|
||||
{
|
||||
wxCHECK_MSG( aNode, false, "this node does not accept children or refs" );
|
||||
wxCHECK_MSG( aNode, false, wxT( "this node does not accept children or refs" ) );
|
||||
|
||||
// This is redundant but it keeps gcc from generating a warning on debug builds.
|
||||
return false;
|
||||
@@ -304,7 +305,7 @@ bool SGAPPEARANCE::WriteCache( std::ostream& aFile, SGNODE* parentNode )
|
||||
{
|
||||
if( nullptr == parentNode )
|
||||
{
|
||||
wxCHECK_MSG( m_Parent, false, "corrupt data; m_aParent is NULL" );
|
||||
wxCHECK_MSG( m_Parent, false, wxT( "corrupt data; m_aParent is NULL" ) );
|
||||
|
||||
SGNODE* np = m_Parent;
|
||||
|
||||
@@ -320,11 +321,12 @@ bool SGAPPEARANCE::WriteCache( std::ostream& aFile, SGNODE* parentNode )
|
||||
return false;
|
||||
}
|
||||
|
||||
wxCHECK_MSG( parentNode == m_Parent, false, "corrupt data; parentNode != m_aParent" );
|
||||
wxCHECK_MSG( parentNode == m_Parent, false, wxT( "corrupt data; parentNode != m_aParent" ) );
|
||||
|
||||
if( !aFile.good() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream", __FILE__, __FUNCTION__, __LINE__ );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad stream" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ SGCOLOR::SGCOLOR( float aRVal, float aGVal, float aBVal )
|
||||
{
|
||||
if( !checkRange( aRVal, aGVal, aBVal ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid value passed to constructor",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid value passed to constructor" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
red = 0.0;
|
||||
green = 0.0;
|
||||
@@ -74,7 +74,7 @@ void SGCOLOR::GetColor( SGCOLOR& aColor ) const noexcept
|
||||
|
||||
void SGCOLOR::GetColor( SGCOLOR* aColor ) const noexcept
|
||||
{
|
||||
wxCHECK_MSG( aColor, /* void */, "NULL pointer passed for aRGBColor" );
|
||||
wxCHECK_MSG( aColor, /* void */, wxT( "NULL pointer passed for aRGBColor" ) );
|
||||
|
||||
aColor->red = red;
|
||||
aColor->green = green;
|
||||
@@ -106,7 +106,7 @@ bool SGCOLOR::SetColor( const SGCOLOR& aColor ) noexcept
|
||||
|
||||
bool SGCOLOR::SetColor( const SGCOLOR* aColor ) noexcept
|
||||
{
|
||||
wxCHECK_MSG( aColor, false, "NULL pointer passed for aRGBColor" );
|
||||
wxCHECK_MSG( aColor, false, wxT( "NULL pointer passed for aRGBColor" ) );
|
||||
|
||||
red = aColor->red;
|
||||
green = aColor->green;
|
||||
@@ -121,7 +121,7 @@ bool SGCOLOR::checkRange( float aRedVal, float aGreenVal, float aBlueVal ) const
|
||||
|
||||
if( aRedVal < 0.0 || aRedVal > 1.0 )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid RED value: %g",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid RED value: %g" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, aRedVal );
|
||||
|
||||
ok = false;
|
||||
@@ -129,7 +129,7 @@ bool SGCOLOR::checkRange( float aRedVal, float aGreenVal, float aBlueVal ) const
|
||||
|
||||
if( aGreenVal < 0.0 || aGreenVal > 1.0 )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid GREEN value: %g",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid GREEN value: %g" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, aGreenVal );
|
||||
|
||||
ok = false;
|
||||
@@ -137,7 +137,7 @@ bool SGCOLOR::checkRange( float aRedVal, float aGreenVal, float aBlueVal ) const
|
||||
|
||||
if( aBlueVal < 0.0 || aBlueVal > 1.0 )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid BLUE value: %g",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid BLUE value: %g" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, aBlueVal );
|
||||
|
||||
ok = false;
|
||||
@@ -181,7 +181,7 @@ void SGPOINT::GetPoint( const SGPOINT& aPoint ) noexcept
|
||||
|
||||
void SGPOINT::GetPoint( const SGPOINT* aPoint ) noexcept
|
||||
{
|
||||
wxCHECK_MSG( aPoint, /* void */, "NULL pointer passed for aPoint" );
|
||||
wxCHECK_MSG( aPoint, /* void */, wxT( "NULL pointer passed for aPoint" ) );
|
||||
|
||||
x = aPoint->x;
|
||||
y = aPoint->y;
|
||||
|
||||
@@ -38,7 +38,8 @@ SGCOLORS::SGCOLORS( SGNODE* aParent ) : SGNODE( aParent )
|
||||
{
|
||||
m_Parent = nullptr;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SGCOLORS (type %s)",
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
wxT( "%s:%s:%d * [BUG] inappropriate parent to SGCOLORS (type %s)" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() );
|
||||
}
|
||||
else if( nullptr != aParent && S3D::SGTYPE_FACESET == aParent->GetNodeType() )
|
||||
@@ -259,7 +260,8 @@ bool SGCOLORS::WriteCache( std::ostream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( !aFile.good() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream", __FILE__, __FUNCTION__, __LINE__ );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad stream" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,8 @@ SGCOORDS::SGCOORDS( SGNODE* aParent ) : SGNODE( aParent )
|
||||
{
|
||||
m_Parent = nullptr;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SGCOORDS (type %s)",
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
wxT( "%s:%s:%d * [BUG] inappropriate parent to SGCOORDS (type %s)" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() );
|
||||
}
|
||||
else if( nullptr != aParent && S3D::SGTYPE_FACESET == aParent->GetNodeType() )
|
||||
@@ -261,7 +262,8 @@ bool SGCOORDS::WriteCache( std::ostream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( !aFile.good() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream", __FILE__, __FUNCTION__, __LINE__ );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad stream" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -52,8 +52,10 @@ SGFACESET::SGFACESET( SGNODE* aParent ) : SGNODE( aParent )
|
||||
{
|
||||
m_Parent = nullptr;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SGFACESET (type %s)",
|
||||
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() );
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
wxT( "%s:%s:%d * [BUG] inappropriate parent to SGFACESET (type %s)" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
aParent->GetNodeType() );
|
||||
}
|
||||
else if( nullptr != aParent && S3D::SGTYPE_SHAPE == aParent->GetNodeType() )
|
||||
{
|
||||
@@ -252,7 +254,7 @@ void SGFACESET::unlinkNode( const SGNODE* aNode, bool isChild )
|
||||
}
|
||||
}
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] unlinkNode() did not find its target",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] unlinkNode() did not find its target" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
}
|
||||
|
||||
@@ -283,7 +285,7 @@ bool SGFACESET::addNode( SGNODE* aNode, bool isChild )
|
||||
{
|
||||
if( aNode != m_Colors && aNode != m_RColors )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] assigning multiple Colors nodes",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] assigning multiple Colors nodes" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
@@ -312,7 +314,7 @@ bool SGFACESET::addNode( SGNODE* aNode, bool isChild )
|
||||
{
|
||||
if( aNode != m_Coords && aNode != m_RCoords )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] assigning multiple Colors nodes",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] assigning multiple Colors nodes" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
@@ -341,7 +343,7 @@ bool SGFACESET::addNode( SGNODE* aNode, bool isChild )
|
||||
{
|
||||
if( aNode != m_Normals && aNode != m_RNormals )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] assigning multiple Normals nodes",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] assigning multiple Normals nodes" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
@@ -370,7 +372,8 @@ bool SGFACESET::addNode( SGNODE* aNode, bool isChild )
|
||||
{
|
||||
if( aNode != m_CoordIndices )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] assigning multiple CoordIndex nodes",
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
wxT( "%s:%s:%d * [BUG] assigning multiple CoordIndex nodes" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
@@ -385,8 +388,10 @@ bool SGFACESET::addNode( SGNODE* aNode, bool isChild )
|
||||
return true;
|
||||
}
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] object type '%s' is not a valid type for "
|
||||
"this object '%d'", __FILE__, __FUNCTION__, __LINE__, aNode->GetName(),
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] object type '%s' is not a valid type for "
|
||||
"this object '%d'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
aNode->GetName(),
|
||||
aNode->GetNodeType() );
|
||||
|
||||
return false;
|
||||
@@ -509,7 +514,8 @@ bool SGFACESET::WriteCache( std::ostream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( !aFile.good() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream", __FILE__, __FUNCTION__, __LINE__ );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad stream" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -597,7 +603,7 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
if( m_Coords || m_RCoords || m_CoordIndices || m_Colors || m_RColors || m_Normals
|
||||
|| m_RNormals )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] non-empty node",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] non-empty node" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
@@ -611,9 +617,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( ( items[0] && items[1] ) || ( items[3] && items[4] ) || ( items[5] && items[6] ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; multiple item definitions at position %d",
|
||||
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; multiple item definitions "
|
||||
"at position %d" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<int>( aFile.tellg() ) );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -624,9 +631,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
{
|
||||
if( S3D::SGTYPE_COORDS != S3D::ReadTag( aFile, name ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; bad child coords tag at position %d",
|
||||
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child coords tag at "
|
||||
"position %d" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<int>( aFile.tellg() ) );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -636,9 +644,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( !m_Coords->ReadCache( aFile, this ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; corrupt data while reading coords '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, name );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; corrupt data while "
|
||||
"reading coords '%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
name );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -648,9 +657,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
{
|
||||
if( S3D::SGTYPE_COORDS != S3D::ReadTag( aFile, name ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; bad ref coords tag at position %d",
|
||||
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref coords tag at "
|
||||
"position %d" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<int>( aFile.tellg() ) );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -659,18 +669,20 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( !np )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; cannot find ref coords '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, name );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; cannot find ref "
|
||||
"coords '%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
name );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if( S3D::SGTYPE_COORDS != np->GetNodeType() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; type is not SGCOORDS '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, name );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; type is not SGCOORDS "
|
||||
"'%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
name );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -683,9 +695,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
{
|
||||
if( S3D::SGTYPE_COORDINDEX != S3D::ReadTag( aFile, name ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; bad coord index tag at position %d",
|
||||
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad coord index tag at "
|
||||
"position %d" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<int>( aFile.tellg() ) );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -695,9 +708,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( !m_CoordIndices->ReadCache( aFile, this ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data while reading coord index '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, name );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data while reading coord "
|
||||
"index '%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
name );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -707,9 +721,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
{
|
||||
if( S3D::SGTYPE_NORMALS != S3D::ReadTag( aFile, name ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; bad child normals tag at position %d",
|
||||
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child normals tag "
|
||||
"at position %d" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<int>( aFile.tellg() ) );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -719,9 +734,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( !m_Normals->ReadCache( aFile, this ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data while reading normals '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, name );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data while reading normals "
|
||||
"'%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
name );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -731,9 +747,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
{
|
||||
if( S3D::SGTYPE_NORMALS != S3D::ReadTag( aFile, name ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; bad ref normals tag at position %d",
|
||||
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref normals tag at "
|
||||
"position %d" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<int>( aFile.tellg() ) );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -742,18 +759,19 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( !np )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt: cannot find ref normals '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, name );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt: cannot find ref normals "
|
||||
"'%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
name );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if( S3D::SGTYPE_NORMALS != np->GetNodeType() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt: type is not SGNORMALS '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, name );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt: type is not SGNORMALS '%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
name );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -766,9 +784,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
{
|
||||
if( S3D::SGTYPE_COLORS != S3D::ReadTag( aFile, name ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; bad child colors tag at position %d",
|
||||
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child colors tag "
|
||||
"at position %d" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<int>( aFile.tellg() ) );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -778,9 +797,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( !m_Colors->ReadCache( aFile, this ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data while reading colors '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, name );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data while reading colors "
|
||||
"'%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
name );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -790,9 +810,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
{
|
||||
if( S3D::SGTYPE_COLORS != S3D::ReadTag( aFile, name ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; bad ref colors tag at position %d",
|
||||
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref colors tag at "
|
||||
"position %d" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<int>( aFile.tellg() ) );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -801,18 +822,20 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( !np )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data: cannot find ref colors '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, name );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: cannot find ref colors "
|
||||
"'%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
name );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if( S3D::SGTYPE_COLORS != np->GetNodeType() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data: type is not SGCOLORS '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, name );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: type is not SGCOLORS "
|
||||
"'%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
name );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -839,8 +862,8 @@ bool SGFACESET::validate( void )
|
||||
|| ( nullptr == m_Normals && nullptr == m_RNormals )
|
||||
|| ( nullptr == m_CoordIndices ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] bad model; no vertices, vertex indices, or normals",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; no vertices, vertex indices, "
|
||||
"or normals" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
validated = true;
|
||||
@@ -860,7 +883,7 @@ bool SGFACESET::validate( void )
|
||||
|
||||
if( nCoords < 3 )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad model; fewer than 3 vertices",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; fewer than 3 vertices" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
validated = true;
|
||||
@@ -875,8 +898,8 @@ bool SGFACESET::validate( void )
|
||||
|
||||
if( nCIdx < 3 || ( nCIdx % 3 > 0 ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] bad model; no vertex indices or not multiple of 3",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; no vertex indices or not "
|
||||
"multiple of 3" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
validated = true;
|
||||
@@ -889,7 +912,8 @@ bool SGFACESET::validate( void )
|
||||
{
|
||||
if( lCIdx[i] < 0 || lCIdx[i] >= (int)nCoords )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad model; vertex index out of bounds",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; vertex index out of "
|
||||
"bounds" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
validated = true;
|
||||
@@ -910,10 +934,11 @@ bool SGFACESET::validate( void )
|
||||
|
||||
if( nNorms != nCoords )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] bad model; number of normals (%ul) does not match "
|
||||
"number of vertices (%ul)", __FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<unsigned long>( nNorms ), static_cast<unsigned long>( nCoords ) );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; number of normals (%ul) does "
|
||||
"not match number of vertices (%ul)" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<unsigned long>( nNorms ),
|
||||
static_cast<unsigned long>( nCoords ) );
|
||||
|
||||
validated = true;
|
||||
valid = false;
|
||||
|
||||
@@ -199,9 +199,10 @@ S3D::SGTYPES S3D::ReadTag( std::istream& aFile, std::string& aName )
|
||||
|
||||
if( '[' != schar )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; missing left bracket at position %d",
|
||||
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; missing left bracket at "
|
||||
"position %d" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<int>( aFile.tellg() ) );
|
||||
|
||||
return S3D::SGTYPE_END;
|
||||
}
|
||||
@@ -217,8 +218,8 @@ S3D::SGTYPES S3D::ReadTag( std::istream& aFile, std::string& aName )
|
||||
|
||||
if( schar != ']' )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; could not find right bracket",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; could not find right "
|
||||
"bracket" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return S3D::SGTYPE_END;
|
||||
@@ -229,9 +230,9 @@ S3D::SGTYPES S3D::ReadTag( std::istream& aFile, std::string& aName )
|
||||
|
||||
if( std::string::npos == upos )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; no underscore in name '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, name );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; no underscore in name '%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
name );
|
||||
|
||||
return S3D::SGTYPE_END;
|
||||
}
|
||||
@@ -255,9 +256,9 @@ S3D::SGTYPES S3D::ReadTag( std::istream& aFile, std::string& aName )
|
||||
return types[i];
|
||||
}
|
||||
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; no node type matching '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, name );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; no node type matching '%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
name );
|
||||
|
||||
return S3D::SGTYPE_END;
|
||||
}
|
||||
@@ -356,8 +357,8 @@ bool S3D::CalcTriangleNormals( std::vector< SGPOINT > coords, std::vector< int >
|
||||
|
||||
if( vsize < 3 )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] invalid vertex set (fewer than 3 vertices)",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] invalid vertex set (fewer than 3 "
|
||||
"vertices)" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
@@ -367,7 +368,7 @@ bool S3D::CalcTriangleNormals( std::vector< SGPOINT > coords, std::vector< int >
|
||||
|
||||
if( 0 != isize % 3 || index.empty() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] invalid index set (not multiple of 3)",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] invalid index set (not multiple of 3)" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
@@ -375,7 +376,7 @@ bool S3D::CalcTriangleNormals( std::vector< SGPOINT > coords, std::vector< int >
|
||||
|
||||
if( !norms.empty() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] normals set is not empty",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] normals set is not empty" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
@@ -398,7 +399,7 @@ bool S3D::CalcTriangleNormals( std::vector< SGPOINT > coords, std::vector< int >
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
ostr << " * [INFO] invalid index set; index out of bounds";
|
||||
wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
#endif
|
||||
|
||||
return false;
|
||||
@@ -481,8 +482,8 @@ bool S3D::CalcTriangleNormals( std::vector< SGPOINT > coords, std::vector< int >
|
||||
|
||||
if( norms.size() != coords.size() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [BUG] number of normals does not equal number of vertices",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] number of normals does not equal number "
|
||||
"of vertices" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
|
||||
@@ -35,8 +35,10 @@ SGINDEX::SGINDEX( SGNODE* aParent ) : SGNODE( aParent )
|
||||
{
|
||||
m_Parent = nullptr;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SGINDEX (type '%d')",
|
||||
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] inappropriate parent to SGINDEX (type "
|
||||
"'%d')" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
aParent->GetNodeType() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,8 +184,8 @@ bool SGINDEX::writeCoordIndex( std::ostream& aFile )
|
||||
{
|
||||
size_t n = index.size();
|
||||
|
||||
wxCHECK_MSG( n % 3 == 0, false,
|
||||
"Coordinate index is not divisible by three (violates triangle constraint)" );
|
||||
wxCHECK_MSG( n % 3 == 0, false, wxT( "Coordinate index is not divisible by three (violates "
|
||||
"triangle constraint)" ) );
|
||||
|
||||
aFile << " coordIndex [\n ";
|
||||
|
||||
@@ -281,7 +283,7 @@ bool SGINDEX::WriteCache( std::ostream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( !aFile.good() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad stream" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
|
||||
@@ -196,9 +196,11 @@ void SGNODE::delNodeRef( const SGNODE* aNode )
|
||||
return;
|
||||
}
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] delNodeRef() did not find its target, "
|
||||
"this node type %d, referenced node type %d", __FILE__, __FUNCTION__, __LINE__,
|
||||
m_SGtype, aNode->GetNodeType() );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] delNodeRef() did not find its target, this "
|
||||
"node type %d, referenced node type %d" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
m_SGtype,
|
||||
aNode->GetNodeType() );
|
||||
}
|
||||
|
||||
|
||||
@@ -212,8 +214,8 @@ void SGNODE::AssociateWrapper( SGNODE** aWrapperRef ) noexcept
|
||||
{
|
||||
*m_Association = nullptr;
|
||||
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [WARNING] association being broken with previous wrapper",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [WARNING] association being broken with "
|
||||
"previous wrapper" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
}
|
||||
|
||||
|
||||
@@ -38,8 +38,10 @@ SGNORMALS::SGNORMALS( SGNODE* aParent ) : SGNODE( aParent )
|
||||
{
|
||||
m_Parent = nullptr;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SGNORMALS (type %d)",
|
||||
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] inappropriate parent to SGNORMALS "
|
||||
"(type %d)" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
aParent->GetNodeType() );
|
||||
}
|
||||
else if( nullptr != aParent && S3D::SGTYPE_FACESET == aParent->GetNodeType() )
|
||||
{
|
||||
@@ -253,7 +255,7 @@ bool SGNORMALS::WriteCache( std::ostream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( !aFile.good() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad stream" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
|
||||
@@ -49,7 +49,7 @@ SGSHAPE::SGSHAPE( SGNODE* aParent ) : SGNODE( aParent )
|
||||
{
|
||||
m_Parent = nullptr;
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SGSHAPE (type %d)",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] inappropriate parent to SGSHAPE (type %d)" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() );
|
||||
}
|
||||
else if( nullptr != aParent && S3D::SGTYPE_TRANSFORM == aParent->GetNodeType() )
|
||||
@@ -195,7 +195,7 @@ void SGSHAPE::unlinkNode( const SGNODE* aNode, bool isChild )
|
||||
}
|
||||
}
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] unlinkNode() did not find its target",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] unlinkNode() did not find its target" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
}
|
||||
|
||||
@@ -222,7 +222,8 @@ bool SGSHAPE::addNode( SGNODE* aNode, bool isChild )
|
||||
{
|
||||
if( aNode != m_Appearance && aNode != m_RAppearance )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] assigning multiple Appearance nodes",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] assigning multiple Appearance "
|
||||
"nodes" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
@@ -251,7 +252,7 @@ bool SGSHAPE::addNode( SGNODE* aNode, bool isChild )
|
||||
{
|
||||
if( aNode != m_FaceSet && aNode != m_RFaceSet )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] assigning multiple FaceSet nodes",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] assigning multiple FaceSet nodes" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
@@ -274,7 +275,8 @@ bool SGSHAPE::addNode( SGNODE* aNode, bool isChild )
|
||||
return true;
|
||||
}
|
||||
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] object %s is not a valid type for this object (%d)",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] object %s is not a valid type for this "
|
||||
"object (%d)" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, aNode->GetName(), aNode->GetNodeType() );
|
||||
|
||||
return false;
|
||||
@@ -378,7 +380,8 @@ bool SGSHAPE::WriteCache( std::ostream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( !aFile.good() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] bad stream", __FILE__, __FUNCTION__, __LINE__ );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] bad stream" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -454,9 +457,10 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( ( items[0] && items[1] ) || ( items[2] && items[3] ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; multiple item definitions at position %ul",
|
||||
__FILE__, __FUNCTION__, __LINE__, static_cast<unsigned long>( aFile.tellg() ) );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; multiple item definitions "
|
||||
"at position %ul" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<unsigned long>( aFile.tellg() ) );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -467,8 +471,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
{
|
||||
if( S3D::SGTYPE_APPEARANCE != S3D::ReadTag( aFile, name ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; bad child appearance tag at position %ul",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child appearance "
|
||||
"tag at position %ul" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<unsigned long>( aFile.tellg() ) );
|
||||
|
||||
@@ -480,7 +484,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( !m_Appearance->ReadCache( aFile, this ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] corrupt data while reading appearance '%s'",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data while reading appearance "
|
||||
"'%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, name );
|
||||
|
||||
return false;
|
||||
@@ -491,8 +496,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
{
|
||||
if( S3D::SGTYPE_APPEARANCE != S3D::ReadTag( aFile, name ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; bad ref appearance tag at position %ul",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref appearance tag "
|
||||
"at position %ul" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<unsigned long>( aFile.tellg() ) );
|
||||
|
||||
@@ -503,18 +508,20 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( !np )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data: cannot find ref appearance '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, name );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: cannot find ref "
|
||||
"appearance '%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
name );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if( S3D::SGTYPE_APPEARANCE != np->GetNodeType() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data: type is not SGAPPEARANCE '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, name );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: type is not "
|
||||
"SGAPPEARANCE '%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
name );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -527,8 +534,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
{
|
||||
if( S3D::SGTYPE_FACESET != S3D::ReadTag( aFile, name ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; bad child face set tag at position %ul",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child face set tag "
|
||||
"at position %ul" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<unsigned long>( aFile.tellg() ) );
|
||||
|
||||
@@ -540,8 +547,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( !m_FaceSet->ReadCache( aFile, this ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data while reading face set '%s'",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data while reading face set "
|
||||
"'%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, name );
|
||||
|
||||
return false;
|
||||
@@ -552,8 +559,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
{
|
||||
if( S3D::SGTYPE_FACESET != S3D::ReadTag( aFile, name ) )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data; bad ref face set tag at position %ul",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref face set tag at "
|
||||
"position %ul" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
static_cast<unsigned long>( aFile.tellg() ) );
|
||||
|
||||
@@ -564,18 +571,20 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
|
||||
|
||||
if( !np )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data: cannot find ref face set '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, name );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: cannot find ref face "
|
||||
"set '%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
name );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if( S3D::SGTYPE_FACESET != np->GetNodeType() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] corrupt data: type is not SGFACESET '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, name );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: type is not SGFACESET "
|
||||
"'%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
name );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -612,7 +621,7 @@ bool SGSHAPE::Prepare( const glm::dmat4* aTransform, S3D::MATLIST& materials,
|
||||
|
||||
if( !pf->validate() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad model; inconsistent data",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; inconsistent data" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return true;
|
||||
@@ -665,8 +674,8 @@ bool SGSHAPE::Prepare( const glm::dmat4* aTransform, S3D::MATLIST& materials,
|
||||
|
||||
if( nColors < nCoords )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG,
|
||||
"%s:%s:%d * [INFO] bad model; not enough colors per vertex (%ul vs %ul)",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; not enough colors per "
|
||||
"vertex (%ul vs %ul)" ),
|
||||
__FILE__, __FUNCTION__, __LINE__, static_cast<unsigned long>( nColors ),
|
||||
static_cast<unsigned long>( nCoords ) );
|
||||
|
||||
@@ -697,7 +706,7 @@ bool SGSHAPE::Prepare( const glm::dmat4* aTransform, S3D::MATLIST& materials,
|
||||
|
||||
if( vertices.size() < 3 )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad model; not enough vertices",
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; not enough vertices" ),
|
||||
__FILE__, __FUNCTION__, __LINE__ );
|
||||
|
||||
return true;
|
||||
|
||||
@@ -164,49 +164,49 @@ BOARD_ADAPTER::BOARD_ADAPTER() :
|
||||
list.push_back( CUSTOM_COLOR_ITEM( r/255.0, g/255.0, b/255.0, a, name ) )
|
||||
|
||||
ADD_COLOR( g_SilkscreenColors, 245, 245, 245, 1.0, NotSpecifiedPrm() ); // White
|
||||
ADD_COLOR( g_SilkscreenColors, 20, 51, 36, 1.0, "Green" );
|
||||
ADD_COLOR( g_SilkscreenColors, 181, 19, 21, 1.0, "Red" );
|
||||
ADD_COLOR( g_SilkscreenColors, 2, 59, 162, 1.0, "Blue" );
|
||||
ADD_COLOR( g_SilkscreenColors, 11, 11, 11, 1.0, "Black" );
|
||||
ADD_COLOR( g_SilkscreenColors, 245, 245, 245, 1.0, "White" );
|
||||
ADD_COLOR( g_SilkscreenColors, 32, 2, 53, 1.0, "Purple" );
|
||||
ADD_COLOR( g_SilkscreenColors, 194, 195, 0, 1.0, "Yellow" );
|
||||
ADD_COLOR( g_SilkscreenColors, 20, 51, 36, 1.0, wxT( "Green" ) );
|
||||
ADD_COLOR( g_SilkscreenColors, 181, 19, 21, 1.0, wxT( "Red" ) );
|
||||
ADD_COLOR( g_SilkscreenColors, 2, 59, 162, 1.0, wxT( "Blue" ) );
|
||||
ADD_COLOR( g_SilkscreenColors, 11, 11, 11, 1.0, wxT( "Black" ) );
|
||||
ADD_COLOR( g_SilkscreenColors, 245, 245, 245, 1.0, wxT( "White" ) );
|
||||
ADD_COLOR( g_SilkscreenColors, 32, 2, 53, 1.0, wxT( "Purple" ) );
|
||||
ADD_COLOR( g_SilkscreenColors, 194, 195, 0, 1.0, wxT( "Yellow" ) );
|
||||
|
||||
ADD_COLOR( g_MaskColors, 20, 51, 36, 0.83, NotSpecifiedPrm() ); // Green
|
||||
ADD_COLOR( g_MaskColors, 20, 51, 36, 0.83, "Green" );
|
||||
ADD_COLOR( g_MaskColors, 91, 168, 12, 0.83, "Light Green" );
|
||||
ADD_COLOR( g_MaskColors, 13, 104, 11, 0.83, "Saturated Green" );
|
||||
ADD_COLOR( g_MaskColors, 181, 19, 21, 0.83, "Red" );
|
||||
ADD_COLOR( g_MaskColors, 210, 40, 14, 0.83, "Light Red" );
|
||||
ADD_COLOR( g_MaskColors, 239, 53, 41, 0.83, "Red/Orange" );
|
||||
ADD_COLOR( g_MaskColors, 2, 59, 162, 0.83, "Blue" );
|
||||
ADD_COLOR( g_MaskColors, 54, 79, 116, 0.83, "Light Blue 1" );
|
||||
ADD_COLOR( g_MaskColors, 61, 85, 130, 0.83, "Light Blue 2" );
|
||||
ADD_COLOR( g_MaskColors, 21, 70, 80, 0.83, "Green/Blue" );
|
||||
ADD_COLOR( g_MaskColors, 11, 11, 11, 0.83, "Black" );
|
||||
ADD_COLOR( g_MaskColors, 245, 245, 245, 0.83, "White" );
|
||||
ADD_COLOR( g_MaskColors, 32, 2, 53, 0.83, "Purple" );
|
||||
ADD_COLOR( g_MaskColors, 119, 31, 91, 0.83, "Light Purple" );
|
||||
ADD_COLOR( g_MaskColors, 194, 195, 0, 0.83, "Yellow" );
|
||||
ADD_COLOR( g_MaskColors, 20, 51, 36, 0.83, wxT( "Green" ) );
|
||||
ADD_COLOR( g_MaskColors, 91, 168, 12, 0.83, wxT( "Light Green" ) );
|
||||
ADD_COLOR( g_MaskColors, 13, 104, 11, 0.83, wxT( "Saturated Green" ) );
|
||||
ADD_COLOR( g_MaskColors, 181, 19, 21, 0.83, wxT( "Red" ) );
|
||||
ADD_COLOR( g_MaskColors, 210, 40, 14, 0.83, wxT( "Light Red" ) );
|
||||
ADD_COLOR( g_MaskColors, 239, 53, 41, 0.83, wxT( "Red/Orange" ) );
|
||||
ADD_COLOR( g_MaskColors, 2, 59, 162, 0.83, wxT( "Blue" ) );
|
||||
ADD_COLOR( g_MaskColors, 54, 79, 116, 0.83, wxT( "Light Blue 1" ) );
|
||||
ADD_COLOR( g_MaskColors, 61, 85, 130, 0.83, wxT( "Light Blue 2" ) );
|
||||
ADD_COLOR( g_MaskColors, 21, 70, 80, 0.83, wxT( "Green/Blue" ) );
|
||||
ADD_COLOR( g_MaskColors, 11, 11, 11, 0.83, wxT( "Black" ) );
|
||||
ADD_COLOR( g_MaskColors, 245, 245, 245, 0.83, wxT( "White" ) );
|
||||
ADD_COLOR( g_MaskColors, 32, 2, 53, 0.83, wxT( "Purple" ) );
|
||||
ADD_COLOR( g_MaskColors, 119, 31, 91, 0.83, wxT( "Light Purple" ) );
|
||||
ADD_COLOR( g_MaskColors, 194, 195, 0, 0.83, wxT( "Yellow" ) );
|
||||
|
||||
ADD_COLOR( g_PasteColors, 128, 128, 128, 1.0, "Grey" );
|
||||
ADD_COLOR( g_PasteColors, 90, 90, 90, 1.0, "Dark Grey" );
|
||||
ADD_COLOR( g_PasteColors, 213, 213, 213, 1.0, "Silver" );
|
||||
ADD_COLOR( g_PasteColors, 128, 128, 128, 1.0, wxT( "Grey" ) );
|
||||
ADD_COLOR( g_PasteColors, 90, 90, 90, 1.0, wxT( "Dark Grey" ) );
|
||||
ADD_COLOR( g_PasteColors, 213, 213, 213, 1.0, wxT( "Silver" ) );
|
||||
|
||||
ADD_COLOR( g_FinishColors, 184, 115, 50, 1.0, "Copper" );
|
||||
ADD_COLOR( g_FinishColors, 178, 156, 0, 1.0, "Gold" );
|
||||
ADD_COLOR( g_FinishColors, 213, 213, 213, 1.0, "Silver" );
|
||||
ADD_COLOR( g_FinishColors, 160, 160, 160, 1.0, "Tin" );
|
||||
ADD_COLOR( g_FinishColors, 184, 115, 50, 1.0, wxT( "Copper" ) );
|
||||
ADD_COLOR( g_FinishColors, 178, 156, 0, 1.0, wxT( "Gold" ) );
|
||||
ADD_COLOR( g_FinishColors, 213, 213, 213, 1.0, wxT( "Silver" ) );
|
||||
ADD_COLOR( g_FinishColors, 160, 160, 160, 1.0, wxT( "Tin" ) );
|
||||
|
||||
ADD_COLOR( g_BoardColors, 51, 43, 22, 0.83, "FR4 natural, dark" );
|
||||
ADD_COLOR( g_BoardColors, 109, 116, 75, 0.83, "FR4 natural" );
|
||||
ADD_COLOR( g_BoardColors, 252, 252, 250, 0.90, "PTFE natural" );
|
||||
ADD_COLOR( g_BoardColors, 205, 130, 0, 0.68, "Polyimide" );
|
||||
ADD_COLOR( g_BoardColors, 92, 17, 6, 0.90, "Phenolic natural" );
|
||||
ADD_COLOR( g_BoardColors, 146, 99, 47, 0.83, "Brown 1" );
|
||||
ADD_COLOR( g_BoardColors, 160, 123, 54, 0.83, "Brown 2" );
|
||||
ADD_COLOR( g_BoardColors, 146, 99, 47, 0.83, "Brown 3" );
|
||||
ADD_COLOR( g_BoardColors, 213, 213, 213, 1.0, "Aluminum" );
|
||||
ADD_COLOR( g_BoardColors, 51, 43, 22, 0.83, wxT( "FR4 natural, dark" ) );
|
||||
ADD_COLOR( g_BoardColors, 109, 116, 75, 0.83, wxT( "FR4 natural" ) );
|
||||
ADD_COLOR( g_BoardColors, 252, 252, 250, 0.90, wxT( "PTFE natural" ) );
|
||||
ADD_COLOR( g_BoardColors, 205, 130, 0, 0.68, wxT( "Polyimide" ) );
|
||||
ADD_COLOR( g_BoardColors, 92, 17, 6, 0.90, wxT( "Phenolic natural" ) );
|
||||
ADD_COLOR( g_BoardColors, 146, 99, 47, 0.83, wxT( "Brown 1" ) );
|
||||
ADD_COLOR( g_BoardColors, 160, 123, 54, 0.83, wxT( "Brown 2" ) );
|
||||
ADD_COLOR( g_BoardColors, 146, 99, 47, 0.83, wxT( "Brown 3" ) );
|
||||
ADD_COLOR( g_BoardColors, 213, 213, 213, 1.0, wxT( "Aluminum" ) );
|
||||
|
||||
g_DefaultBackgroundTop = COLOR4D( 0.80, 0.80, 0.90, 1.0 );
|
||||
g_DefaultBackgroundBot = COLOR4D( 0.40, 0.40, 0.50, 1.0 );
|
||||
@@ -559,7 +559,7 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
|
||||
auto findColor =
|
||||
[]( const wxString& aColorName, const CUSTOM_COLORS_LIST& aColorSet )
|
||||
{
|
||||
if( aColorName.StartsWith( "#" ) )
|
||||
if( aColorName.StartsWith( wxT( "#" ) ) )
|
||||
{
|
||||
return KIGFX::COLOR4D( aColorName );
|
||||
}
|
||||
@@ -608,28 +608,28 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
|
||||
KIGFX::COLOR4D layerColor = COLOR4D::UNSPECIFIED;
|
||||
const wxString& materialName = stackupItem->GetMaterial();
|
||||
|
||||
if( materialName.StartsWith( "FR4" ) )
|
||||
if( materialName.StartsWith( wxT( "FR4" ) ) )
|
||||
{
|
||||
layerColor = findColor( "FR4 natural", g_BoardColors );
|
||||
layerColor = findColor( wxT( "FR4 natural" ), g_BoardColors );
|
||||
}
|
||||
else if( materialName.IsSameAs( "PTFE" )
|
||||
|| materialName.IsSameAs( "Teflon" ) )
|
||||
else if( materialName.IsSameAs( wxT( "PTFE" ) )
|
||||
|| materialName.IsSameAs( wxT( "Teflon" ) ) )
|
||||
{
|
||||
layerColor = findColor( "PTFE natural", g_BoardColors );
|
||||
layerColor = findColor( wxT( "PTFE natural" ), g_BoardColors );
|
||||
}
|
||||
else if( materialName.IsSameAs( "Polyimide" )
|
||||
|| materialName.IsSameAs( "Kapton" ) )
|
||||
else if( materialName.IsSameAs( wxT( "Polyimide" ) )
|
||||
|| materialName.IsSameAs( wxT( "Kapton" ) ) )
|
||||
{
|
||||
layerColor = findColor( "Polyimide", g_BoardColors );
|
||||
layerColor = findColor( wxT( "Polyimide" ), g_BoardColors );
|
||||
}
|
||||
else if( materialName.IsSameAs( "Al" ) )
|
||||
else if( materialName.IsSameAs( wxT( "Al" ) ) )
|
||||
{
|
||||
layerColor = findColor( "Aluminum", g_BoardColors );
|
||||
layerColor = findColor( wxT( "Aluminum" ), g_BoardColors );
|
||||
}
|
||||
else // A default color value for unknown dielectric material
|
||||
// (i.e. an exotic name entered by hand)
|
||||
{
|
||||
layerColor = findColor( "FR4 natural", g_BoardColors );
|
||||
layerColor = findColor( wxT( "FR4 natural" ), g_BoardColors );
|
||||
}
|
||||
|
||||
if( bodyColor == COLOR4D( 0, 0, 0, 0 ) )
|
||||
@@ -653,25 +653,25 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
|
||||
|
||||
const wxString& finishName = stackup.m_FinishType;
|
||||
|
||||
if( finishName.EndsWith( "OSP" ) )
|
||||
if( finishName.EndsWith( wxT( "OSP" ) ) )
|
||||
{
|
||||
m_CopperColor = to_SFVEC4F( findColor( "Copper", g_FinishColors ) );
|
||||
m_CopperColor = to_SFVEC4F( findColor( wxT( "Copper" ), g_FinishColors ) );
|
||||
}
|
||||
else if( finishName.EndsWith( "IG" )
|
||||
|| finishName.EndsWith( "gold" ) )
|
||||
else if( finishName.EndsWith( wxT( "IG" ) )
|
||||
|| finishName.EndsWith( wxT( "gold" ) ) )
|
||||
{
|
||||
m_CopperColor = to_SFVEC4F( findColor( "Gold", g_FinishColors ) );
|
||||
m_CopperColor = to_SFVEC4F( findColor( wxT( "Gold" ), g_FinishColors ) );
|
||||
}
|
||||
else if( finishName.StartsWith( "HAL" )
|
||||
|| finishName.StartsWith( "HASL" )
|
||||
|| finishName.EndsWith( "tin" )
|
||||
|| finishName.EndsWith( "nickel" ) )
|
||||
else if( finishName.StartsWith( wxT( "HAL" ) )
|
||||
|| finishName.StartsWith( wxT( "HASL" ) )
|
||||
|| finishName.EndsWith( wxT( "tin" ) )
|
||||
|| finishName.EndsWith( wxT( "nickel" ) ) )
|
||||
{
|
||||
m_CopperColor = to_SFVEC4F( findColor( "Tin", g_FinishColors ) );
|
||||
m_CopperColor = to_SFVEC4F( findColor( wxT( "Tin" ), g_FinishColors ) );
|
||||
}
|
||||
else if( finishName.EndsWith( "silver" ) )
|
||||
else if( finishName.EndsWith( wxT( "silver" ) ) )
|
||||
{
|
||||
m_CopperColor = to_SFVEC4F( findColor( "Silver", g_FinishColors ) );
|
||||
m_CopperColor = to_SFVEC4F( findColor( wxT( "Silver" ), g_FinishColors ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -347,7 +347,7 @@ void BOARD_ADAPTER::createPadWithClearance( const PAD* aPad, CONTAINER_2D_BASE*
|
||||
-seg->GetSeg().A.y * m_biuTo3Dunits );
|
||||
const SFVEC2F end3DU ( seg->GetSeg().B.x * m_biuTo3Dunits,
|
||||
-seg->GetSeg().B.y * m_biuTo3Dunits );
|
||||
const int width = seg->GetWidth() + clearance.x * 2;
|
||||
const double width = seg->GetWidth() + clearance.x * 2;
|
||||
|
||||
// Cannot add segments that have the same start and end point
|
||||
if( Is_segment_a_circle( start3DU, end3DU ) )
|
||||
@@ -368,7 +368,7 @@ void BOARD_ADAPTER::createPadWithClearance( const PAD* aPad, CONTAINER_2D_BASE*
|
||||
case SH_CIRCLE:
|
||||
{
|
||||
const SHAPE_CIRCLE* circle = (SHAPE_CIRCLE*) shape;
|
||||
const int radius = circle->GetRadius() + clearance.x;
|
||||
const double radius = circle->GetRadius() + clearance.x;
|
||||
const SFVEC2F center( circle->GetCenter().x * m_biuTo3Dunits,
|
||||
-circle->GetCenter().y * m_biuTo3Dunits );
|
||||
|
||||
@@ -409,7 +409,7 @@ void BOARD_ADAPTER::createPadWithClearance( const PAD* aPad, CONTAINER_2D_BASE*
|
||||
-seg.GetSeg().A.y * m_biuTo3Dunits );
|
||||
const SFVEC2F end3DU( seg.GetSeg().B.x * m_biuTo3Dunits,
|
||||
-seg.GetSeg().B.y * m_biuTo3Dunits );
|
||||
const int width = arc->GetWidth() + clearance.x * 2;
|
||||
const double width = arc->GetWidth() + clearance.x * 2;
|
||||
|
||||
// Cannot add segments that have the same start and end point
|
||||
if( Is_segment_a_circle( start3DU, end3DU ) )
|
||||
@@ -429,7 +429,7 @@ void BOARD_ADAPTER::createPadWithClearance( const PAD* aPad, CONTAINER_2D_BASE*
|
||||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "BOARD_ADAPTER::createPadWithClearance no implementation for "
|
||||
wxFAIL_MSG( wxT( "BOARD_ADAPTER::createPadWithClearance no implementation for " )
|
||||
+ SHAPE_TYPE_asString( shape->Type() ) );
|
||||
break;
|
||||
}
|
||||
@@ -459,7 +459,7 @@ OBJECT_2D* BOARD_ADAPTER::createPadWithDrill( const PAD* aPad, int aInflateValue
|
||||
|
||||
if( drillSize.x == drillSize.y ) // usual round hole
|
||||
{
|
||||
const int radius = ( drillSize.x / 2 ) + aInflateValue;
|
||||
const double radius = ( drillSize.x / 2.0 ) + aInflateValue;
|
||||
|
||||
const SFVEC2F center( aPad->GetPosition().x * m_biuTo3Dunits,
|
||||
-aPad->GetPosition().y * m_biuTo3Dunits );
|
||||
@@ -470,7 +470,7 @@ OBJECT_2D* BOARD_ADAPTER::createPadWithDrill( const PAD* aPad, int aInflateValue
|
||||
else // Oblong hole
|
||||
{
|
||||
const SHAPE_SEGMENT* seg = aPad->GetEffectiveHoleShape();
|
||||
float width = seg->GetWidth() + aInflateValue * 2;
|
||||
double width = seg->GetWidth() + aInflateValue * 2;
|
||||
|
||||
SFVEC2F start3DU( seg->GetSeg().A.x * m_biuTo3Dunits,
|
||||
-seg->GetSeg().A.y * m_biuTo3Dunits );
|
||||
@@ -567,7 +567,7 @@ void BOARD_ADAPTER::transformArcToSegments( const wxPoint& aCentre, const wxPoin
|
||||
const BOARD_ITEM& aBoardItem )
|
||||
{
|
||||
wxPoint arc_start, arc_end;
|
||||
int delta = 3600 / aCircleToSegmentsCount; // rotate angle in 0.1 degree
|
||||
double delta = 3600 / aCircleToSegmentsCount; // rotate angle in 0.1 degree
|
||||
|
||||
arc_end = arc_start = aStart;
|
||||
|
||||
@@ -586,7 +586,7 @@ void BOARD_ADAPTER::transformArcToSegments( const wxPoint& aCentre, const wxPoin
|
||||
wxPoint curr_end = arc_start;
|
||||
wxPoint curr_start = arc_start;
|
||||
|
||||
for( int ii = delta; ii < aArcAngle; ii += delta )
|
||||
for( double ii = delta; ii < aArcAngle; ii += delta )
|
||||
{
|
||||
curr_end = arc_start;
|
||||
RotatePoint( &curr_end, aCentre, -ii );
|
||||
@@ -636,7 +636,7 @@ void BOARD_ADAPTER::addShapeWithClearance( const PCB_SHAPE* aShape,
|
||||
{
|
||||
// The full width of the lines to create
|
||||
// The extra 1 protects the inner/outer radius values from degeneracy
|
||||
const int linewidth = aShape->GetWidth() + ( 2 * aClearanceValue ) + 1;
|
||||
const double linewidth = aShape->GetWidth() + ( 2 * aClearanceValue ) + 1;
|
||||
|
||||
switch( aShape->GetShape() )
|
||||
{
|
||||
@@ -738,7 +738,7 @@ void BOARD_ADAPTER::addShapeWithClearance( const PCB_SHAPE* aShape,
|
||||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "BOARD_ADAPTER::addShapeWithClearance no implementation for "
|
||||
wxFAIL_MSG( wxT( "BOARD_ADAPTER::addShapeWithClearance no implementation for " )
|
||||
+ aShape->SHAPE_T_asString() );
|
||||
break;
|
||||
}
|
||||
@@ -831,9 +831,9 @@ void BOARD_ADAPTER::buildPadOutlineAsSegments( const PAD* aPad, CONTAINER_2D_BAS
|
||||
const SFVEC2F center3DU( aPad->ShapePos().x * m_biuTo3Dunits,
|
||||
-aPad->ShapePos().y * m_biuTo3Dunits );
|
||||
|
||||
const int radius = aPad->GetSize().x / 2;
|
||||
const float inner_radius = ( radius - aWidth / 2 ) * m_biuTo3Dunits;
|
||||
const float outer_radius = ( radius + aWidth / 2 ) * m_biuTo3Dunits;
|
||||
const double radius = aPad->GetSize().x / 2.0;
|
||||
const float inner_radius = ( radius - aWidth / 2.0 ) * m_biuTo3Dunits;
|
||||
const float outer_radius = ( radius + aWidth / 2.0 ) * m_biuTo3Dunits;
|
||||
|
||||
aDstContainer->Add( new RING_2D( center3DU, inner_radius, outer_radius, *aPad ) );
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ EDA_3D_CANVAS::EDA_3D_CANVAS( wxWindow* aParent, const int* aAttribList,
|
||||
m_accelerator3DShapes( nullptr ),
|
||||
m_currentRollOverItem( nullptr )
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::EDA_3D_CANVAS" );
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::EDA_3D_CANVAS" ) );
|
||||
|
||||
m_editing_timeout_timer.SetOwner( this );
|
||||
Connect( m_editing_timeout_timer.GetId(), wxEVT_TIMER,
|
||||
@@ -167,7 +167,7 @@ EDA_3D_CANVAS::EDA_3D_CANVAS( wxWindow* aParent, const int* aAttribList,
|
||||
|
||||
EDA_3D_CANVAS::~EDA_3D_CANVAS()
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::~EDA_3D_CANVAS" );
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::~EDA_3D_CANVAS" ) );
|
||||
|
||||
delete m_accelerator3DShapes;
|
||||
m_accelerator3DShapes = nullptr;
|
||||
@@ -214,7 +214,7 @@ void EDA_3D_CANVAS::OnResize( wxSizeEvent& event )
|
||||
|
||||
bool EDA_3D_CANVAS::initializeOpenGL()
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::initializeOpenGL" );
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::initializeOpenGL" ) );
|
||||
|
||||
const GLenum err = glewInit();
|
||||
|
||||
@@ -228,13 +228,13 @@ bool EDA_3D_CANVAS::initializeOpenGL()
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::initializeOpenGL Using GLEW version %s",
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::initializeOpenGL Using GLEW version %s" ),
|
||||
FROM_UTF8( (char*) glewGetString( GLEW_VERSION ) ) );
|
||||
}
|
||||
|
||||
wxString version = FROM_UTF8( (char *) glGetString( GL_VERSION ) );
|
||||
|
||||
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::%s OpenGL version string %s.",
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::%s OpenGL version string %s." ),
|
||||
__WXFUNCTION__, version );
|
||||
|
||||
// Extract OpenGL version from string. This method is used because prior to OpenGL 2,
|
||||
@@ -250,7 +250,7 @@ bool EDA_3D_CANVAS::initializeOpenGL()
|
||||
|
||||
tmp = tokenizer.GetNextToken();
|
||||
|
||||
tokenizer.SetString( tmp, wxString( "." ) );
|
||||
tokenizer.SetString( tmp, wxString( wxT( "." ) ) );
|
||||
|
||||
if( tokenizer.HasMoreTokens() )
|
||||
tokenizer.GetNextToken().ToLong( &major );
|
||||
@@ -260,7 +260,7 @@ bool EDA_3D_CANVAS::initializeOpenGL()
|
||||
|
||||
if( major < 2 || ( ( major == 2 ) && ( minor < 1 ) ) )
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::%s OpenGL ray tracing not supported.",
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::%s OpenGL ray tracing not supported." ),
|
||||
__WXFUNCTION__ );
|
||||
|
||||
if( GetParent() )
|
||||
@@ -274,7 +274,8 @@ bool EDA_3D_CANVAS::initializeOpenGL()
|
||||
|
||||
if( ( major == 1 ) && ( minor < 5 ) )
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::%s OpenGL not supported.", __WXFUNCTION__ );
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::%s OpenGL not supported." ),
|
||||
__WXFUNCTION__ );
|
||||
|
||||
m_is_opengl_version_supported = false;
|
||||
}
|
||||
@@ -327,10 +328,10 @@ void EDA_3D_CANVAS::DisplayStatus()
|
||||
{
|
||||
wxString msg;
|
||||
|
||||
msg.Printf( "dx %3.2f", m_camera.GetCameraPos().x );
|
||||
msg.Printf( wxT( "dx %3.2f" ), m_camera.GetCameraPos().x );
|
||||
m_parentStatusBar->SetStatusText( msg, static_cast<int>( EDA_3D_VIEWER_STATUSBAR::X_POS ) );
|
||||
|
||||
msg.Printf( "dy %3.2f", m_camera.GetCameraPos().y );
|
||||
msg.Printf( wxT( "dy %3.2f" ), m_camera.GetCameraPos().y );
|
||||
m_parentStatusBar->SetStatusText( msg, static_cast<int>( EDA_3D_VIEWER_STATUSBAR::Y_POS ) );
|
||||
}
|
||||
}
|
||||
@@ -351,7 +352,7 @@ void EDA_3D_CANVAS::DoRePaint()
|
||||
// SwapBuffer requires the window to be shown before calling
|
||||
if( !IsShownOnScreen() )
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::DoRePaint !IsShown" );
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::DoRePaint !IsShown" ) );
|
||||
m_is_currently_painting.clear();
|
||||
return;
|
||||
}
|
||||
@@ -518,7 +519,7 @@ void EDA_3D_CANVAS::DoRePaint()
|
||||
if( m_render_pivot )
|
||||
{
|
||||
const float scale = glm::min( m_camera.GetZoom(), 1.0f );
|
||||
render_pivot( curtime_delta_s, scale * scale );
|
||||
render_pivot( curtime_delta_s, scale );
|
||||
}
|
||||
|
||||
// "Swaps the double-buffer of this window, making the back-buffer the
|
||||
@@ -577,7 +578,7 @@ void EDA_3D_CANVAS::OnEvent( wxEvent& aEvent )
|
||||
|
||||
void EDA_3D_CANVAS::OnEraseBackground( wxEraseEvent& event )
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::OnEraseBackground" );
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::OnEraseBackground" ) );
|
||||
// Do nothing, to avoid flashing.
|
||||
}
|
||||
|
||||
@@ -586,7 +587,7 @@ void EDA_3D_CANVAS::OnMouseWheel( wxMouseEvent& event )
|
||||
{
|
||||
bool mouseActivity = false;
|
||||
|
||||
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::OnMouseWheel" );
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::OnMouseWheel" ) );
|
||||
|
||||
if( m_camera_is_moving )
|
||||
return;
|
||||
@@ -782,7 +783,7 @@ void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent& event )
|
||||
m_3d_render_opengl->SetCurrentRollOverItem( nullptr );
|
||||
Request_refresh();
|
||||
|
||||
reporter.Report( "" );
|
||||
reporter.Report( wxEmptyString );
|
||||
}
|
||||
|
||||
m_currentRollOverItem = nullptr;
|
||||
|
||||
@@ -102,7 +102,6 @@ void EDA_3D_CANVAS::render_pivot( float t , float aScale )
|
||||
glTranslatef( lookAtPos.x, lookAtPos.y, lookAtPos.z );
|
||||
|
||||
glScalef( aScale, aScale, aScale );
|
||||
|
||||
pivot_render_triangles( t * 0.5f );
|
||||
|
||||
t = t * 0.80f;
|
||||
|
||||
@@ -41,7 +41,7 @@ static void dbg_save_rgb_buffer( const wxString& aFileName, unsigned char *aRGBp
|
||||
wxImage image( aXSize, aYSize );
|
||||
image.SetData( aRGBpixelBuffer );
|
||||
image = image.Mirror( false );
|
||||
image.SaveFile( aFileName + ".png", wxBITMAP_TYPE_PNG );
|
||||
image.SaveFile( aFileName + wxT( ".png" ), wxBITMAP_TYPE_PNG );
|
||||
image.Destroy();
|
||||
}
|
||||
|
||||
|
||||
@@ -276,7 +276,7 @@ OPENGL_RENDER_LIST* RENDER_3D_OPENGL::generateHoles( const LIST_OBJECT2D& aListH
|
||||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "RENDER_3D_OPENGL::generateHoles: Object type is not implemented" );
|
||||
wxFAIL_MSG( wxT( "RENDER_3D_OPENGL::generateHoles: Object type not implemented" ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -358,7 +358,7 @@ OPENGL_RENDER_LIST* RENDER_3D_OPENGL::generateLayerList( const BVH_CONTAINER_2D*
|
||||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "RENDER_3D_OPENGL: Object type is not implemented" );
|
||||
wxFAIL_MSG( wxT( "RENDER_3D_OPENGL: Object type is not implemented" ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,9 +192,9 @@ const float& POST_SHADER::GetShadowFactorAt( const SFVEC2I& aPos ) const
|
||||
|
||||
void POST_SHADER::DebugBuffersOutputAsImages() const
|
||||
{
|
||||
DBG_SaveBuffer( "m_shadow_att_factor", m_shadow_att_factor, m_size.x, m_size.y );
|
||||
DBG_SaveBuffer( "m_color", m_color, m_size.x, m_size.y );
|
||||
DBG_SaveNormalsBuffer( "m_normals", m_normals, m_size.x, m_size.y );
|
||||
DBG_SaveBuffer( wxT( "m_shadow_att_factor" ), m_shadow_att_factor, m_size.x, m_size.y );
|
||||
DBG_SaveBuffer( wxT( "m_color" ), m_color, m_size.x, m_size.y );
|
||||
DBG_SaveNormalsBuffer( wxT( "m_normals" ), m_normals, m_size.x, m_size.y );
|
||||
|
||||
// Normalize depth
|
||||
float *normalizedDepth = (float*) malloc( m_size.x * m_size.y * sizeof( float ) );
|
||||
@@ -210,7 +210,7 @@ void POST_SHADER::DebugBuffersOutputAsImages() const
|
||||
}
|
||||
}
|
||||
|
||||
DBG_SaveBuffer( "m_depthNormalized", normalizedDepth, m_size.x, m_size.y );
|
||||
DBG_SaveBuffer( wxT( "m_depthNormalized" ), normalizedDepth, m_size.x, m_size.y );
|
||||
|
||||
free( normalizedDepth );
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ void RENDER_3D_RAYTRACE::render( GLubyte* ptrPBO, REPORTER* aStatusReporter )
|
||||
break;
|
||||
|
||||
default:
|
||||
wxASSERT_MSG( false, "Invalid state on m_renderState");
|
||||
wxASSERT_MSG( false, wxT( "Invalid state on m_renderState" ) );
|
||||
restartRenderState();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
void EDA_3D_VIEWER_FRAME::CreateMenuBar()
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::CreateMenuBar" );
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::CreateMenuBar" ) );
|
||||
|
||||
COMMON_CONTROL* tool = m_toolManager->GetTool<COMMON_CONTROL>();
|
||||
WX_MENUBAR* menuBar = new WX_MENUBAR();
|
||||
@@ -48,12 +48,12 @@ void EDA_3D_VIEWER_FRAME::CreateMenuBar()
|
||||
ACTION_MENU* fileMenu = new ACTION_MENU( false, tool );
|
||||
|
||||
fileMenu->Add( _( "Export Current View as PNG..." ),
|
||||
"",
|
||||
wxEmptyString,
|
||||
ID_MENU_SCREENCOPY_PNG,
|
||||
BITMAPS::export_png );
|
||||
|
||||
fileMenu->Add( _( "Export Current View as JPEG..." ),
|
||||
"",
|
||||
wxEmptyString,
|
||||
ID_MENU_SCREENCOPY_JPEG,
|
||||
BITMAPS::export_file );
|
||||
|
||||
@@ -67,7 +67,7 @@ void EDA_3D_VIEWER_FRAME::CreateMenuBar()
|
||||
ACTION_MENU* editMenu = new ACTION_MENU( false, tool );
|
||||
|
||||
editMenu->Add( _( "Copy 3D Image" ),
|
||||
"",
|
||||
wxEmptyString,
|
||||
ID_TOOL_SCREENCOPY_TOCLIBBOARD,
|
||||
BITMAPS::copy );
|
||||
|
||||
@@ -109,7 +109,7 @@ void EDA_3D_VIEWER_FRAME::CreateMenuBar()
|
||||
BITMAPS::tools,
|
||||
ACTION_MENU::CHECK );
|
||||
|
||||
prefsMenu->Add( _( "Preferences..." ) + "\tCtrl+,",
|
||||
prefsMenu->Add( _( "Preferences..." ) + wxT( "\tCtrl+," ),
|
||||
_( "Show preferences for all open tools" ),
|
||||
wxID_PREFERENCES,
|
||||
BITMAPS::preference );
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
void EDA_3D_VIEWER_FRAME::ReCreateMainToolbar()
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::ReCreateMainToolbar" );
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::ReCreateMainToolbar" ) );
|
||||
|
||||
wxWindowUpdateLocker dummy( this );
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME( KIWAY *aKiway, PCB_BASE_FRAME *aParent
|
||||
m_currentCamera( m_trackBallCamera ),
|
||||
m_trackBallCamera( 2 * RANGE_SCALE_3D )
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME %s", aTitle );
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME %s" ), aTitle );
|
||||
|
||||
m_disable_ray_tracing = false;
|
||||
m_aboutTitle = _( "KiCad 3D Viewer" );
|
||||
@@ -281,7 +281,7 @@ void EDA_3D_VIEWER_FRAME::refreshRender()
|
||||
|
||||
void EDA_3D_VIEWER_FRAME::Exit3DFrame( wxCommandEvent &event )
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::Exit3DFrame" );
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::Exit3DFrame" ) );
|
||||
|
||||
Close( true );
|
||||
}
|
||||
@@ -289,7 +289,7 @@ void EDA_3D_VIEWER_FRAME::Exit3DFrame( wxCommandEvent &event )
|
||||
|
||||
void EDA_3D_VIEWER_FRAME::OnCloseWindow( wxCloseEvent &event )
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::OnCloseWindow" );
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::OnCloseWindow" ) );
|
||||
|
||||
if( m_canvas )
|
||||
m_canvas->Close();
|
||||
@@ -308,7 +308,8 @@ void EDA_3D_VIEWER_FRAME::Process_Special_Functions( wxCommandEvent &event )
|
||||
int id = event.GetId();
|
||||
bool isChecked = event.IsChecked();
|
||||
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::Process_Special_Functions id %d isChecked %d",
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::Process_Special_Functions id %d "
|
||||
"isChecked %d" ),
|
||||
id,
|
||||
isChecked );
|
||||
|
||||
@@ -341,7 +342,7 @@ void EDA_3D_VIEWER_FRAME::Process_Special_Functions( wxCommandEvent &event )
|
||||
return;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "Invalid event in EDA_3D_VIEWER_FRAME::Process_Special_Functions()" );
|
||||
wxFAIL_MSG( wxT( "Invalid event in EDA_3D_VIEWER_FRAME::Process_Special_Functions()" ) );
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -356,9 +357,9 @@ void EDA_3D_VIEWER_FRAME::OnRenderEngineSelection( wxCommandEvent &event )
|
||||
else
|
||||
m_boardAdapter.SetRenderEngine( RENDER_ENGINE::OPENGL );
|
||||
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::OnRenderEngineSelection type %s ",
|
||||
( m_boardAdapter.GetRenderEngine() == RENDER_ENGINE::RAYTRACING ) ? "raytracing" :
|
||||
"realtime" );
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::OnRenderEngineSelection type %s " ),
|
||||
m_boardAdapter.GetRenderEngine() == RENDER_ENGINE::RAYTRACING ? wxT( "raytracing" )
|
||||
: wxT( "realtime" ) );
|
||||
|
||||
if( old_engine != m_boardAdapter.GetRenderEngine() )
|
||||
RenderEngineChanged();
|
||||
@@ -367,7 +368,8 @@ void EDA_3D_VIEWER_FRAME::OnRenderEngineSelection( wxCommandEvent &event )
|
||||
|
||||
void EDA_3D_VIEWER_FRAME::OnDisableRayTracing( wxCommandEvent& aEvent )
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::%s disabling ray tracing.", __WXFUNCTION__ );
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::%s disabling ray tracing." ),
|
||||
__WXFUNCTION__ );
|
||||
|
||||
m_disable_ray_tracing = true;
|
||||
m_boardAdapter.SetRenderEngine( RENDER_ENGINE::OPENGL );
|
||||
@@ -376,7 +378,7 @@ void EDA_3D_VIEWER_FRAME::OnDisableRayTracing( wxCommandEvent& aEvent )
|
||||
|
||||
void EDA_3D_VIEWER_FRAME::OnActivate( wxActivateEvent &aEvent )
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::OnActivate" );
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::OnActivate" ) );
|
||||
|
||||
if( aEvent.GetActive() && m_canvas )
|
||||
{
|
||||
@@ -410,7 +412,7 @@ void EDA_3D_VIEWER_FRAME::LoadSettings( APP_SETTINGS_BASE *aCfg )
|
||||
EDA_3D_VIEWER_SETTINGS* cfg = dynamic_cast<EDA_3D_VIEWER_SETTINGS*>( aCfg );
|
||||
wxASSERT( cfg );
|
||||
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::LoadSettings" );
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::LoadSettings" ) );
|
||||
|
||||
if( cfg )
|
||||
{
|
||||
@@ -503,8 +505,9 @@ void EDA_3D_VIEWER_FRAME::LoadSettings( APP_SETTINGS_BASE *aCfg )
|
||||
#if 0
|
||||
RENDER_ENGINE engine = static_cast<RENDER_ENGINE>( cfg->m_Render.engine );
|
||||
wxLogTrace( m_logTrace, engine == RENDER_ENGINE::RAYTRACING ?
|
||||
"EDA_3D_VIEWER_FRAME::LoadSettings render setting Ray Trace" :
|
||||
"EDA_3D_VIEWER_FRAME::LoadSettings render setting OpenGL" );
|
||||
wxT( "EDA_3D_VIEWER_FRAME::LoadSettings render setting Ray Trace" )
|
||||
:
|
||||
wxT( "EDA_3D_VIEWER_FRAME::LoadSettings render setting OpenGL" ) );
|
||||
#else
|
||||
m_boardAdapter.SetRenderEngine( RENDER_ENGINE::OPENGL );
|
||||
#endif
|
||||
@@ -526,11 +529,11 @@ void EDA_3D_VIEWER_FRAME::SaveSettings( APP_SETTINGS_BASE *aCfg )
|
||||
|
||||
EDA_BASE_FRAME::SaveSettings( cfg );
|
||||
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::SaveSettings" );
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::SaveSettings" ) );
|
||||
|
||||
wxLogTrace( m_logTrace, m_boardAdapter.GetRenderEngine() == RENDER_ENGINE::RAYTRACING ?
|
||||
"EDA_3D_VIEWER_FRAME::SaveSettings render setting Ray Trace" :
|
||||
"EDA_3D_VIEWER_FRAME::SaveSettings render setting OpenGL" );
|
||||
wxT( "EDA_3D_VIEWER_FRAME::SaveSettings render setting Ray Trace" ) :
|
||||
wxT( "EDA_3D_VIEWER_FRAME::SaveSettings render setting OpenGL" ) );
|
||||
|
||||
if( cfg )
|
||||
{
|
||||
@@ -623,7 +626,7 @@ void EDA_3D_VIEWER_FRAME::SaveSettings( APP_SETTINGS_BASE *aCfg )
|
||||
|
||||
void EDA_3D_VIEWER_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged )
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::CommonSettingsChanged" );
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::CommonSettingsChanged" ) );
|
||||
|
||||
// Regen menu bars, etc
|
||||
EDA_BASE_FRAME::CommonSettingsChanged( aEnvVarsChanged, aTextVarsChanged );
|
||||
@@ -732,7 +735,7 @@ void EDA_3D_VIEWER_FRAME::takeScreenshot( wxCommandEvent& event )
|
||||
|
||||
void EDA_3D_VIEWER_FRAME::RenderEngineChanged()
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::RenderEngineChanged()" );
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::RenderEngineChanged()" ) );
|
||||
|
||||
if( m_canvas )
|
||||
m_canvas->RenderEngineChanged();
|
||||
@@ -741,7 +744,7 @@ void EDA_3D_VIEWER_FRAME::RenderEngineChanged()
|
||||
|
||||
void EDA_3D_VIEWER_FRAME::loadCommonSettings()
|
||||
{
|
||||
wxCHECK_RET( m_canvas, "Cannot load settings to null canvas" );
|
||||
wxCHECK_RET( m_canvas, wxT( "Cannot load settings to null canvas" ) );
|
||||
|
||||
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
using KIGFX::COLOR4D;
|
||||
|
||||
///! Update the schema version whenever a migration is required
|
||||
const int viewer3dSchemaVersion = 1;
|
||||
const int viewer3dSchemaVersion = 2;
|
||||
|
||||
|
||||
EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS()
|
||||
@@ -63,7 +63,7 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS()
|
||||
|
||||
// OpenGL options
|
||||
m_params.emplace_back( new PARAM<bool>( "render.opengl_copper_thickness",
|
||||
&m_Render.opengl_copper_thickness, true ) );
|
||||
&m_Render.opengl_copper_thickness, false ) );
|
||||
m_params.emplace_back( new PARAM<bool>( "render.opengl_show_model_bbox",
|
||||
&m_Render.opengl_show_model_bbox, false ) );
|
||||
m_params.emplace_back( new PARAM<bool>( "render.opengl_highlight_on_rollover",
|
||||
@@ -202,6 +202,12 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS()
|
||||
&m_Camera.projection_mode, 1 ) );
|
||||
|
||||
registerMigration( 0, 1, std::bind( &EDA_3D_VIEWER_SETTINGS::migrateSchema0to1, this ) );
|
||||
|
||||
registerMigration( 1, 2, [&]() -> bool
|
||||
{
|
||||
Set( "render.opengl_copper_thickness", false );
|
||||
return true;
|
||||
} );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -202,21 +202,18 @@ TOOL_ACTION EDA_3D_ACTIONS::materialCAD( "3DViewer.Control.materialCAD",
|
||||
_( "Use a CAD color style based on the diffuse color of the material" ),
|
||||
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) MATERIAL_MODE::CAD_MODE );
|
||||
|
||||
TOOL_ACTION EDA_3D_ACTIONS::rotate45axisZ( "3DViewer.Control.rotate45axisZ",
|
||||
AS_ACTIVE,
|
||||
WXK_TAB, "",
|
||||
"Rotate 45 degrees over Z axis" );
|
||||
|
||||
TOOL_ACTION EDA_3D_ACTIONS::showTHT( "3DViewer.Control.attributesTHT",
|
||||
AS_ACTIVE,
|
||||
'T', "",
|
||||
_( "Toggle Through Hole 3D models" ), _( "Toggle 3D models for 'Through hole' type components" ),
|
||||
_( "Toggle Through Hole 3D models" ),
|
||||
_( "Toggle 3D models for 'Through hole' type components" ),
|
||||
BITMAPS::show_tht, AF_NONE, (void*) FL_FP_ATTRIBUTES_NORMAL );
|
||||
|
||||
TOOL_ACTION EDA_3D_ACTIONS::showSMD( "3DViewer.Control.attributesSMD",
|
||||
AS_ACTIVE,
|
||||
'S', "",
|
||||
_( "Toggle SMD 3D models" ), _( "Toggle 3D models for 'Surface mount' type components" ),
|
||||
_( "Toggle SMD 3D models" ),
|
||||
_( "Toggle 3D models for 'Surface mount' type components" ),
|
||||
BITMAPS::show_smt, AF_NONE, (void*) FL_FP_ATTRIBUTES_NORMAL_INSERT );
|
||||
|
||||
TOOL_ACTION EDA_3D_ACTIONS::showVirtual( "3DViewer.Control.attributesOther",
|
||||
|
||||
@@ -75,7 +75,6 @@ public:
|
||||
static TOOL_ACTION materialDiffuse;
|
||||
static TOOL_ACTION materialCAD;
|
||||
|
||||
static TOOL_ACTION rotate45axisZ;
|
||||
static TOOL_ACTION showTHT;
|
||||
static TOOL_ACTION showSMD;
|
||||
static TOOL_ACTION showVirtual;
|
||||
|
||||
@@ -166,7 +166,7 @@ void PANEL_PREVIEW_3D_MODEL::OnMenuEvent( wxMenuEvent& aEvent )
|
||||
|
||||
void PANEL_PREVIEW_3D_MODEL::loadSettings()
|
||||
{
|
||||
wxCHECK_RET( m_previewPane, "Cannot load settings to null canvas" );
|
||||
wxCHECK_RET( m_previewPane, wxT( "Cannot load settings to null canvas" ) );
|
||||
|
||||
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
|
||||
|
||||
@@ -241,13 +241,16 @@ static double rotationFromString( const wxString& aValue )
|
||||
|
||||
wxString PANEL_PREVIEW_3D_MODEL::formatScaleValue( double aValue )
|
||||
{
|
||||
return wxString::Format( "%.4f", aValue );
|
||||
return wxString::Format( wxT( "%.4f" ),
|
||||
aValue );
|
||||
}
|
||||
|
||||
|
||||
wxString PANEL_PREVIEW_3D_MODEL::formatRotationValue( double aValue )
|
||||
{
|
||||
return wxString::Format( "%.2f %s", aValue, GetAbbreviatedUnitsLabel( EDA_UNITS::DEGREES ) );
|
||||
return wxString::Format( wxT( "%.2f %s" ),
|
||||
aValue,
|
||||
GetAbbreviatedUnitsLabel( EDA_UNITS::DEGREES ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -255,9 +258,13 @@ wxString PANEL_PREVIEW_3D_MODEL::formatOffsetValue( double aValue )
|
||||
{
|
||||
// Convert from internal units (mm) to user units
|
||||
if( m_userUnits == EDA_UNITS::INCHES )
|
||||
aValue /= 25.4f;
|
||||
aValue /= 25.4;
|
||||
else if( m_userUnits == EDA_UNITS::MILS )
|
||||
aValue /= 25.4 / 1e3;
|
||||
|
||||
return wxString::Format( "%.4f %s", aValue, GetAbbreviatedUnitsLabel( m_userUnits ) );
|
||||
return wxString::Format( wxT( "%.6f %s" ),
|
||||
aValue,
|
||||
GetAbbreviatedUnitsLabel( m_userUnits ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -397,18 +404,19 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementOffset( wxSpinEvent& event, double aSign
|
||||
else if( spinCtrl == m_spinZoffset )
|
||||
textCtrl = zoff;
|
||||
|
||||
double step = OFFSET_INCREMENT_MM;
|
||||
double step_mm = OFFSET_INCREMENT_MM;
|
||||
double curr_value_mm = DoubleValueFromString( m_userUnits, textCtrl->GetValue() ) / IU_PER_MM;
|
||||
|
||||
if( m_userUnits == EDA_UNITS::INCHES )
|
||||
step = OFFSET_INCREMENT_MIL/1000.0;
|
||||
if( m_userUnits == EDA_UNITS::MILS || m_userUnits == EDA_UNITS::INCHES )
|
||||
{
|
||||
step_mm = 25.4*OFFSET_INCREMENT_MIL/1000;
|
||||
}
|
||||
|
||||
double curr_value = DoubleValueFromString( m_userUnits, textCtrl->GetValue() ) / IU_PER_MM;
|
||||
curr_value_mm += ( step_mm * aSign );
|
||||
curr_value_mm = std::max( -MAX_OFFSET, curr_value_mm );
|
||||
curr_value_mm = std::min( curr_value_mm, MAX_OFFSET );
|
||||
|
||||
curr_value += ( step * aSign );
|
||||
curr_value = std::max( -MAX_OFFSET, curr_value );
|
||||
curr_value = std::min( curr_value, MAX_OFFSET );
|
||||
|
||||
textCtrl->SetValue( formatOffsetValue( curr_value ) );
|
||||
textCtrl->SetValue( formatOffsetValue( curr_value_mm ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -460,29 +468,29 @@ void PANEL_PREVIEW_3D_MODEL::onMouseWheelOffset( wxMouseEvent& event )
|
||||
{
|
||||
wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
|
||||
|
||||
double step = OFFSET_INCREMENT_MM;
|
||||
double step_mm = OFFSET_INCREMENT_MM;
|
||||
|
||||
if( event.ShiftDown( ) )
|
||||
step = OFFSET_INCREMENT_MM_FINE;
|
||||
step_mm = OFFSET_INCREMENT_MM_FINE;
|
||||
|
||||
if( m_userUnits == EDA_UNITS::INCHES )
|
||||
if( m_userUnits == EDA_UNITS::MILS || m_userUnits == EDA_UNITS::INCHES )
|
||||
{
|
||||
step = OFFSET_INCREMENT_MIL/1000.0;
|
||||
step_mm = 25.4*OFFSET_INCREMENT_MIL/1000.0;
|
||||
|
||||
if( event.ShiftDown( ) )
|
||||
step = OFFSET_INCREMENT_MIL_FINE/1000.0;
|
||||
step_mm = 25.4*OFFSET_INCREMENT_MIL_FINE/1000.0;
|
||||
}
|
||||
|
||||
if( event.GetWheelRotation() >= 0 )
|
||||
step = -step;
|
||||
step_mm = -step_mm;
|
||||
|
||||
double curr_value = DoubleValueFromString( m_userUnits, textCtrl->GetValue() ) / IU_PER_MM;
|
||||
double curr_value_mm = DoubleValueFromString( m_userUnits, textCtrl->GetValue() ) / IU_PER_MM;
|
||||
|
||||
curr_value += step;
|
||||
curr_value = std::max( -MAX_OFFSET, curr_value );
|
||||
curr_value = std::min( curr_value, MAX_OFFSET );
|
||||
curr_value_mm += step_mm;
|
||||
curr_value_mm = std::max( -MAX_OFFSET, curr_value_mm );
|
||||
curr_value_mm = std::min( curr_value_mm, MAX_OFFSET );
|
||||
|
||||
textCtrl->SetValue( formatOffsetValue( curr_value ) );
|
||||
textCtrl->SetValue( formatOffsetValue( curr_value_mm ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ German (DE) Rafael Sokolowski <Rafael.Sokolowski[at]web-dot-de
|
||||
Japanese (JA) Kenta Yonekura <yoneken[at]kicad-dot-jp>
|
||||
Simplified Chinese (zh_CN) taotieren <admin[at]taotieren-dot-com>
|
||||
|
||||
Remy Halvick, David Briscoe, Dominique Laigle, Paul Burke
|
||||
Remy Halvick, David J S Briscoe, Dominique Laigle, Paul Burke
|
||||
|
||||
|
||||
== Programm credits for icons and others
|
||||
|
||||
@@ -28,22 +28,28 @@ include( ${CMAKE_MODULE_PATH}/KiCadFullVersion.cmake )
|
||||
|
||||
# Extract the major and minor build version as a string
|
||||
string( REGEX MATCH
|
||||
"([0-9]+)\\.([0-9]+)\\..*"
|
||||
KICAD_MAJOR_MINOR_VERSION
|
||||
"([0-9]+)\\.([0-9]+)\\.([0-9]+).*"
|
||||
KICAD_MAJOR_MINOR_PATCH_VERSION
|
||||
"${KICAD_SEMANTIC_VERSION}"
|
||||
)
|
||||
|
||||
if( CMAKE_MATCH_COUNT EQUAL 2 )
|
||||
if( CMAKE_MATCH_COUNT EQUAL 3 )
|
||||
# Match slot 0 is the full string, so we want slots 1 & 2
|
||||
set( KICAD_MAJOR_MINOR_VERSION "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}" )
|
||||
set( KICAD_MAJOR_MINOR_VERSION_TUPLE "{ ${CMAKE_MATCH_1}, ${CMAKE_MATCH_2} }" )
|
||||
|
||||
set( KICAD_MAJOR_MINOR_PATCH_VERSION "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}" )
|
||||
|
||||
set( KICAD_MAJOR_VERSION "${CMAKE_MATCH_1}" )
|
||||
set( KICAD_WIN32_RC_FILEVER_STR "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.0.0\\0" )
|
||||
set( KICAD_WIN32_RC_FILEVER "${CMAKE_MATCH_1}, ${CMAKE_MATCH_2}, 0, 0" )
|
||||
set( KICAD_MINOR_VERSION "${CMAKE_MATCH_2}" )
|
||||
set( KICAD_PATCH_VERSION "${CMAKE_MATCH_3}" )
|
||||
|
||||
set( KICAD_WIN32_RC_FILEVER_STR "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}.${KICAD_GIT_REV}\\0" )
|
||||
set( KICAD_WIN32_RC_FILEVER "${CMAKE_MATCH_1}, ${CMAKE_MATCH_2}, ${CMAKE_MATCH_3}, ${KICAD_GIT_REV}" )
|
||||
set( KICAD_WIN32_RC_PRODVER_STR "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}\\0" )
|
||||
set( KICAD_WIN32_RC_PRODVER "${CMAKE_MATCH_1}, ${CMAKE_MATCH_2}, 0, 0" )
|
||||
set( KICAD_WIN32_RC_PRODVER "${CMAKE_MATCH_1}, ${CMAKE_MATCH_2}, ${CMAKE_MATCH_3}, ${KICAD_GIT_REV}" )
|
||||
else()
|
||||
message( FATAL_ERROR "Unable to extract major and minor version string" )
|
||||
message( FATAL_ERROR "Unable to extract major, minor and patch version string" )
|
||||
endif()
|
||||
|
||||
set( _wvh_new_version_text
|
||||
@@ -58,6 +64,8 @@ set( _wvh_new_version_text
|
||||
#define KICAD_VERSION_FULL \"${KICAD_VERSION_FULL}\"
|
||||
#define KICAD_SEMANTIC_VERSION \"${KICAD_SEMANTIC_VERSION}\"
|
||||
#define KICAD_MAJOR_VERSION \"${KICAD_MAJOR_VERSION}\"
|
||||
#define KICAD_MINOR_VERSION \"${KICAD_MINOR_VERSION}\"
|
||||
#define KICAD_PATCH_VERSION \"${KICAD_PATCH_VERSION}\"
|
||||
#define KICAD_MAJOR_MINOR_VERSION \"${KICAD_MAJOR_MINOR_VERSION}\"
|
||||
#define KICAD_MAJOR_MINOR_VERSION_TUPLE ${KICAD_MAJOR_MINOR_VERSION_TUPLE}
|
||||
#define KICAD_WIN32_RC_PRODVER ${KICAD_WIN32_RC_PRODVER}
|
||||
|
||||
@@ -42,6 +42,15 @@ macro( create_git_version_header _git_src_path )
|
||||
RESULT_VARIABLE _git_log_result
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(
|
||||
COMMAND
|
||||
${GIT_EXECUTABLE} rev-list --count --first-parent HEAD
|
||||
WORKING_DIRECTORY ${_git_src_path}
|
||||
OUTPUT_VARIABLE _git_REV_COUNT
|
||||
ERROR_VARIABLE _git_log_error
|
||||
RESULT_VARIABLE _git_log_result
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
set( ENV{LC_ALL} ${_Git_SAVED_LC_ALL} )
|
||||
endif( GIT_FOUND )
|
||||
|
||||
@@ -51,4 +60,16 @@ macro( create_git_version_header _git_src_path )
|
||||
set( KICAD_VERSION "(${_git_DESCRIBE})" )
|
||||
endif()
|
||||
|
||||
if( _git_REV_COUNT )
|
||||
set( KICAD_GIT_REV "${_git_REV_COUNT}" )
|
||||
|
||||
# Sanity check
|
||||
if (NOT KICAD_GIT_REV MATCHES "^[0-9]+$")
|
||||
set( KICAD_GIT_REV "0" )
|
||||
endif ()
|
||||
else()
|
||||
# Incase the command failed, we can just default to 0, only a problem in CI right now
|
||||
set( KICAD_GIT_REV "0" )
|
||||
endif()
|
||||
|
||||
endmacro()
|
||||
|
||||
@@ -37,7 +37,7 @@ unset(_Python_NAMES)
|
||||
|
||||
set(_PYTHON1_VERSIONS 1.6 1.5)
|
||||
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
|
||||
set(_PYTHON3_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||
set(_PYTHON3_VERSIONS 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||
|
||||
# Disabling the "search every possible place" code for now
|
||||
# see https://gitlab.com/kicad/code/kicad/-/issues/8553
|
||||
|
||||
@@ -44,7 +44,7 @@ cmake_find_frameworks(Python)
|
||||
|
||||
set(_PYTHON1_VERSIONS 1.6 1.5)
|
||||
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
|
||||
set(_PYTHON3_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||
set(_PYTHON3_VERSIONS 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||
|
||||
if(PythonLibs_FIND_VERSION)
|
||||
if(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
# KiCad.
|
||||
#
|
||||
# Note: This version string should follow the semantic versioning system
|
||||
set( KICAD_SEMANTIC_VERSION "6.0.0" )
|
||||
set( KICAD_SEMANTIC_VERSION "6.0.2" )
|
||||
|
||||
# Default the version to the semantic version.
|
||||
# This is overridden by the git repository tag though (if using git)
|
||||
|
||||
@@ -26,11 +26,13 @@ set_source_files_properties( bitmap2cmp_gui.cpp PROPERTIES
|
||||
COMPILE_DEFINITIONS "COMPILING_DLL"
|
||||
)
|
||||
|
||||
if( MINGW )
|
||||
# BITMAP2COMPONENT_RESOURCES variable is set by the macro.
|
||||
mingw_resource_compiler( bitmap2component )
|
||||
else()
|
||||
set( BITMAP2COMPONENT_RESOURCES ${CMAKE_SOURCE_DIR}/resources/msw/bitmap2component.rc )
|
||||
if( WIN32 )
|
||||
if( MINGW )
|
||||
# BITMAP2COMPONENT_RESOURCES variable is set by the macro.
|
||||
mingw_resource_compiler( bitmap2component )
|
||||
else()
|
||||
set( BITMAP2COMPONENT_RESOURCES ${CMAKE_SOURCE_DIR}/resources/msw/bitmap2component.rc )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if( APPLE )
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KICAD, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 1992-2010 jean-pierre.charras
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2022 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
|
||||
@@ -468,7 +468,7 @@ wxString BM2CMP_FRAME::FormatOutputSize( double aSize )
|
||||
}
|
||||
else
|
||||
{
|
||||
text.Printf( "%d", KiROUND( aSize ) );
|
||||
text.Printf( wxT( "%d" ), KiROUND( aSize ) );
|
||||
}
|
||||
|
||||
return text;
|
||||
|
||||
+11
-11
@@ -194,7 +194,7 @@ static const wxChar AllowManualCanvasScale[] = wxT( "AllowManualCanvasScale" );
|
||||
*/
|
||||
wxString dumpParamCfg( const PARAM_CFG& aParam )
|
||||
{
|
||||
wxString s = aParam.m_Ident + ": ";
|
||||
wxString s = aParam.m_Ident + wxT( ": " );
|
||||
|
||||
/*
|
||||
* This implementation is rather simplistic, but it is
|
||||
@@ -217,9 +217,9 @@ wxString dumpParamCfg( const PARAM_CFG& aParam )
|
||||
s << *static_cast<const PARAM_CFG_FILENAME&>( aParam ).m_Pt_param;
|
||||
break;
|
||||
case paramcfg_id::PARAM_BOOL:
|
||||
s << ( *static_cast<const PARAM_CFG_BOOL&>( aParam ).m_Pt_param ? "true" : "false" );
|
||||
s << ( *static_cast<const PARAM_CFG_BOOL&>( aParam ).m_Pt_param ? wxT( "true" ) : wxT( "false" ) );
|
||||
break;
|
||||
default: s << "Unsupported PARAM_CFG variant: " << aParam.m_Type;
|
||||
default: s << wxT( "Unsupported PARAM_CFG variant: " ) << aParam.m_Type;
|
||||
}
|
||||
|
||||
return s;
|
||||
@@ -249,14 +249,14 @@ static void dumpCfg( const std::vector<PARAM_CFG*>& aArray )
|
||||
*/
|
||||
static wxFileName getAdvancedCfgFilename()
|
||||
{
|
||||
const static wxString cfg_filename{ "kicad_advanced" };
|
||||
const static wxString cfg_filename{ wxT( "kicad_advanced" ) };
|
||||
return wxFileName( SETTINGS_MANAGER::GetUserSettingsPath(), cfg_filename );
|
||||
}
|
||||
|
||||
|
||||
ADVANCED_CFG::ADVANCED_CFG()
|
||||
{
|
||||
wxLogTrace( AdvancedConfigMask, "Init advanced config" );
|
||||
wxLogTrace( AdvancedConfigMask, wxT( "Init advanced config" ) );
|
||||
|
||||
// Init defaults - this is done in case the config doesn't exist,
|
||||
// then the values will remain as set here.
|
||||
@@ -313,7 +313,7 @@ void ADVANCED_CFG::loadFromConfigFile()
|
||||
|
||||
if( !k_advanced.FileExists() )
|
||||
{
|
||||
wxLogTrace( AdvancedConfigMask, "File does not exist %s", k_advanced.GetFullPath() );
|
||||
wxLogTrace( AdvancedConfigMask, wxT( "File does not exist %s" ), k_advanced.GetFullPath() );
|
||||
|
||||
// load the defaults
|
||||
wxConfig emptyConfig;
|
||||
@@ -322,9 +322,9 @@ void ADVANCED_CFG::loadFromConfigFile()
|
||||
return;
|
||||
}
|
||||
|
||||
wxLogTrace( AdvancedConfigMask, "Loading advanced config from: %s", k_advanced.GetFullPath() );
|
||||
wxLogTrace( AdvancedConfigMask, wxT( "Loading advanced config from: %s" ), k_advanced.GetFullPath() );
|
||||
|
||||
wxFileConfig file_cfg( "", "", k_advanced.GetFullPath() );
|
||||
wxFileConfig file_cfg( wxEmptyString, wxEmptyString, k_advanced.GetFullPath() );
|
||||
loadSettings( file_cfg );
|
||||
}
|
||||
|
||||
@@ -414,14 +414,14 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
|
||||
|
||||
// Special case for trace mask setting...we just grab them and set them immediately
|
||||
// Because we even use wxLogTrace inside of advanced config
|
||||
wxString traceMasks = "";
|
||||
configParams.push_back( new PARAM_CFG_WXSTRING( true, AC_KEYS::TraceMasks, &traceMasks, "" ) );
|
||||
wxString traceMasks = wxEmptyString;
|
||||
configParams.push_back( new PARAM_CFG_WXSTRING( true, AC_KEYS::TraceMasks, &traceMasks, wxEmptyString ) );
|
||||
|
||||
// Load the config from file
|
||||
wxConfigLoadSetups( &aCfg, configParams );
|
||||
|
||||
// Now actually set the trace masks
|
||||
wxStringTokenizer traceMaskTokenizer( traceMasks, "," );
|
||||
wxStringTokenizer traceMaskTokenizer( traceMasks, wxT( "," ) );
|
||||
|
||||
while( traceMaskTokenizer.HasMoreTokens() )
|
||||
{
|
||||
|
||||
@@ -42,10 +42,10 @@ ARRAY_AXIS::ARRAY_AXIS() : m_type( NUMBERING_TYPE::NUMBERING_NUMERIC ), m_offset
|
||||
|
||||
const wxString& ARRAY_AXIS::GetAlphabet() const
|
||||
{
|
||||
static const wxString alphaNumeric = "0123456789";
|
||||
static const wxString alphaHex = "0123456789ABCDEF";
|
||||
static const wxString alphaFull = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
static const wxString alphaNoIOSQXZ = "ABCDEFGHJKLMNPRTUVWY";
|
||||
static const wxString alphaNumeric = wxT( "0123456789" );
|
||||
static const wxString alphaHex = wxT( "0123456789ABCDEF" );
|
||||
static const wxString alphaFull = wxT( "ABCDEFGHIJKLMNOPQRSTUVWXYZ" );
|
||||
static const wxString alphaNoIOSQXZ = wxT( "ABCDEFGHJKLMNPRTUVWY" );
|
||||
|
||||
switch( m_type )
|
||||
{
|
||||
|
||||
@@ -87,7 +87,7 @@ bool ASSET_ARCHIVE::Load()
|
||||
long ASSET_ARCHIVE::GetFileContents( const wxString& aFilePath, const unsigned char* aDest,
|
||||
size_t aMaxLen )
|
||||
{
|
||||
wxFAIL_MSG( "Unimplemented" );
|
||||
wxFAIL_MSG( wxT( "Unimplemented" ) );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ const wxString& BASE_SCREEN::GetPageNumber() const
|
||||
static wxString pageNumber;
|
||||
|
||||
if( m_pageNumber.IsEmpty() )
|
||||
pageNumber.Printf( "%d", m_virtualPageNumber );
|
||||
pageNumber.Printf( wxT( "%d" ), m_virtualPageNumber );
|
||||
else
|
||||
pageNumber = m_pageNumber;
|
||||
|
||||
@@ -86,9 +86,9 @@ const wxString& BASE_SCREEN::GetPageNumber() const
|
||||
void BASE_SCREEN::Show( int nestLevel, std::ostream& os ) const
|
||||
{
|
||||
// for now, make it look like XML, expand on this later.
|
||||
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() << ">\n";
|
||||
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() << wxT( ">\n" );
|
||||
|
||||
NestedSpace( nestLevel, os ) << "</" << GetClass().Lower().mb_str() << ">\n";
|
||||
NestedSpace( nestLevel, os ) << wxT( "</" ) << GetClass().Lower().mb_str() << wxT( ">\n" );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -181,7 +181,7 @@ wxString MessageTextFromValue( EDA_UNITS aUnits, double aValue, bool aAddUnitLab
|
||||
|
||||
if( aAddUnitLabel )
|
||||
{
|
||||
text += " ";
|
||||
text += wxT( " " );
|
||||
text += GetAbbreviatedUnitsLabel( aUnits, aType );
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@ double DoubleValueFromString( EDA_UNITS aUnits, const wxString& aTextValue, EDA_
|
||||
{
|
||||
aUnits = EDA_UNITS::INCHES;
|
||||
}
|
||||
else if( unit == "oz" ) // 1 oz = 1.37 mils
|
||||
else if( unit == wxT( "oz" ) ) // 1 oz = 1.37 mils
|
||||
{
|
||||
aUnits = EDA_UNITS::MILS;
|
||||
dtmp *= 1.37;
|
||||
|
||||
+14
-1
@@ -6,7 +6,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2017 jean-pierre.charras
|
||||
* Copyright (C) 2011-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2011-2022 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
|
||||
@@ -253,12 +253,16 @@ void BITMAP_BASE::DrawBitmap( wxDC* aDC, const wxPoint& aPos )
|
||||
bool useTransform = aDC->CanUseTransformMatrix();
|
||||
wxAffineMatrix2D init_matrix = aDC->GetTransformMatrix();
|
||||
|
||||
wxPoint clipAreaPos;
|
||||
|
||||
if( useTransform )
|
||||
{
|
||||
wxAffineMatrix2D matrix = aDC->GetTransformMatrix();
|
||||
matrix.Translate( pos.x, pos.y );
|
||||
matrix.Scale( GetScalingFactor(), GetScalingFactor() );
|
||||
aDC->SetTransformMatrix( matrix );
|
||||
clipAreaPos.x = pos.x;
|
||||
clipAreaPos.y = pos.y;
|
||||
pos.x = pos.y = 0;
|
||||
}
|
||||
else
|
||||
@@ -269,8 +273,15 @@ void BITMAP_BASE::DrawBitmap( wxDC* aDC, const wxPoint& aPos )
|
||||
|
||||
pos.x = KiROUND( pos.x / GetScalingFactor() );
|
||||
pos.y = KiROUND( pos.y / GetScalingFactor() );
|
||||
size.x = KiROUND( size.x / GetScalingFactor() );
|
||||
size.y = KiROUND( size.y / GetScalingFactor() );
|
||||
clipAreaPos.x = pos.x;
|
||||
clipAreaPos.y = pos.y;
|
||||
}
|
||||
|
||||
aDC->DestroyClippingRegion();
|
||||
aDC->SetClippingRegion( clipAreaPos, size );
|
||||
|
||||
if( GetGRForceBlackPenState() )
|
||||
{
|
||||
wxBitmap result( m_bitmap->ConvertToImage().ConvertToGreyscale() );
|
||||
@@ -288,6 +299,8 @@ void BITMAP_BASE::DrawBitmap( wxDC* aDC, const wxPoint& aPos )
|
||||
aDC->SetUserScale( scale, scale );
|
||||
aDC->SetLogicalOrigin( logicalOriginX, logicalOriginY );
|
||||
}
|
||||
|
||||
aDC->DestroyClippingRegion();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ BITMAP_STORE::BITMAP_STORE()
|
||||
{
|
||||
wxFileName path( PATHS::GetStockDataPath() + wxT( "/resources" ), IMAGE_ARCHIVE );
|
||||
|
||||
wxLogTrace( traceBitmaps, "Loading bitmaps from " + path.GetFullPath() );
|
||||
wxLogTrace( traceBitmaps, wxT( "Loading bitmaps from " ) + path.GetFullPath() );
|
||||
|
||||
m_archive = std::make_unique<ASSET_ARCHIVE>( path.GetFullPath() );
|
||||
|
||||
@@ -148,8 +148,8 @@ wxImage BITMAP_STORE::getImage( BITMAPS aBitmapId, int aHeight )
|
||||
|
||||
if( count < 0 )
|
||||
{
|
||||
wxLogTrace( traceBitmaps, "Bitmap for %d, %d, %s has an info tag with file %s,"
|
||||
"but that file could not be found in the archive!",
|
||||
wxLogTrace( traceBitmaps, wxT( "Bitmap for %d, %d, %s has an info tag with file %s," )
|
||||
wxT( "but that file could not be found in the archive!" ),
|
||||
aBitmapId, aHeight, m_theme );
|
||||
data = s_imageNotFound;
|
||||
count = sizeof( s_imageNotFound );
|
||||
@@ -205,7 +205,7 @@ wxString BITMAP_STORE::computeBitmapName( BITMAPS aBitmapId, int aHeight )
|
||||
{
|
||||
if( !m_bitmapInfoCache.count( aBitmapId ) )
|
||||
{
|
||||
wxLogTrace( traceBitmaps, "No bitmap info available for %d", aBitmapId );
|
||||
wxLogTrace( traceBitmaps, wxT( "No bitmap info available for %d" ), aBitmapId );
|
||||
return wxEmptyString;
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ wxString BITMAP_STORE::computeBitmapName( BITMAPS aBitmapId, int aHeight )
|
||||
|
||||
if( fn.IsEmpty() )
|
||||
{
|
||||
wxLogTrace( traceBitmaps, "No bitmap found matching ID %d, height %d, theme %s",
|
||||
wxLogTrace( traceBitmaps, wxT( "No bitmap found matching ID %d, height %d, theme %s" ),
|
||||
aBitmapId, aHeight, m_theme );
|
||||
return m_bitmapInfoCache.at( aBitmapId ).begin()->filename;
|
||||
}
|
||||
|
||||
+48
-48
@@ -95,42 +95,42 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
|
||||
wxString aMsg;
|
||||
// DO NOT translate information in the msg_version string
|
||||
|
||||
wxString eol = aHtml ? "<br>" : "\n";
|
||||
wxString eol = aHtml ? wxT( "<br>" ) : wxT( "\n" );
|
||||
|
||||
// Tabs instead of spaces for the plaintext version for shorter string length
|
||||
wxString indent4 = aHtml ? " " : "\t";
|
||||
wxString indent4 = aHtml ? wxT( " " ) : wxT( "\t" );
|
||||
|
||||
#define ON "ON" << eol
|
||||
#define OFF "OFF" << eol
|
||||
#define ON wxT( "ON" ) << eol
|
||||
#define OFF wxT( "OFF" ) << eol
|
||||
|
||||
wxString version;
|
||||
version << ( KIPLATFORM::APP::IsOperatingSystemUnsupported() ? "(UNSUPPORTED)"
|
||||
version << ( KIPLATFORM::APP::IsOperatingSystemUnsupported() ? wxT( "(UNSUPPORTED)" )
|
||||
: GetBuildVersion() )
|
||||
#ifdef DEBUG
|
||||
<< ", debug"
|
||||
<< wxT( ", debug" )
|
||||
#else
|
||||
<< ", release"
|
||||
<< wxT( ", release" )
|
||||
#endif
|
||||
<< " build";
|
||||
<< wxT( " build" );
|
||||
|
||||
wxPlatformInfo platform;
|
||||
aMsg << "Application: " << aTitle;
|
||||
aMsg << wxT( "Application: " ) << aTitle;
|
||||
|
||||
#if defined( KICAD_BUILD_ARCH_X64 )
|
||||
aMsg << " (64-bit)";
|
||||
aMsg << wxT( " (64-bit)" );
|
||||
#elif defined( KICAD_BUILD_ARCH_X86 )
|
||||
aMsg << " (32-bit)";
|
||||
aMsg << wxT( " (32-bit)" );
|
||||
#elif defined( KICAD_BUILD_ARCH_ARM )
|
||||
aMsg << " (ARM 32-bit)";
|
||||
aMsg << wxT( " (ARM 32-bit)" );
|
||||
#elif defined( KICAD_BUILD_ARCH_ARM64 )
|
||||
aMsg << " (ARM 64-bit)";
|
||||
aMsg << wxT( " (ARM 64-bit)" );
|
||||
#endif
|
||||
|
||||
aMsg << eol << eol;
|
||||
|
||||
|
||||
aMsg << "Version: " << version << eol << eol;
|
||||
aMsg << "Libraries:" << eol;
|
||||
aMsg << wxT( "Version: " ) << version << eol << eol;
|
||||
aMsg << wxT( "Libraries:" ) << eol;
|
||||
|
||||
aMsg << indent4 << wxGetLibraryVersionInfo().GetVersionString() << eol;
|
||||
|
||||
@@ -139,26 +139,26 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
|
||||
|
||||
aMsg << eol;
|
||||
|
||||
aMsg << "Platform: " << wxGetOsDescription() << ", "
|
||||
<< GetPlatformGetBitnessName() << ", "
|
||||
<< platform.GetEndiannessName() << ", "
|
||||
aMsg << wxT( "Platform: " ) << wxGetOsDescription() << wxT( ", " )
|
||||
<< GetPlatformGetBitnessName() << wxT( ", " )
|
||||
<< platform.GetEndiannessName() << wxT( ", " )
|
||||
<< platform.GetPortIdName();
|
||||
|
||||
#ifdef __WXGTK__
|
||||
aMsg << ", " << wxGetenv( "XDG_SESSION_DESKTOP" )
|
||||
<< ", " << wxGetenv( "XDG_SESSION_TYPE" );
|
||||
aMsg << wxT( ", " ) << wxGetenv( wxT( "XDG_SESSION_DESKTOP" ) )
|
||||
<< wxT( ", " ) << wxGetenv( wxT( "XDG_SESSION_TYPE" ) );
|
||||
#endif
|
||||
|
||||
aMsg << eol << eol;
|
||||
|
||||
if( !aBrief )
|
||||
{
|
||||
aMsg << "Build Info:" << eol;
|
||||
aMsg << indent4 << "Date: " << GetBuildDate() << eol;
|
||||
aMsg << wxT( "Build Info:" ) << eol;
|
||||
aMsg << indent4 << wxT( "Date: " ) << GetBuildDate() << eol;
|
||||
}
|
||||
|
||||
aMsg << indent4 << "wxWidgets: " << wxVERSION_NUM_DOT_STRING << " (";
|
||||
aMsg << __WX_BO_UNICODE __WX_BO_STL __WX_BO_WXWIN_COMPAT_2_8 ")";
|
||||
aMsg << indent4 << wxT( "wxWidgets: " ) << wxVERSION_NUM_DOT_STRING << wxT( " (" );
|
||||
aMsg << __WX_BO_UNICODE __WX_BO_STL __WX_BO_WXWIN_COMPAT_2_8 wxT( ")" );
|
||||
|
||||
// Get the GTK+ version where possible.
|
||||
#ifdef __WXGTK__
|
||||
@@ -166,68 +166,68 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
|
||||
|
||||
major = wxPlatformInfo().Get().GetToolkitMajorVersion();
|
||||
minor = wxPlatformInfo().Get().GetToolkitMinorVersion();
|
||||
aMsg << " GTK+ " << major << "." << minor;
|
||||
aMsg << wxT( " GTK+ " ) << major << wxT( "." ) << minor;
|
||||
#endif
|
||||
|
||||
aMsg << eol;
|
||||
|
||||
aMsg << indent4 << "Boost: " << ( BOOST_VERSION / 100000 ) << wxT( "." )
|
||||
aMsg << indent4 << wxT( "Boost: " ) << ( BOOST_VERSION / 100000 ) << wxT( "." )
|
||||
<< ( BOOST_VERSION / 100 % 1000 ) << wxT( "." )
|
||||
<< ( BOOST_VERSION % 100 ) << eol;
|
||||
|
||||
#ifdef KICAD_USE_OCC
|
||||
aMsg << indent4 << "OCC: " << OCC_VERSION_COMPLETE << eol;
|
||||
aMsg << indent4 << wxT( "OCC: " ) << OCC_VERSION_COMPLETE << eol;
|
||||
#endif
|
||||
|
||||
aMsg << indent4 << "Curl: " << GetCurlLibVersion() << eol;
|
||||
aMsg << indent4 << wxT( "Curl: " ) << GetCurlLibVersion() << eol;
|
||||
|
||||
#if defined( KICAD_SPICE )
|
||||
#if defined( NGSPICE_BUILD_VERSION )
|
||||
aMsg << indent4 << "ngspice: " << NGSPICE_BUILD_VERSION << eol;
|
||||
aMsg << indent4 << wxT( "ngspice: " ) << NGSPICE_BUILD_VERSION << eol;
|
||||
#elif defined( NGSPICE_HAVE_CONFIG_H )
|
||||
#undef HAVE_STRNCASECMP /* is redefined in ngspice/config.h */
|
||||
#include <ngspice/config.h>
|
||||
aMsg << indent4 << "ngspice: " << PACKAGE_VERSION << eol;
|
||||
aMsg << indent4 << wxT( "ngspice: " ) << PACKAGE_VERSION << eol;
|
||||
#elif defined( NGSPICE_PACKAGE_VERSION )
|
||||
aMsg << indent4 << "ngspice: " << NGSPICE_PACKAGE_VERSION << eol;
|
||||
aMsg << indent4 << wxT( "ngspice: " ) << NGSPICE_PACKAGE_VERSION << eol;
|
||||
#else
|
||||
aMsg << indent4 << "ngspice: " << "unknown" << eol;
|
||||
aMsg << indent4 << wxT( "ngspice: " ) << wxT( "unknown" ) << eol;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
aMsg << indent4 << "Compiler: ";
|
||||
aMsg << indent4 << wxT( "Compiler: " );
|
||||
#if defined(__clang__)
|
||||
aMsg << "Clang " << __clang_major__ << "." << __clang_minor__ << "." << __clang_patchlevel__;
|
||||
aMsg << wxT( "Clang " ) << __clang_major__ << wxT( "." ) << __clang_minor__ << wxT( "." ) << __clang_patchlevel__;
|
||||
#elif defined(__GNUG__)
|
||||
aMsg << "GCC " << __GNUC__ << "." << __GNUC_MINOR__ << "." << __GNUC_PATCHLEVEL__;
|
||||
aMsg << wxT( "GCC " ) << __GNUC__ << wxT( "." ) << __GNUC_MINOR__ << wxT( "." ) << __GNUC_PATCHLEVEL__;
|
||||
#elif defined(_MSC_VER)
|
||||
aMsg << "Visual C++ " << _MSC_VER;
|
||||
aMsg << wxT( "Visual C++ " ) << _MSC_VER;
|
||||
#elif defined(__INTEL_COMPILER)
|
||||
aMsg << "Intel C++ " << __INTEL_COMPILER;
|
||||
aMsg << wxT( "Intel C++ " ) << __INTEL_COMPILER;
|
||||
#else
|
||||
aMsg << "Other Compiler ";
|
||||
aMsg << wxT( "Other Compiler " );
|
||||
#endif
|
||||
|
||||
#if defined(__GXX_ABI_VERSION)
|
||||
aMsg << " with C++ ABI " << __GXX_ABI_VERSION << eol;
|
||||
aMsg << wxT( " with C++ ABI " ) << __GXX_ABI_VERSION << eol;
|
||||
#else
|
||||
aMsg << " without C++ ABI" << eol;
|
||||
aMsg << wxT( " without C++ ABI" ) << eol;
|
||||
#endif
|
||||
|
||||
aMsg << eol;
|
||||
|
||||
// Add build settings config (build options):
|
||||
aMsg << "Build settings:" << eol;
|
||||
aMsg << wxT( "Build settings:" ) << eol;
|
||||
|
||||
#ifdef KICAD_USE_OCC
|
||||
aMsg << indent4 << "KICAD_USE_OCC=" << ON;
|
||||
aMsg << indent4 << wxT( "KICAD_USE_OCC=" ) << ON;
|
||||
#endif
|
||||
|
||||
#ifdef KICAD_USE_EGL
|
||||
aMsg << indent4 << "KICAD_USE_EGL=" << ON;
|
||||
aMsg << indent4 << wxT( "KICAD_USE_EGL=" ) << ON;
|
||||
#endif
|
||||
|
||||
aMsg << indent4 << "KICAD_SPICE=";
|
||||
aMsg << indent4 << wxT( "KICAD_SPICE=" );
|
||||
#ifdef KICAD_SPICE
|
||||
aMsg << ON;
|
||||
#else
|
||||
@@ -235,12 +235,12 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
|
||||
#endif
|
||||
|
||||
#ifndef NDEBUG
|
||||
aMsg << indent4 << "KICAD_STDLIB_DEBUG=";
|
||||
aMsg << indent4 << wxT( "KICAD_STDLIB_DEBUG=" );
|
||||
#ifdef KICAD_STDLIB_DEBUG
|
||||
aMsg << ON;
|
||||
#else
|
||||
aMsg << OFF;
|
||||
aMsg << indent4 << "KICAD_STDLIB_LIGHT_DEBUG=";
|
||||
aMsg << indent4 << wxT( "KICAD_STDLIB_LIGHT_DEBUG=" );
|
||||
#ifdef KICAD_STDLIB_LIGHT_DEBUG
|
||||
aMsg << ON;
|
||||
#else
|
||||
@@ -248,14 +248,14 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
aMsg << indent4 << "KICAD_SANITIZE_ADDRESS=";
|
||||
aMsg << indent4 << wxT( "KICAD_SANITIZE_ADDRESS=" );
|
||||
#ifdef KICAD_SANITIZE_ADDRESS
|
||||
aMsg << ON;
|
||||
#else
|
||||
aMsg << OFF;
|
||||
#endif
|
||||
|
||||
aMsg << indent4 << "KICAD_SANITIZE_THREADS=";
|
||||
aMsg << indent4 << wxT( "KICAD_SANITIZE_THREADS=" );
|
||||
#ifdef KICAD_SANITIZE_THREADS
|
||||
aMsg << ON;
|
||||
#else
|
||||
|
||||
+1
-1
@@ -102,7 +102,7 @@ wxString ExpandTextVars( const wxString& aSource,
|
||||
else
|
||||
{
|
||||
// Token not resolved: leave the reference unchanged
|
||||
newbuf.append( "${" + token + "}" );
|
||||
newbuf.append( wxT( "${" ) + token + wxT( "}" ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -404,7 +404,7 @@ void PARAM_CFG_WXSTRING_SET::ReadParam( wxConfigBase* aConfig ) const
|
||||
|
||||
key = m_Ident;
|
||||
key << i;
|
||||
data = aConfig->Read( key, wxT( "" ) );
|
||||
data = aConfig->Read( key, wxEmptyString );
|
||||
|
||||
if( data.IsEmpty() )
|
||||
break;
|
||||
@@ -494,7 +494,7 @@ void PARAM_CFG_LIBNAME_LIST::ReadParam( wxConfigBase* aConfig ) const
|
||||
id_lib = m_Ident;
|
||||
id_lib << indexlib;
|
||||
indexlib++;
|
||||
libname = aConfig->Read( id_lib, wxT( "" ) );
|
||||
libname = aConfig->Read( id_lib, wxEmptyString );
|
||||
|
||||
if( libname.IsEmpty() )
|
||||
break;
|
||||
|
||||
@@ -68,14 +68,14 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
|
||||
|
||||
/* KiCad build version */
|
||||
wxString version;
|
||||
version << ( KIPLATFORM::APP::IsOperatingSystemUnsupported() ? "(UNSUPPORTED)"
|
||||
version << ( KIPLATFORM::APP::IsOperatingSystemUnsupported() ? wxT( "(UNSUPPORTED)" )
|
||||
: GetBuildVersion() )
|
||||
#ifdef DEBUG
|
||||
<< ", debug"
|
||||
<< wxT( ", debug" )
|
||||
#else
|
||||
<< ", release"
|
||||
<< wxT( ", release" )
|
||||
#endif
|
||||
<< " build";
|
||||
<< wxT( " build" );
|
||||
|
||||
aInfo.SetBuildVersion( version );
|
||||
aInfo.SetBuildDate( GetBuildDate() );
|
||||
@@ -93,15 +93,15 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
|
||||
|
||||
// Just in case someone builds KiCad with the platform native of Boost instead of
|
||||
// the version included with the KiCad source.
|
||||
libVersion << "and Boost " << ( BOOST_VERSION / 100000 ) << "."
|
||||
<< ( BOOST_VERSION / 100 % 1000 ) << "." << ( BOOST_VERSION % 100 )
|
||||
<< "\n";
|
||||
libVersion << wxT( "and Boost " ) << ( BOOST_VERSION / 100000 ) << wxT( "." )
|
||||
<< ( BOOST_VERSION / 100 % 1000 ) << wxT( "." ) << ( BOOST_VERSION % 100 )
|
||||
<< wxT( "\n" );
|
||||
|
||||
// Operating System Information
|
||||
|
||||
wxPlatformInfo platformInfo;
|
||||
|
||||
libVersion << "Platform: " << wxGetOsDescription() << ", "
|
||||
libVersion << wxT( "Platform: " ) << wxGetOsDescription() << wxT( ", " )
|
||||
// TODO (ISM): Readd conditional once our wx fork and flatpaks are running released 3.1.5
|
||||
#if 0 && wxCHECK_VERSION( 3, 1, 5 )
|
||||
<< platformInfo.GetBitnessName();
|
||||
@@ -117,64 +117,64 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
|
||||
wxString description;
|
||||
|
||||
/* short description */
|
||||
description << "<p>";
|
||||
description << "<b><u>"
|
||||
description << wxT( "<p>" );
|
||||
description << wxT( "<b><u>" )
|
||||
<< _( "Description" )
|
||||
<< "</u></b>"; // bold & underlined font for caption
|
||||
<< wxT( "</u></b>" ); // bold & underlined font for caption
|
||||
|
||||
description << "<p>"
|
||||
description << wxT( "<p>" )
|
||||
<< _( "The KiCad EDA Suite is a set of open source applications for the "
|
||||
"creation of electronic schematics and printed circuit boards." )
|
||||
<< "</p>";
|
||||
<< wxT( "</p>" );
|
||||
|
||||
description << "</p>";
|
||||
description << wxT( "</p>" );
|
||||
|
||||
/* websites */
|
||||
description << "<p><b><u>"
|
||||
description << wxT( "<p><b><u>" )
|
||||
<< _( "KiCad on the web" )
|
||||
<< "</u></b>"; // bold & underlined font for caption
|
||||
<< wxT( "</u></b>" ); // bold & underlined font for caption
|
||||
|
||||
// bullet-ed list with some http links
|
||||
description << "<ul>";
|
||||
description << "<li>"
|
||||
description << wxT( "<ul>" );
|
||||
description << wxT( "<li>" )
|
||||
<< _( "The official KiCad website - " )
|
||||
<< HtmlHyperlink( "http://www.kicad.org" )
|
||||
<< "</li>";
|
||||
description << "<li>"
|
||||
<< HtmlHyperlink( wxT( "http://www.kicad.org" ) )
|
||||
<< wxT( "</li>" );
|
||||
description << wxT( "<li>" )
|
||||
<< _( "Developer website - " )
|
||||
<< HtmlHyperlink( "https://go.kicad.org/dev" )
|
||||
<< "</li>";
|
||||
<< HtmlHyperlink( wxT( "https://go.kicad.org/dev" ) )
|
||||
<< wxT( "</li>" );
|
||||
|
||||
description << "<li>"
|
||||
description << wxT( "<li>" )
|
||||
<< _("Official KiCad library repositories - " )
|
||||
<< HtmlHyperlink( "https://go.kicad.org/libraries" )
|
||||
<< "</li>";
|
||||
<< HtmlHyperlink( wxT( "https://go.kicad.org/libraries" ) )
|
||||
<< wxT( "</li>" );
|
||||
|
||||
description << "</ul></p>";
|
||||
description << wxT( "</ul></p>" );
|
||||
|
||||
description << "<p><b><u>"
|
||||
description << wxT( "<p><b><u>" )
|
||||
<< _( "Bug tracker" )
|
||||
<< "</u></b>"; // bold & underlined font caption
|
||||
<< wxT( "</u></b>" ); // bold & underlined font caption
|
||||
|
||||
// bullet-ed list with some http links
|
||||
description << "<ul>";
|
||||
description << "<li>"
|
||||
description << wxT( "<ul>" );
|
||||
description << wxT( "<li>" )
|
||||
<< _( "Report or examine bugs - " )
|
||||
<< HtmlHyperlink( "https://go.kicad.org/bugs" )
|
||||
<< "</li>";
|
||||
description << "</ul></p>";
|
||||
<< HtmlHyperlink( wxT( "https://go.kicad.org/bugs" ) )
|
||||
<< wxT( "</li>" );
|
||||
description << wxT( "</ul></p>" );
|
||||
|
||||
description << "<p><b><u>"
|
||||
description << wxT( "<p><b><u>" )
|
||||
<< _( "KiCad users group and community" )
|
||||
<< "</u></b>"; // bold & underlined font caption
|
||||
<< wxT( "</u></b>" ); // bold & underlined font caption
|
||||
|
||||
description << "<ul>";
|
||||
description << "<li>"
|
||||
description << wxT( "<ul>" );
|
||||
description << wxT( "<li>" )
|
||||
<< _( "KiCad forum - " )
|
||||
<< HtmlHyperlink( "https://go.kicad.org/forum" )
|
||||
<< "</li>";
|
||||
<< HtmlHyperlink( wxT( "https://go.kicad.org/forum" ) )
|
||||
<< wxT( "</li>" );
|
||||
|
||||
description << "</ul></p>";
|
||||
description << wxT( "</ul></p>" );
|
||||
|
||||
aInfo.SetDescription( description );
|
||||
|
||||
@@ -182,12 +182,12 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
|
||||
// License information also HTML formatted:
|
||||
wxString license;
|
||||
license
|
||||
<< "<div align='center'>"
|
||||
<< wxT( "<div align='center'>" )
|
||||
<< HtmlNewline( 4 )
|
||||
<< _( "The complete KiCad EDA Suite is released under the" ) << HtmlNewline( 2 )
|
||||
<< HtmlHyperlink( "http://www.gnu.org/licenses",
|
||||
<< HtmlHyperlink( wxT( "http://www.gnu.org/licenses" ),
|
||||
_( "GNU General Public License (GPL) version 3 or any later version" ) )
|
||||
<< "</div>";
|
||||
<< wxT( "</div>" );
|
||||
|
||||
aInfo.SetLicense( license );
|
||||
|
||||
@@ -208,20 +208,20 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
|
||||
#define LEAD_DEV _( "Lead Development Team" )
|
||||
#define FORMER_DEV _( "Lead Development Alumni" )
|
||||
#define CONTRIB_DEV _( "Additional Contributions By")
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( "Jean-Pierre Charras", LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( "Wayne Stambaugh", LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Jean-Pierre Charras" ), LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Wayne Stambaugh" ), LEAD_DEV, nullptr ) );
|
||||
|
||||
// Alphabetical after the first two
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( "Jon Evans", LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Jon Evans" ), LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Roberto Fernandez Bautista" ), LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( "Seth Hillbrand", LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( "Ian McInerney", LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Seth Hillbrand" ), LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Ian McInerney" ), LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Orson (Maciej Sumiński)" ), LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( "Mark Roszko", LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( "Thomas Pointhuber", LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( "Mikolaj Wielgus", LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( "Tomasz Wlostowski", LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( "Jeff Young", LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Mark Roszko" ), LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Thomas Pointhuber" ), LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Mikolaj Wielgus" ), LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Tomasz Wlostowski" ), LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Jeff Young" ), LEAD_DEV, nullptr ) );
|
||||
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "John Beard" ), FORMER_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Dick Hollenbeck" ), FORMER_DEV, nullptr ) );
|
||||
@@ -533,13 +533,13 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Nick Østergaard" ), CONTRIB_DEV, nullptr ) );
|
||||
|
||||
// The document writers
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( "Jean-Pierre Charras" ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( "Marco Ciampa" ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( "Jon Evans" ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( "Dick Hollenbeck" ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( "Igor Plyatov" ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( "Wayne Stambaugh" ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( "Fabrizio Tappero" ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( wxT( "Jean-Pierre Charras" ) ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( wxT( "Marco Ciampa" ) ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( wxT( "Jon Evans" ) ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( wxT( "Dick Hollenbeck" ) ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( wxT( "Igor Plyatov" ) ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( wxT( "Wayne Stambaugh" ) ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( wxT( "Fabrizio Tappero" ) ) );
|
||||
|
||||
/* The translators
|
||||
* As category the language to which the translation was done is used
|
||||
@@ -547,319 +547,339 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Martin Kratoška" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Czech (CS)" ) );
|
||||
wxT( "Czech (CS)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Radek Kuznik" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Czech (CS)" ) );
|
||||
wxT( "Czech (CS)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Roman Ondráček" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Czech (CS)" ) );
|
||||
wxT( "Czech (CS)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Jan Straka" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Czech (CS)" ) );
|
||||
wxT( "Czech (CS)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Jan Vykydal" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Czech (CS)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Jonathan Haas",
|
||||
wxT( "Czech (CS)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Jonathan Haas" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"German (DE)" ) );
|
||||
wxT( "German (DE)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Mark Hämmerling" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"German (DE)" ) );
|
||||
wxT( "German (DE)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Mathias Neumann" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"German (DE)" ) );
|
||||
wxT( "German (DE)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Dominik Wernberger" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"German (DE)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Manolis Stefanis",
|
||||
wxT( "German (DE)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Manolis Stefanis" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Greek (el_GR)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Athanasios Vlastos",
|
||||
wxT( "Greek (el_GR)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Athanasios Vlastos" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Greek (el_GR)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Milonas Kostas",
|
||||
wxT( "Greek (el_GR)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Milonas Kostas" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Greek (el_GR)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Michail Misirlis",
|
||||
wxT( "Greek (el_GR)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Michail Misirlis" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Greek (el_GR)" ) );
|
||||
wxT( "Greek (el_GR)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Adolfo Jayme Barrientos" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Spanish (ES)" ) );
|
||||
wxT( "Spanish (ES)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Roberto Fernandez Bautista" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Spanish (ES)" ) );
|
||||
wxT( "Spanish (ES)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Augusto Fraga Giachero" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Spanish (ES)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Pedro Martin del Valle",
|
||||
wxT( "Spanish (ES)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Pedro Martin del Valle" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Spanish (ES)" ) );
|
||||
wxT( "Spanish (ES)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Iñigo Figuero" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Spanish (ES)" ) );
|
||||
wxT( "Spanish (ES)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Iñigo Zuluaga" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Spanish (ES)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Vesa Solonen",
|
||||
wxT( "Spanish (ES)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Vesa Solonen" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Finnish (FI)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Alex Gellen",
|
||||
wxT( "Finnish (FI)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Alex Gellen" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Finnish (FI)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "J. Lavoie",
|
||||
wxT( "Finnish (FI)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "J. Lavoie" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Finnish (FI)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Purkka Koodari",
|
||||
wxT( "Finnish (FI)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Purkka Koodari" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Finnish (FI)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Ola Rinta-Koski",
|
||||
wxT( "Finnish (FI)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Ola Rinta-Koski" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Finnish (FI)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Riku Viitanen",
|
||||
wxT( "Finnish (FI)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Riku Viitanen" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Finnish (FI)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Simo Mattila",
|
||||
wxT( "Finnish (FI)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Simo Mattila" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Finnish (FI)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Jean-Pierre Charras",
|
||||
wxT( "Finnish (FI)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Jean-Pierre Charras" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"French (FR)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Marco Ciampa",
|
||||
wxT( "French (FR)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Marco Ciampa" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Italian (IT)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Hiroshi Tokita",
|
||||
wxT( "Italian (IT)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Hiroshi Tokita" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Japanese (JA)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Kenta Yonekura",
|
||||
wxT( "Japanese (JA)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Kenta Yonekura" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Japanese (JA)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Ji Yoon Choi",
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Japanese (JA)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Hidemichi Gotou",
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Japanese (JA)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Kaoru Zenyouji",
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Japanese (JA)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Kinichiro Inoguchi",
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Japanese (JA)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Norio Suzuki",
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Japanese (JA)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "starfort-jp",
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Japanese (JA)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "킴슨김랑기" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
wxT( "Japanese (JA)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Ji Yoon Choi" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
wxT( "Japanese (JA)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Hidemichi Gotou" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
wxT( "Japanese (JA)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Kaoru Zenyouji" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
wxT( "Japanese (JA)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Kinichiro Inoguchi" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
wxT( "Japanese (JA)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Norio Suzuki" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
wxT( "Japanese (JA)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "starfort-jp" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
wxT( "Japanese (JA)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "킴슨김랑기" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Ji Yoon Choi" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "jeongsuAn" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "이상수" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "jehunseo" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Uibeom Jung" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "박준언" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "방준영" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "박기정" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "hokim" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "강명구" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "서범기" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Arend-Jan van Hilten",
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Arend-Jan van Hilten" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Dutch (NL)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "CJ van der Hoeven",
|
||||
wxT( "Dutch (NL)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "CJ van der Hoeven" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Dutch (NL)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Pim Jansen",
|
||||
wxT( "Dutch (NL)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Pim Jansen" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Dutch (NL)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Allan Nordhøy",
|
||||
wxT( "Dutch (NL)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Allan Nordhøy" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Norwegian (NO)" ) );
|
||||
wxT( "Norwegian (NO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Mateusz Skowroński" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Polish (PL)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Kerusey Karyu",
|
||||
wxT( "Polish (PL)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Kerusey Karyu" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Polish (PL)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Mark Roszko",
|
||||
wxT( "Polish (PL)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Mark Roszko" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Polish (PL)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "ZbeeGin",
|
||||
wxT( "Polish (PL)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "ZbeeGin" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Polish (PL)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Augusto Fraga Giachero",
|
||||
wxT( "Polish (PL)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Augusto Fraga Giachero" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Brazilian Portuguese (PT_BR)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Wellington Terumi Uemura",
|
||||
wxT( "Brazilian Portuguese (PT_BR)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Wellington Terumi Uemura" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Brazilian Portuguese (PT_BR)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Augusto Fraga Giachero",
|
||||
wxT( "Brazilian Portuguese (PT_BR)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Augusto Fraga Giachero" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Portuguese (PT)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Renie Marquet",
|
||||
wxT( "Portuguese (PT)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Renie Marquet" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Portuguese (PT)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Rafael Silva",
|
||||
wxT( "Portuguese (PT)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Rafael Silva" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Portuguese (PT)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Igor Plyatov",
|
||||
wxT( "Portuguese (PT)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Igor Plyatov" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Russian (RU)" ) );
|
||||
wxT( "Russian (RU)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Дмитрий Дёмин" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Russian (RU)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Andrey Fedorushkov",
|
||||
wxT( "Russian (RU)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Andrey Fedorushkov" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Russian (RU)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Eldar Khayrullin",
|
||||
wxT( "Russian (RU)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Eldar Khayrullin" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Russian (RU)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Konstantin Baranovskiy",
|
||||
wxT( "Russian (RU)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Konstantin Baranovskiy" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Russian (RU)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Axel Henriksson",
|
||||
wxT( "Russian (RU)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Axel Henriksson" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Swedish (SV)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Richard Jonsson",
|
||||
wxT( "Swedish (SV)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Richard Jonsson" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Swedish (SV)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Allan Nordhøy",
|
||||
wxT( "Swedish (SV)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Allan Nordhøy" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Swedish (SV)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Boonchai Kingrungped",
|
||||
wxT( "Swedish (SV)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Boonchai Kingrungped" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Thai (TH)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Liu Guang",
|
||||
wxT( "Thai (TH)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Liu Guang" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Simplified Chinese (zh_CN)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Taotieren",
|
||||
wxT( "Simplified Chinese (zh_CN)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Taotieren" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Simplified Chinese (zh_CN)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Dingzhong Chen",
|
||||
wxT( "Simplified Chinese (zh_CN)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Dingzhong Chen" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Simplified Chinese (zh_CN)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "David Chen",
|
||||
wxT( "Simplified Chinese (zh_CN)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "David Chen" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Simplified Chinese (zh_CN)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Rigo Ligo",
|
||||
wxT( "Simplified Chinese (zh_CN)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Rigo Ligo" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Simplified Chinese (zh_CN)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Tian Yunhao",
|
||||
wxT( "Simplified Chinese (zh_CN)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Tian Yunhao" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Simplified Chinese (zh_CN)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "David Chen",
|
||||
wxT( "Simplified Chinese (zh_CN)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "David Chen" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Traditional Chinese (zh_TW)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "kai chiao chuang",
|
||||
wxT( "Traditional Chinese (zh_TW)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "kai chiao chuang" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Traditional Chinese (zh_TW)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Taotieren",
|
||||
wxT( "Traditional Chinese (zh_TW)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Taotieren" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Traditional Chinese (zh_TW)" ) );
|
||||
wxT( "Traditional Chinese (zh_TW)" ) ) );
|
||||
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Remy Halvick" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
wxT( "Other" ) ) );
|
||||
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "David J S Briscoe" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
wxT( "Other" ) ) );
|
||||
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Dominique Laigle" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
wxT( "Other" ) ) );
|
||||
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Paul Burke" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
wxT( "Other" ) ) );
|
||||
|
||||
|
||||
// Program credits for 3d models
|
||||
@@ -879,33 +899,33 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
|
||||
aInfo.AddLibrarian( new CONTRIBUTOR( wxT( "Evan Shultz"), LIBRARIANS, aInfo.CreateKiBitmap( BITMAPS::library ) ) );
|
||||
|
||||
#define MODELS_3D_CONTRIBUTION _( "3D models by" )
|
||||
aInfo.AddLibrarian( new CONTRIBUTOR( "Scripts by Maui",
|
||||
"https://github.com/easyw",
|
||||
"https://gitlab.com/kicad/libraries/kicad-packages3D-generator",
|
||||
aInfo.AddLibrarian( new CONTRIBUTOR( wxT( "Scripts by Maui" ),
|
||||
wxT( "https://github.com/easyw" ),
|
||||
wxT( "https://gitlab.com/kicad/libraries/kicad-packages3D-generator" ),
|
||||
MODELS_3D_CONTRIBUTION,
|
||||
aInfo.CreateKiBitmap( BITMAPS::three_d ) ) );
|
||||
aInfo.AddLibrarian( new CONTRIBUTOR( "GitLab contributors",
|
||||
aInfo.AddLibrarian( new CONTRIBUTOR( wxT( "GitLab contributors" ),
|
||||
wxEmptyString,
|
||||
"https://gitlab.com/kicad/libraries/kicad-packages3D/-/graphs/master",
|
||||
wxT( "https://gitlab.com/kicad/libraries/kicad-packages3D/-/graphs/master" ),
|
||||
MODELS_3D_CONTRIBUTION,
|
||||
aInfo.CreateKiBitmap( BITMAPS::three_d ) ) );
|
||||
|
||||
#define SYMBOL_LIB_CONTRIBUTION _( "Symbols by" )
|
||||
aInfo.AddLibrarian( new CONTRIBUTOR( "GitLab contributors",
|
||||
aInfo.AddLibrarian( new CONTRIBUTOR( wxT( "GitLab contributors" ),
|
||||
wxEmptyString,
|
||||
"https://gitlab.com/kicad/libraries/kicad-symbols/-/graphs/master",
|
||||
wxT( "https://gitlab.com/kicad/libraries/kicad-symbols/-/graphs/master" ),
|
||||
SYMBOL_LIB_CONTRIBUTION,
|
||||
aInfo.CreateKiBitmap( BITMAPS::add_component ) ) );
|
||||
|
||||
#define FOOTPRINT_LIB_CONTRIBUTION _( "Footprints by" )
|
||||
aInfo.AddLibrarian( new CONTRIBUTOR( "Scripts by Thomas Pointhuber",
|
||||
aInfo.AddLibrarian( new CONTRIBUTOR( wxT( "Scripts by Thomas Pointhuber" ),
|
||||
wxEmptyString,
|
||||
"https://gitlab.com/kicad/libraries/kicad-footprint-generator",
|
||||
wxT( "https://gitlab.com/kicad/libraries/kicad-footprint-generator" ),
|
||||
FOOTPRINT_LIB_CONTRIBUTION,
|
||||
aInfo.CreateKiBitmap( BITMAPS::module ) ) );
|
||||
aInfo.AddLibrarian( new CONTRIBUTOR( "GitLab contributors",
|
||||
aInfo.AddLibrarian( new CONTRIBUTOR( wxT( "GitLab contributors" ),
|
||||
wxEmptyString,
|
||||
"https://gitlab.com/kicad/libraries/kicad-footprints/-/graphs/master",
|
||||
wxT( "https://gitlab.com/kicad/libraries/kicad-footprints/-/graphs/master" ),
|
||||
FOOTPRINT_LIB_CONTRIBUTION,
|
||||
aInfo.CreateKiBitmap( BITMAPS::module ) ) );
|
||||
|
||||
@@ -919,16 +939,16 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
ICON_CONTRIBUTION ) );
|
||||
aInfo.AddArtist( new CONTRIBUTOR( "Fabrizio Tappero",
|
||||
aInfo.AddArtist( new CONTRIBUTOR( wxT( "Fabrizio Tappero" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
ICON_CONTRIBUTION ) );
|
||||
|
||||
// Program credits for package developers.
|
||||
aInfo.AddPackager( new CONTRIBUTOR( "Steven Falco" ) );
|
||||
aInfo.AddPackager( new CONTRIBUTOR( "Jean-Samuel Reynaud" ) );
|
||||
aInfo.AddPackager( new CONTRIBUTOR( "Bernhard Stegmaier" ) );
|
||||
aInfo.AddPackager( new CONTRIBUTOR( "Adam Wolf" ) );
|
||||
aInfo.AddPackager( new CONTRIBUTOR( wxT( "Steven Falco" ) ) );
|
||||
aInfo.AddPackager( new CONTRIBUTOR( wxT( "Jean-Samuel Reynaud" ) ) );
|
||||
aInfo.AddPackager( new CONTRIBUTOR( wxT( "Bernhard Stegmaier" ) ) );
|
||||
aInfo.AddPackager( new CONTRIBUTOR( wxT( "Adam Wolf" ) ) );
|
||||
aInfo.AddPackager( new CONTRIBUTOR( wxT( "Nick Østergaard" ) ) );
|
||||
}
|
||||
|
||||
@@ -961,9 +981,9 @@ static wxString HtmlHyperlink( const wxString& aUrl, const wxString& aDescriptio
|
||||
wxString hyperlink = wxEmptyString;
|
||||
|
||||
if( aDescription.IsEmpty() )
|
||||
hyperlink << "<a href='" << aUrl << "'>" << aUrl << "</a>";
|
||||
hyperlink << wxT( "<a href='" ) << aUrl << wxT( "'>" ) << aUrl << wxT( "</a>" );
|
||||
else
|
||||
hyperlink << "<a href='" << aUrl << "'>" << aDescription << "</a>";
|
||||
hyperlink << wxT( "<a href='" ) << aUrl << wxT( "'>" ) << aDescription << wxT( "</a>" );
|
||||
|
||||
return hyperlink;
|
||||
}
|
||||
@@ -981,7 +1001,7 @@ static wxString HtmlNewline( const unsigned int aCount )
|
||||
wxString newlineTags = wxEmptyString;
|
||||
|
||||
for( size_t i = 0; i<aCount; ++i )
|
||||
newlineTags << "<br>";
|
||||
newlineTags << wxT( "<br>" );
|
||||
|
||||
return newlineTags;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ DIALOG_ABOUT::DIALOG_ABOUT( EDA_BASE_FRAME *aParent, ABOUT_APP_INFO& aAppInfo )
|
||||
m_titleName = aParent->GetAboutTitle();
|
||||
m_staticTextAppTitle->SetLabel( m_titleName );
|
||||
m_staticTextCopyright->SetLabel( m_info.GetCopyright() );
|
||||
m_staticTextBuildVersion->SetLabel( "Version: " + m_info.GetBuildVersion() );
|
||||
m_staticTextBuildVersion->SetLabel( wxT( "Version: " ) + m_info.GetBuildVersion() );
|
||||
m_staticTextLibVersion->SetLabel( m_info.GetLibVersion() );
|
||||
|
||||
SetTitle( wxString::Format( _( "About %s" ), m_titleName ) );
|
||||
@@ -222,7 +222,7 @@ void DIALOG_ABOUT::createNotebookPageByCategory( wxNotebook* aParent, const wxSt
|
||||
// Of course the padding is different depending on the platform so we adjust the
|
||||
// padding accordingly.
|
||||
#if defined( __WXGTK__ )
|
||||
padding += " ";
|
||||
padding += wxT( " " );
|
||||
#endif
|
||||
wxPanel* outerPanel = new wxPanel( aParent );
|
||||
wxBoxSizer* outerSizer = new wxBoxSizer( wxVERTICAL );
|
||||
@@ -419,7 +419,7 @@ void DIALOG_ABOUT::createNotebookHtmlPage( wxNotebook* aParent, const wxString&
|
||||
wxStaticText* DIALOG_ABOUT::wxStaticTextRef( wxScrolledWindow* aParent, const wxString& aReference )
|
||||
{
|
||||
wxStaticText* text = new wxStaticText( aParent, wxID_ANY,
|
||||
wxT( "(" ) + aReference + wxT( ")" ) );
|
||||
wxT( "(wxT( " ) + aReference + wxT( " ))" ) );
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
@@ -399,8 +399,8 @@ void DIALOG_SHIM::OnPaint( wxPaintEvent &event )
|
||||
|
||||
void DIALOG_SHIM::OnModify()
|
||||
{
|
||||
if( !GetTitle().StartsWith( "*" ) )
|
||||
SetTitle( "*" + GetTitle() );
|
||||
if( !GetTitle().StartsWith( wxT( "*" ) ) )
|
||||
SetTitle( wxT( "*" ) + GetTitle() );
|
||||
}
|
||||
|
||||
|
||||
@@ -488,8 +488,8 @@ void DIALOG_SHIM::EndQuasiModal( int retCode )
|
||||
|
||||
if( !IsQuasiModal() )
|
||||
{
|
||||
wxFAIL_MSG( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal"
|
||||
"wasn't called" );
|
||||
wxFAIL_MSG( wxT( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal" )
|
||||
wxT( "wasn't called" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ bool DIALOG_CONFIGURE_PATHS::TransferDataToWindow()
|
||||
|
||||
for( auto it = paths->begin(); it != paths->end(); ++it )
|
||||
{
|
||||
if ( !( *it ).m_Alias.StartsWith( "${" ) && !( *it ).m_Alias.StartsWith( "$(" ) )
|
||||
if ( !( *it ).m_Alias.StartsWith( wxT( "${" ) ) && !( *it ).m_Alias.StartsWith( wxT( "$(" ) ) )
|
||||
{
|
||||
AppendSearchPath( it->m_Alias, it->m_Pathvar, it->m_Description );
|
||||
|
||||
@@ -172,7 +172,7 @@ bool DIALOG_CONFIGURE_PATHS::TransferDataToWindow()
|
||||
const wxString& path = it->second.GetValue();
|
||||
AppendEnvVar( it->first, path, it->second.GetDefinedExternally() );
|
||||
|
||||
if( m_curdir.IsEmpty() && !path.StartsWith( "${" ) && !path.StartsWith( "$(" ) )
|
||||
if( m_curdir.IsEmpty() && !path.StartsWith( wxT( "${" ) ) && !path.StartsWith( wxT( "$(" ) ) )
|
||||
m_curdir = path;
|
||||
}
|
||||
|
||||
@@ -639,19 +639,19 @@ void DIALOG_CONFIGURE_PATHS::OnHelp( wxCommandEvent& event )
|
||||
"level. Environment variables defined at the system or user level "
|
||||
"take precedence over the ones defined in this table. This means the "
|
||||
"values in this table are ignored." );
|
||||
msg << "<br><br><b>";
|
||||
msg << wxT( "<br><br><b>" );
|
||||
msg << _( "To ensure environment variable names are valid on all platforms, the name field "
|
||||
"will only accept upper case letters, digits, and the underscore characters." );
|
||||
msg << "</b>";
|
||||
msg << wxT( "</b>" );
|
||||
|
||||
for( const auto& var : ENV_VAR::GetPredefinedEnvVars() )
|
||||
{
|
||||
msg << "<br><br><b>" << var << "</b>";
|
||||
msg << wxT( "<br><br><b>" ) << var << wxT( "</b>" );
|
||||
|
||||
const auto desc = ENV_VAR::LookUpEnvVarHelp( var );
|
||||
|
||||
if( desc.size() > 0 )
|
||||
msg << ": " << desc;
|
||||
msg << wxT( ": " ) << desc;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ DIALOG_PASTE_SPECIAL::DIALOG_PASTE_SPECIAL( wxWindow* aParent,
|
||||
"any designators that already exist in the design." ) );
|
||||
|
||||
m_pasteOptions->SetItemToolTip( static_cast<int>( PASTE_MODE::KEEP_ANNOTATIONS ),
|
||||
wxT( "" ) ); // Self explanatory
|
||||
wxEmptyString ); // Self explanatory
|
||||
|
||||
m_pasteOptions->SetItemToolTip( static_cast<int>( PASTE_MODE::REMOVE_ANNOTATIONS ),
|
||||
wxString::Format( _( "Replaces reference designators "
|
||||
|
||||
@@ -144,32 +144,32 @@ PANEL_COMMON_SETTINGS::PANEL_COMMON_SETTINGS( DIALOG_SHIM* aDialog, wxWindow* aP
|
||||
|
||||
if( m_iconScaleSlider )
|
||||
{
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_TOP,
|
||||
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_TOP,
|
||||
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
|
||||
nullptr, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_BOTTOM,
|
||||
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_BOTTOM,
|
||||
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
|
||||
nullptr, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_LINEUP,
|
||||
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_LINEUP,
|
||||
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
|
||||
nullptr, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_LINEDOWN,
|
||||
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
|
||||
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
|
||||
nullptr, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_PAGEUP,
|
||||
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
|
||||
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
|
||||
nullptr, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_PAGEDOWN,
|
||||
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
|
||||
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
|
||||
nullptr, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_THUMBTRACK,
|
||||
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_THUMBTRACK,
|
||||
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
|
||||
nullptr, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_THUMBRELEASE,
|
||||
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_THUMBRELEASE,
|
||||
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
|
||||
nullptr, this );
|
||||
m_iconScaleSlider->Connect( wxEVT_SCROLL_CHANGED,
|
||||
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
|
||||
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
|
||||
nullptr, this );
|
||||
m_iconScaleAuto->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED,
|
||||
wxCommandEventHandler( PANEL_COMMON_SETTINGS::OnIconScaleAuto ),
|
||||
@@ -241,6 +241,7 @@ bool PANEL_COMMON_SETTINGS::TransferDataToWindow()
|
||||
m_defaultPDFViewer->SetValue( Pgm().UseSystemPdfBrowser() );
|
||||
m_otherPDFViewer->SetValue( !Pgm().UseSystemPdfBrowser() );
|
||||
m_PDFViewerPath->SetValue( Pgm().GetPdfBrowserName() );
|
||||
setPdfViewerPathState();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -316,6 +317,7 @@ void PANEL_COMMON_SETTINGS::ResetPanel()
|
||||
m_defaultPDFViewer->SetValue( defaultSettings.m_System.use_system_pdf_viewer );
|
||||
m_otherPDFViewer->SetValue( !defaultSettings.m_System.use_system_pdf_viewer );
|
||||
m_PDFViewerPath->SetValue( defaultSettings.m_System.pdf_viewer_name );
|
||||
setPdfViewerPathState();
|
||||
}
|
||||
|
||||
|
||||
@@ -464,8 +466,14 @@ void PANEL_COMMON_SETTINGS::OnPDFViewerClick( wxCommandEvent& event )
|
||||
}
|
||||
|
||||
|
||||
void PANEL_COMMON_SETTINGS::onUpdateUIPdfPath( wxUpdateUIEvent& event )
|
||||
void PANEL_COMMON_SETTINGS::OnRadioButtonPdfViewer( wxCommandEvent& aEvent )
|
||||
{
|
||||
// Used by both the m_pdfViewerBtn and m_PDFViewerPath
|
||||
event.Enable( m_otherPDFViewer->GetValue() );
|
||||
setPdfViewerPathState();
|
||||
}
|
||||
|
||||
|
||||
void PANEL_COMMON_SETTINGS::setPdfViewerPathState()
|
||||
{
|
||||
m_PDFViewerPath->Enable( m_otherPDFViewer->GetValue() );
|
||||
m_pdfViewerBtn->Enable( m_otherPDFViewer->GetValue() );
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.0-4761b0c5)
|
||||
// C++ code generated with wxFormBuilder (version 3.10.0-4761b0c)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -326,9 +326,9 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
|
||||
|
||||
// Connect Events
|
||||
m_textEditorBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnTextEditorClick ), NULL, this );
|
||||
m_PDFViewerPath->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_COMMON_SETTINGS_BASE::onUpdateUIPdfPath ), NULL, this );
|
||||
m_defaultPDFViewer->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnRadioButtonPdfViewer ), NULL, this );
|
||||
m_otherPDFViewer->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnRadioButtonPdfViewer ), NULL, this );
|
||||
m_pdfViewerBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnPDFViewerClick ), NULL, this );
|
||||
m_pdfViewerBtn->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_COMMON_SETTINGS_BASE::onUpdateUIPdfPath ), NULL, this );
|
||||
m_canvasScaleAuto->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnCanvasScaleAuto ), NULL, this );
|
||||
}
|
||||
|
||||
@@ -336,9 +336,9 @@ PANEL_COMMON_SETTINGS_BASE::~PANEL_COMMON_SETTINGS_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
m_textEditorBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnTextEditorClick ), NULL, this );
|
||||
m_PDFViewerPath->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_COMMON_SETTINGS_BASE::onUpdateUIPdfPath ), NULL, this );
|
||||
m_defaultPDFViewer->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnRadioButtonPdfViewer ), NULL, this );
|
||||
m_otherPDFViewer->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnRadioButtonPdfViewer ), NULL, this );
|
||||
m_pdfViewerBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnPDFViewerClick ), NULL, this );
|
||||
m_pdfViewerBtn->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_COMMON_SETTINGS_BASE::onUpdateUIPdfPath ), NULL, this );
|
||||
m_canvasScaleAuto->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnCanvasScaleAuto ), NULL, this );
|
||||
|
||||
}
|
||||
|
||||
@@ -662,6 +662,7 @@
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnRadioButton">OnRadioButtonPdfViewer</event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
@@ -737,6 +738,7 @@
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnRadioButton">OnRadioButtonPdfViewer</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
@@ -801,7 +803,6 @@
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnUpdateUI">onUpdateUIPdfPath</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
@@ -876,7 +877,6 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnPDFViewerClick</event>
|
||||
<event name="OnUpdateUI">onUpdateUIPdfPath</event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.10.0-4761b0c5)
|
||||
// C++ code generated with wxFormBuilder (version 3.10.0-4761b0c)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@@ -88,7 +88,7 @@ class PANEL_COMMON_SETTINGS_BASE : public RESETTABLE_PANEL
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
virtual void OnTextEditorClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onUpdateUIPdfPath( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void OnRadioButtonPdfViewer( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnPDFViewerClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnCanvasScaleAuto( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@ void PANEL_HOTKEYS_EDITOR::dumpHotkeys()
|
||||
|
||||
wxFileName fn( filename );
|
||||
|
||||
wxFFileOutputStream fileStream( fn.GetFullPath(), "w" );
|
||||
wxFFileOutputStream fileStream( fn.GetFullPath(), wxT( "w" ) );
|
||||
wxTextOutputStream stream( fileStream );
|
||||
|
||||
if( !fn.IsDirWritable() || ( fn.Exists() && !fn.IsFileWritable() ) )
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <pgm_base.h>
|
||||
#include <base_units.h>
|
||||
#include <eda_draw_frame.h>
|
||||
#include <bitmaps.h>
|
||||
#include <netclass.h>
|
||||
#include <confirm.h>
|
||||
@@ -69,11 +70,13 @@ std::vector<BITMAPS> g_lineStyleIcons;
|
||||
wxArrayString g_lineStyleNames;
|
||||
|
||||
|
||||
PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( PAGED_DIALOG* aParent, NETCLASSES* aNetclasses,
|
||||
PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( PAGED_DIALOG* aParent, EDA_DRAW_FRAME* aFrame,
|
||||
NETCLASSES* aNetclasses,
|
||||
const std::vector<wxString>& aNetNames,
|
||||
bool aIsEEschema ) :
|
||||
PANEL_SETUP_NETCLASSES_BASE( aParent->GetTreebook() ),
|
||||
m_Parent( aParent ),
|
||||
m_frame( aFrame ),
|
||||
m_parent( aParent ),
|
||||
m_netclasses( aNetclasses ),
|
||||
m_netNames( aNetNames ),
|
||||
m_hoveredCol( -1 )
|
||||
@@ -185,6 +188,8 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( PAGED_DIALOG* aParent, NETCLASSE
|
||||
&PANEL_SETUP_NETCLASSES::OnNetclassGridMouseEvent,
|
||||
this );
|
||||
|
||||
m_frame->Bind( UNITS_CHANGED, &PANEL_SETUP_NETCLASSES::onUnitsChanged, this );
|
||||
|
||||
m_netclassGrid->EndBatch();
|
||||
m_membershipGrid->EndBatch();
|
||||
Thaw();
|
||||
@@ -205,6 +210,24 @@ PANEL_SETUP_NETCLASSES::~PANEL_SETUP_NETCLASSES()
|
||||
m_netclassGrid->Disconnect( wxEVT_GRID_CELL_CHANGING,
|
||||
wxGridEventHandler( PANEL_SETUP_NETCLASSES::OnNetclassGridCellChanging ),
|
||||
nullptr, this );
|
||||
|
||||
m_frame->Unbind( UNITS_CHANGED, &PANEL_SETUP_NETCLASSES::onUnitsChanged, this );
|
||||
}
|
||||
|
||||
|
||||
void PANEL_SETUP_NETCLASSES::onUnitsChanged( wxCommandEvent& aEvent )
|
||||
{
|
||||
NETCLASSES tempNetClasses;
|
||||
NETCLASSES* saveNetClasses = m_netclasses;
|
||||
|
||||
m_netclasses = &tempNetClasses; // No, address of stack var does not escape function
|
||||
|
||||
TransferDataFromWindow();
|
||||
TransferDataToWindow();
|
||||
|
||||
m_netclasses = saveNetClasses;
|
||||
|
||||
aEvent.Skip();
|
||||
}
|
||||
|
||||
|
||||
@@ -251,7 +274,7 @@ bool PANEL_SETUP_NETCLASSES::TransferDataToWindow()
|
||||
m_netclassGrid->AppendRows((int) m_netclasses->GetCount() + 1 ); // + 1 for default netclass
|
||||
|
||||
// enter the Default NETCLASS.
|
||||
netclassToGridRow( m_Parent->GetUserUnits(), m_netclassGrid, 0, m_netclasses->GetDefault() );
|
||||
netclassToGridRow( m_frame->GetUserUnits(), m_netclassGrid, 0, m_netclasses->GetDefault() );
|
||||
|
||||
// make the Default NETCLASS name read-only
|
||||
wxGridCellAttr* cellAttr = m_netclassGrid->GetOrCreateCellAttr( 0, GRID_NAME );
|
||||
@@ -265,7 +288,7 @@ bool PANEL_SETUP_NETCLASSES::TransferDataToWindow()
|
||||
{
|
||||
NETCLASSPTR netclass = i->second;
|
||||
|
||||
netclassToGridRow( m_Parent->GetUserUnits(), m_netclassGrid, row, netclass );
|
||||
netclassToGridRow( m_frame->GetUserUnits(), m_netclassGrid, row, netclass );
|
||||
|
||||
for( const wxString& net : *netclass )
|
||||
{
|
||||
@@ -361,7 +384,7 @@ static void gridRowToNetclass( EDA_UNITS aUnits, wxGrid* grid, int row, const NE
|
||||
nc->SetSchematicColor( wxColour( grid->GetCellValue( row, GRID_SCHEMATIC_COLOR ) ) );
|
||||
|
||||
nc->SetLineStyle( g_lineStyleNames.Index( grid->GetCellValue( row, GRID_LINESTYLE ) ) );
|
||||
wxASSERT_MSG( nc->GetLineStyle() >= 0, "Line style name not found." );
|
||||
wxASSERT_MSG( nc->GetLineStyle() >= 0, wxT( "Line style name not found." ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -373,7 +396,7 @@ bool PANEL_SETUP_NETCLASSES::TransferDataFromWindow()
|
||||
m_netclasses->Clear();
|
||||
|
||||
// Copy the default NetClass:
|
||||
gridRowToNetclass( m_Parent->GetUserUnits(), m_netclassGrid, 0, m_netclasses->GetDefault() );
|
||||
gridRowToNetclass( m_frame->GetUserUnits(), m_netclassGrid, 0, m_netclasses->GetDefault() );
|
||||
|
||||
// Copy other NetClasses:
|
||||
for( int row = 1; row < m_netclassGrid->GetNumberRows(); ++row )
|
||||
@@ -382,7 +405,7 @@ bool PANEL_SETUP_NETCLASSES::TransferDataFromWindow()
|
||||
GRID_NAME ) );
|
||||
|
||||
if( m_netclasses->Add( nc ) )
|
||||
gridRowToNetclass( m_Parent->GetUserUnits(), m_netclassGrid, row, nc );
|
||||
gridRowToNetclass( m_frame->GetUserUnits(), m_netclassGrid, row, nc );
|
||||
}
|
||||
|
||||
// Now read all nets and push them in the corresponding netclass net buffer
|
||||
@@ -415,7 +438,7 @@ bool PANEL_SETUP_NETCLASSES::validateNetclassName( int aRow, const wxString& aNa
|
||||
if( tmp.IsEmpty() )
|
||||
{
|
||||
wxString msg = _( "Netclass must have a name." );
|
||||
m_Parent->SetError( msg, this, m_netclassGrid, aRow, GRID_NAME );
|
||||
m_parent->SetError( msg, this, m_netclassGrid, aRow, GRID_NAME );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -424,7 +447,7 @@ bool PANEL_SETUP_NETCLASSES::validateNetclassName( int aRow, const wxString& aNa
|
||||
if( ii != aRow && m_netclassGrid->GetCellValue( ii, GRID_NAME ).CmpNoCase( tmp ) == 0 )
|
||||
{
|
||||
wxString msg = _( "Netclass name already in use." );
|
||||
m_Parent->SetError( msg, this, m_netclassGrid, focusFirst ? aRow : ii, GRID_NAME );
|
||||
m_parent->SetError( msg, this, m_netclassGrid, focusFirst ? aRow : ii, GRID_NAME );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ PANEL_SETUP_SEVERITIES::PANEL_SETUP_SEVERITIES( PAGED_DIALOG* aParent,
|
||||
|
||||
if( m_pinMapSpecialCase )
|
||||
{
|
||||
wxString pinMapSeverities[] = { _( "From Pin Conflicts Map" ), wxT( "" ), _( "Ignore" ) };
|
||||
wxString pinMapSeverities[] = { _( "From Pin Conflicts Map" ), wxEmptyString, _( "Ignore" ) };
|
||||
int errorCode = m_pinMapSpecialCase->GetErrorCode();
|
||||
wxString msg = m_pinMapSpecialCase->GetErrorText();
|
||||
|
||||
@@ -123,9 +123,9 @@ PANEL_SETUP_SEVERITIES::PANEL_SETUP_SEVERITIES( PAGED_DIALOG* aParent,
|
||||
|
||||
for( size_t i = 0; i < 3; ++i )
|
||||
{
|
||||
if( pinMapSeverities[i] == wxT( "" ) )
|
||||
if( pinMapSeverities[i] == wxEmptyString )
|
||||
{
|
||||
wxStaticText* spacer = new wxStaticText( radioPanel, wxID_ANY, wxT( "" ) );
|
||||
wxStaticText* spacer = new wxStaticText( radioPanel, wxID_ANY, wxEmptyString );
|
||||
radioSizer->Add( spacer, 0, wxRIGHT | wxEXPAND, 17 );
|
||||
}
|
||||
else
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
#include <wx/menu.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <kiway_holder.h>
|
||||
#include <project.h>
|
||||
|
||||
WX_HTML_REPORT_PANEL::WX_HTML_REPORT_PANEL( wxWindow* parent, wxWindowID id, const wxPoint& pos,
|
||||
const wxSize& size, long style ) :
|
||||
@@ -187,20 +189,20 @@ wxString WX_HTML_REPORT_PANEL::generateHtml( const REPORT_LINE& aLine )
|
||||
switch( aLine.severity )
|
||||
{
|
||||
case RPT_SEVERITY_ERROR:
|
||||
retv = "<font color=#F04040 size=3>" + _( "Error:" ) + " </font>"
|
||||
"<font size=3>" + aLine.message + "</font><br>";
|
||||
retv = wxT( "<font color=#F04040 size=3>" ) + _( "Error:" ) + " </font>"
|
||||
wxT( "<font size=3>" ) + aLine.message + wxT( "</font><br>" );
|
||||
break;
|
||||
case RPT_SEVERITY_WARNING:
|
||||
retv = "<font size=3>" + _( "Warning:" ) + wxS( " " ) + aLine.message + "</font><br>";
|
||||
retv = wxT( "<font size=3>" ) + _( "Warning:" ) + wxS( " " ) + aLine.message + "</font><br>";
|
||||
break;
|
||||
case RPT_SEVERITY_INFO:
|
||||
retv = "<font color=#909090 size=3>" + aLine.message + "</font><br>";
|
||||
retv = wxT( "<font color=#909090 size=3>" ) + aLine.message + wxT( "</font><br>" );
|
||||
break;
|
||||
case RPT_SEVERITY_ACTION:
|
||||
retv = "<font color=#60D060 size=3>" + aLine.message + "</font><br>";
|
||||
retv = wxT( "<font color=#60D060 size=3>" ) + aLine.message + wxT( "</font><br>" );
|
||||
break;
|
||||
default:
|
||||
retv = "<font size=3>" + aLine.message + "</font><br>";
|
||||
retv = wxT( "<font size=3>" ) + aLine.message + wxT( "</font><br>" );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -208,26 +210,26 @@ wxString WX_HTML_REPORT_PANEL::generateHtml( const REPORT_LINE& aLine )
|
||||
switch( aLine.severity )
|
||||
{
|
||||
case RPT_SEVERITY_ERROR:
|
||||
retv = "<font color=#D00000 size=3>" + _( "Error:" ) + " </font>"
|
||||
"<font size=3>" + aLine.message + "</font><br>";
|
||||
retv = wxT( "<font color=#D00000 size=3>" ) + _( "Error:" ) + " </font>"
|
||||
wxT( "<font size=3>" ) + aLine.message + wxT( "</font><br>" );
|
||||
break;
|
||||
case RPT_SEVERITY_WARNING:
|
||||
retv = "<font size=3>" + _( "Warning:" ) + wxS( " " ) + aLine.message + "</font><br>";
|
||||
retv = wxT( "<font size=3>" ) + _( "Warning:" ) + wxS( " " ) + aLine.message + "</font><br>";
|
||||
break;
|
||||
case RPT_SEVERITY_INFO:
|
||||
retv = "<font color=#808080 size=3>" + aLine.message + "</font><br>";
|
||||
retv = wxT( "<font color=#808080 size=3>" ) + aLine.message + wxT( "</font><br>" );
|
||||
break;
|
||||
case RPT_SEVERITY_ACTION:
|
||||
retv = "<font color=#008000 size=3>" + aLine.message + "</font><br>";
|
||||
retv = wxT( "<font color=#008000 size=3>" ) + aLine.message + wxT( "</font><br>" );
|
||||
break;
|
||||
default:
|
||||
retv = "<font size=3>" + aLine.message + "</font><br>";
|
||||
retv = wxT( "<font size=3>" ) + aLine.message + wxT( "</font><br>" );
|
||||
}
|
||||
}
|
||||
|
||||
// wxHtmlWindow fails to do correct baseline alignment between Japanese/Chinese cells and
|
||||
// Roman cells. This keeps the line in a single cell.
|
||||
retv.Replace( " ", " " );
|
||||
retv.Replace( wxT( " " ), wxT( " " ) );
|
||||
|
||||
return retv;
|
||||
}
|
||||
@@ -248,7 +250,7 @@ wxString WX_HTML_REPORT_PANEL::generatePlainText( const REPORT_LINE& aLine )
|
||||
void WX_HTML_REPORT_PANEL::onRightClick( wxMouseEvent& event )
|
||||
{
|
||||
wxMenu popup;
|
||||
popup.Append( wxID_COPY, "Copy" );
|
||||
popup.Append( wxID_COPY, wxT( "Copy" ) );
|
||||
PopupMenu( &popup );
|
||||
}
|
||||
|
||||
@@ -352,7 +354,14 @@ void WX_HTML_REPORT_PANEL::onBtnSaveToFile( wxCommandEvent& event )
|
||||
wxFileName fn;
|
||||
|
||||
if( m_reportFileName.empty() )
|
||||
fn = wxT( "./report.txt" );
|
||||
{
|
||||
fn = wxT( "report.txt" );
|
||||
|
||||
KIWAY_HOLDER* parent = dynamic_cast<KIWAY_HOLDER*>( m_parent );
|
||||
|
||||
if( parent )
|
||||
fn.SetPath( parent->Prj().GetProjectPath() );
|
||||
}
|
||||
else
|
||||
fn = m_reportFileName;
|
||||
|
||||
@@ -367,7 +376,7 @@ void WX_HTML_REPORT_PANEL::onBtnSaveToFile( wxCommandEvent& event )
|
||||
if( fn.GetExt().IsEmpty() )
|
||||
fn.SetExt( "txt" );
|
||||
|
||||
wxFFile f( fn.GetFullPath(), "wb" );
|
||||
wxFFile f( fn.GetFullPath(), wxT( "wb" ) );
|
||||
|
||||
if( !f.IsOpened() )
|
||||
{
|
||||
|
||||
@@ -94,6 +94,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin
|
||||
|
||||
ShowScrollbars( wxSHOW_SB_ALWAYS, wxSHOW_SB_ALWAYS );
|
||||
EnableScrolling( false, false ); // otherwise Zoom Auto disables GAL canvas
|
||||
KIPLATFORM::UI::SetOverlayScrolling( this, false ); // Prevent excessive repaint on GTK
|
||||
|
||||
Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), nullptr, this );
|
||||
Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( EDA_DRAW_PANEL_GAL::onEnter ), nullptr,
|
||||
@@ -212,7 +213,19 @@ void EDA_DRAW_PANEL_GAL::DoRePaint()
|
||||
try
|
||||
{
|
||||
cntUpd.Start();
|
||||
m_view->UpdateItems();
|
||||
try
|
||||
{
|
||||
m_view->UpdateItems();
|
||||
}
|
||||
catch( std::out_of_range& err )
|
||||
{
|
||||
// Don't do anything here but don't fail
|
||||
// This can happen when we don't catch `at()` calls
|
||||
wxString msg;
|
||||
msg.Printf( wxT( "Out of Range error: %s" ), err.what() );
|
||||
wxLogDebug( msg );
|
||||
}
|
||||
|
||||
cntUpd.Stop();
|
||||
|
||||
cntCtx.Start();
|
||||
@@ -239,9 +252,11 @@ void EDA_DRAW_PANEL_GAL::DoRePaint()
|
||||
|
||||
if( m_view->IsDirty() )
|
||||
{
|
||||
if( m_backend != GAL_TYPE_OPENGL && // Already called in opengl
|
||||
m_view->IsTargetDirty( KIGFX::TARGET_NONCACHED ) )
|
||||
if( m_backend != GAL_TYPE_OPENGL // Already called in opengl
|
||||
&& m_view->IsTargetDirty( KIGFX::TARGET_NONCACHED ) )
|
||||
{
|
||||
m_gal->ClearScreen();
|
||||
}
|
||||
|
||||
m_view->ClearTargets();
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 1992-2013 Jean-Pierre Charras <jp.charras at wanadoo.fr>.
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -494,6 +494,12 @@ void DRAWING_SHEET_PARSER::parseBitmap( DS_DATA_ITEM_BITMAP * aItem )
|
||||
NeedRIGHT();
|
||||
break;
|
||||
|
||||
case T_comment:
|
||||
NeedSYMBOLorNUMBER();
|
||||
aItem->m_Info = FromUTF8();
|
||||
NeedRIGHT();
|
||||
break;
|
||||
|
||||
case T_pngdata:
|
||||
readPngdata( aItem );
|
||||
break;
|
||||
@@ -893,7 +899,7 @@ bool DS_DATA_MODEL::LoadDrawingSheet( const wxString& aFullFileName, bool Append
|
||||
}
|
||||
}
|
||||
|
||||
wxFFile wksFile( fullFileName, "rb" );
|
||||
wxFFile wksFile( fullFileName, wxT( "rb" ) );
|
||||
|
||||
if( ! wksFile.IsOpened() )
|
||||
{
|
||||
@@ -933,7 +939,7 @@ bool DS_DATA_MODEL::LoadDrawingSheet( const wxString& aFullFileName, bool Append
|
||||
}
|
||||
catch( const std::bad_alloc& )
|
||||
{
|
||||
wxLogMessage( "Memory exhaustion reading drawing sheet" );
|
||||
wxLogMessage( wxT( "Memory exhaustion reading drawing sheet" ) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,12 +142,12 @@ wxString DS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase )
|
||||
}
|
||||
else if( token->IsSameAs( wxT( "PAPER" ) ) )
|
||||
{
|
||||
*token = m_paperFormat ? *m_paperFormat : wxString( "" );
|
||||
*token = m_paperFormat ? *m_paperFormat : wxString( wxEmptyString );
|
||||
tokenUpdated = true;
|
||||
}
|
||||
else if( token->IsSameAs( wxT( "LAYER" ) ) )
|
||||
{
|
||||
*token = m_sheetLayer ? *m_sheetLayer : wxString( "" );
|
||||
*token = m_sheetLayer ? *m_sheetLayer : wxString( wxEmptyString );
|
||||
tokenUpdated = true;
|
||||
}
|
||||
else if( m_titleBlock )
|
||||
|
||||
+23
-23
@@ -183,7 +183,7 @@ wxWindow* EDA_BASE_FRAME::findQuasiModalDialog()
|
||||
// so we have to look for it separately.
|
||||
if( m_ident == FRAME_SCH )
|
||||
{
|
||||
wxWindow* cvpcb = wxWindow::FindWindowByName( "CvpcbFrame" );
|
||||
wxWindow* cvpcb = wxWindow::FindWindowByName( wxT( "CvpcbFrame" ) );
|
||||
|
||||
if( cvpcb )
|
||||
return cvpcb;
|
||||
@@ -332,7 +332,7 @@ bool EDA_BASE_FRAME::doAutoSave()
|
||||
|
||||
void EDA_BASE_FRAME::OnCharHook( wxKeyEvent& aKeyEvent )
|
||||
{
|
||||
wxLogTrace( kicadTraceKeyEvent, "EDA_BASE_FRAME::OnCharHook %s", dump( aKeyEvent ) );
|
||||
wxLogTrace( kicadTraceKeyEvent, wxT( "EDA_BASE_FRAME::OnCharHook %s" ), dump( aKeyEvent ) );
|
||||
|
||||
// Key events can be filtered here.
|
||||
// Currently no filtering is made.
|
||||
@@ -535,7 +535,7 @@ void EDA_BASE_FRAME::OnSize( wxSizeEvent& aEvent )
|
||||
|
||||
if( m_displayIndex >= 0 && currentDisplay >= 0 && currentDisplay != m_displayIndex )
|
||||
{
|
||||
wxLogTrace( traceDisplayLocation, "OnSize: current display changed %d to %d",
|
||||
wxLogTrace( traceDisplayLocation, wxT( "OnSize: current display changed %d to %d" ),
|
||||
m_displayIndex, currentDisplay );
|
||||
m_displayIndex = currentDisplay;
|
||||
ensureWindowIsOnScreen();
|
||||
@@ -569,7 +569,7 @@ void EDA_BASE_FRAME::LoadWindowState( const WINDOW_STATE& aState )
|
||||
m_frameSize.x = aState.size_x;
|
||||
m_frameSize.y = aState.size_y;
|
||||
|
||||
wxLogTrace( traceDisplayLocation, "Config position (%d, %d) with size (%d, %d)",
|
||||
wxLogTrace( traceDisplayLocation, wxT( "Config position (%d, %d) with size (%d, %d)" ),
|
||||
m_framePos.x, m_framePos.y, m_frameSize.x, m_frameSize.y );
|
||||
|
||||
// Ensure minimum size is set if the stored config was zero-initialized
|
||||
@@ -578,15 +578,15 @@ void EDA_BASE_FRAME::LoadWindowState( const WINDOW_STATE& aState )
|
||||
m_frameSize = defaultSize( m_ident );
|
||||
wasDefault = true;
|
||||
|
||||
wxLogTrace( traceDisplayLocation, "Using minimum size (%d, %d)",
|
||||
wxLogTrace( traceDisplayLocation, wxT( "Using minimum size (%d, %d)" ),
|
||||
m_frameSize.x, m_frameSize.y );
|
||||
}
|
||||
|
||||
wxLogTrace( traceDisplayLocation, "Number of displays: %d", wxDisplay::GetCount() );
|
||||
wxLogTrace( traceDisplayLocation, wxT( "Number of displays: %d" ), wxDisplay::GetCount() );
|
||||
|
||||
if( aState.display >= wxDisplay::GetCount() )
|
||||
{
|
||||
wxLogTrace( traceDisplayLocation, "Previous display not found" );
|
||||
wxLogTrace( traceDisplayLocation, wxT( "Previous display not found" ) );
|
||||
|
||||
// If it isn't attached, use the first display
|
||||
// Warning wxDisplay has 2 ctor variants. the parameter needs a type:
|
||||
@@ -622,11 +622,11 @@ void EDA_BASE_FRAME::LoadWindowState( const WINDOW_STATE& aState )
|
||||
upperLeft.y > yLimBottom )
|
||||
{
|
||||
m_framePos = wxDefaultPosition;
|
||||
wxLogTrace( traceDisplayLocation, "Resetting to default position" );
|
||||
wxLogTrace( traceDisplayLocation, wxT( "Resetting to default position" ) );
|
||||
}
|
||||
}
|
||||
|
||||
wxLogTrace( traceDisplayLocation, "Final window position (%d, %d) with size (%d, %d)",
|
||||
wxLogTrace( traceDisplayLocation, wxT( "Final window position (%d, %d) with size (%d, %d)" ),
|
||||
m_framePos.x, m_framePos.y, m_frameSize.x, m_frameSize.y );
|
||||
|
||||
SetSize( m_framePos.x, m_framePos.y, m_frameSize.x, m_frameSize.y );
|
||||
@@ -634,7 +634,7 @@ void EDA_BASE_FRAME::LoadWindowState( const WINDOW_STATE& aState )
|
||||
// Center the window if we reset to default
|
||||
if( m_framePos.x == -1 )
|
||||
{
|
||||
wxLogTrace( traceDisplayLocation, "Centering window" );
|
||||
wxLogTrace( traceDisplayLocation, wxT( "Centering window" ) );
|
||||
Center();
|
||||
m_framePos = GetPosition();
|
||||
}
|
||||
@@ -646,7 +646,7 @@ void EDA_BASE_FRAME::LoadWindowState( const WINDOW_STATE& aState )
|
||||
// Maximize if we were maximized before
|
||||
if( aState.maximized || ( wasDefault && m_maximizeByDefault ) )
|
||||
{
|
||||
wxLogTrace( traceDisplayLocation, "Maximizing window" );
|
||||
wxLogTrace( traceDisplayLocation, wxT( "Maximizing window" ) );
|
||||
Maximize();
|
||||
}
|
||||
|
||||
@@ -662,13 +662,13 @@ void EDA_BASE_FRAME::ensureWindowIsOnScreen()
|
||||
wxSize size = GetWindowSize();
|
||||
|
||||
wxLogTrace( traceDisplayLocation,
|
||||
"ensureWindowIsOnScreen: clientArea (%d, %d) w %d h %d", clientSize.x, clientSize.y,
|
||||
wxT( "ensureWindowIsOnScreen: clientArea (%d, %d) w %d h %d" ), clientSize.x, clientSize.y,
|
||||
clientSize.width, clientSize.height );
|
||||
|
||||
if( pos.y < clientSize.y )
|
||||
{
|
||||
wxLogTrace( traceDisplayLocation,
|
||||
"ensureWindowIsOnScreen: y pos %d below minimum, setting to %d", pos.y,
|
||||
wxT( "ensureWindowIsOnScreen: y pos %d below minimum, setting to %d" ), pos.y,
|
||||
clientSize.y );
|
||||
pos.y = clientSize.y;
|
||||
}
|
||||
@@ -676,7 +676,7 @@ void EDA_BASE_FRAME::ensureWindowIsOnScreen()
|
||||
if( pos.x < clientSize.x )
|
||||
{
|
||||
wxLogTrace( traceDisplayLocation,
|
||||
"ensureWindowIsOnScreen: x pos %d is off the client rect, setting to %d", pos.x,
|
||||
wxT( "ensureWindowIsOnScreen: x pos %d is off the client rect, setting to %d" ), pos.x,
|
||||
clientSize.x );
|
||||
pos.x = clientSize.x;
|
||||
}
|
||||
@@ -685,7 +685,7 @@ void EDA_BASE_FRAME::ensureWindowIsOnScreen()
|
||||
{
|
||||
int newWidth = clientSize.width - ( pos.x - clientSize.x );
|
||||
wxLogTrace( traceDisplayLocation,
|
||||
"ensureWindowIsOnScreen: effective width %d above available %d, setting to %d",
|
||||
wxT( "ensureWindowIsOnScreen: effective width %d above available %d, setting to %d" ),
|
||||
pos.x + size.x, clientSize.width, newWidth );
|
||||
size.x = newWidth;
|
||||
}
|
||||
@@ -694,12 +694,12 @@ void EDA_BASE_FRAME::ensureWindowIsOnScreen()
|
||||
{
|
||||
int newHeight = clientSize.height - ( pos.y - clientSize.y );
|
||||
wxLogTrace( traceDisplayLocation,
|
||||
"ensureWindowIsOnScreen: effective height %d above available %d, setting to %d",
|
||||
wxT( "ensureWindowIsOnScreen: effective height %d above available %d, setting to %d" ),
|
||||
pos.y + size.y, clientSize.height, newHeight );
|
||||
size.y = newHeight;
|
||||
}
|
||||
|
||||
wxLogTrace( traceDisplayLocation, "Updating window position (%d, %d) with size (%d, %d)",
|
||||
wxLogTrace( traceDisplayLocation, wxT( "Updating window position (%d, %d) with size (%d, %d)" ),
|
||||
pos.x, pos.y, size.x, size.y );
|
||||
|
||||
SetSize( pos.x, pos.y, size.x, size.y );
|
||||
@@ -748,9 +748,9 @@ void EDA_BASE_FRAME::SaveWindowSettings( WINDOW_SETTINGS* aCfg )
|
||||
aCfg->state.maximized = IsMaximized();
|
||||
aCfg->state.display = wxDisplay::GetFromWindow( this );
|
||||
|
||||
wxLogTrace( traceDisplayLocation, "Saving window maximized: %s",
|
||||
IsMaximized() ? "true" : "false" );
|
||||
wxLogTrace( traceDisplayLocation, "Saving config position (%d, %d) with size (%d, %d)",
|
||||
wxLogTrace( traceDisplayLocation, wxT( "Saving window maximized: %s" ),
|
||||
IsMaximized() ? wxT( "true" ) : wxT( "false" ) );
|
||||
wxLogTrace( traceDisplayLocation, wxT( "Saving config position (%d, %d) with size (%d, %d)" ),
|
||||
m_framePos.x, m_framePos.y, m_frameSize.x, m_frameSize.y );
|
||||
|
||||
// TODO(JE) should auto-save in common settings be overwritten by every app?
|
||||
@@ -845,7 +845,7 @@ void EDA_BASE_FRAME::CreateInfoBar()
|
||||
#else
|
||||
m_infoBar = new WX_INFOBAR( this, &m_auimgr );
|
||||
|
||||
m_auimgr.AddPane( m_infoBar, EDA_PANE().InfoBar().Name( "InfoBar" ).Top().Layer(1) );
|
||||
m_auimgr.AddPane( m_infoBar, EDA_PANE().InfoBar().Name( wxT( "InfoBar" ) ).Top().Layer(1) );
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -860,7 +860,7 @@ void EDA_BASE_FRAME::FinishAUIInitialization()
|
||||
m_auimgr.Update();
|
||||
|
||||
// We don't want the infobar displayed right away
|
||||
m_auimgr.GetPane( "InfoBar" ).Hide();
|
||||
m_auimgr.GetPane( wxT( "InfoBar" ) ).Hide();
|
||||
m_auimgr.Update();
|
||||
#endif
|
||||
}
|
||||
@@ -1224,7 +1224,7 @@ void EDA_BASE_FRAME::OnMaximize( wxMaximizeEvent& aEvent )
|
||||
m_normalFrameSize = GetWindowSize();
|
||||
m_normalFramePos = GetPosition();
|
||||
wxLogTrace( traceDisplayLocation,
|
||||
"Maximizing window - Saving position (%d, %d) with size (%d, %d)",
|
||||
wxT( "Maximizing window - Saving position (%d, %d) with size (%d, %d)" ),
|
||||
m_normalFramePos.x, m_normalFramePos.y,
|
||||
m_normalFrameSize.x, m_normalFrameSize.y );
|
||||
}
|
||||
|
||||
+29
-39
@@ -72,7 +72,6 @@
|
||||
|
||||
BEGIN_EVENT_TABLE( EDA_DRAW_FRAME, KIWAY_PLAYER )
|
||||
EVT_UPDATE_UI( ID_ON_GRID_SELECT, EDA_DRAW_FRAME::OnUpdateSelectGrid )
|
||||
EVT_UPDATE_UI( ID_ON_ZOOM_SELECT, EDA_DRAW_FRAME::OnUpdateSelectZoom )
|
||||
|
||||
EVT_ACTIVATE( EDA_DRAW_FRAME::onActivate )
|
||||
END_EVENT_TABLE()
|
||||
@@ -267,11 +266,20 @@ void EDA_DRAW_FRAME::unitsChangeRefresh()
|
||||
|
||||
void EDA_DRAW_FRAME::ToggleUserUnits()
|
||||
{
|
||||
SetUserUnits( m_userUnits == EDA_UNITS::INCHES ? EDA_UNITS::MILLIMETRES : EDA_UNITS::INCHES );
|
||||
unitsChangeRefresh();
|
||||
if( m_toolManager->GetTool<COMMON_TOOLS>() )
|
||||
{
|
||||
TOOL_EVENT dummy;
|
||||
m_toolManager->GetTool<COMMON_TOOLS>()->ToggleUnits( dummy );
|
||||
}
|
||||
else
|
||||
{
|
||||
SetUserUnits( m_userUnits == EDA_UNITS::INCHES ? EDA_UNITS::MILLIMETRES
|
||||
: EDA_UNITS::INCHES );
|
||||
unitsChangeRefresh();
|
||||
|
||||
wxCommandEvent e( UNITS_CHANGED );
|
||||
ProcessEventLocally( e );
|
||||
wxCommandEvent e( UNITS_CHANGED );
|
||||
ProcessEventLocally( e );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -348,7 +356,7 @@ void EDA_DRAW_FRAME::PrintPage( const RENDER_SETTINGS* aSettings )
|
||||
|
||||
void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event )
|
||||
{
|
||||
wxCHECK_RET( m_gridSelectBox, "m_gridSelectBox uninitialized" );
|
||||
wxCHECK_RET( m_gridSelectBox, wxT( "m_gridSelectBox uninitialized" ) );
|
||||
|
||||
int idx = m_gridSelectBox->GetCurrentSelection();
|
||||
|
||||
@@ -443,33 +451,9 @@ void EDA_DRAW_FRAME::UpdateZoomSelectBox()
|
||||
}
|
||||
|
||||
|
||||
void EDA_DRAW_FRAME::OnUpdateSelectZoom( wxUpdateUIEvent& aEvent )
|
||||
{
|
||||
if( m_zoomSelectBox == nullptr || m_zoomSelectBox->GetParent() == nullptr )
|
||||
return;
|
||||
|
||||
int current = 0; // display Auto if no match found
|
||||
|
||||
// check for a match within 1%
|
||||
double zoom = GetCanvas()->GetGAL()->GetZoomFactor();
|
||||
|
||||
for( unsigned i = 0; i < config()->m_Window.zoom_factors.size(); i++ )
|
||||
{
|
||||
if( std::fabs( zoom - config()->m_Window.zoom_factors[i] ) < ( zoom / 100.0 ) )
|
||||
{
|
||||
current = i + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( current != m_zoomSelectBox->GetSelection() )
|
||||
m_zoomSelectBox->SetSelection( current );
|
||||
}
|
||||
|
||||
|
||||
void EDA_DRAW_FRAME::OnSelectZoom( wxCommandEvent& event )
|
||||
{
|
||||
wxCHECK_RET( m_zoomSelectBox, "m_zoomSelectBox uninitialized" );
|
||||
wxCHECK_RET( m_zoomSelectBox, wxT( "m_zoomSelectBox uninitialized" ) );
|
||||
|
||||
int id = m_zoomSelectBox->GetCurrentSelection();
|
||||
|
||||
@@ -514,7 +498,7 @@ void EDA_DRAW_FRAME::AddStandardSubMenus( TOOL_MENU& aToolMenu )
|
||||
gridMenu->SetTool( commonTools );
|
||||
aToolMenu.AddSubMenu( gridMenu );
|
||||
|
||||
aMenu.AddMenu( zoomMenu.get(), SELECTION_CONDITIONS::ShowAlways, 1000 );
|
||||
aMenu.AddMenu( zoomMenu.get(), SELECTION_CONDITIONS::ShowAlways, 1000 );
|
||||
aMenu.AddMenu( gridMenu.get(), SELECTION_CONDITIONS::ShowAlways, 1000 );
|
||||
}
|
||||
|
||||
@@ -535,7 +519,7 @@ void EDA_DRAW_FRAME::DisplayGridMsg()
|
||||
{
|
||||
wxString line;
|
||||
|
||||
line.Printf( "grid %s",
|
||||
line.Printf( wxT( "grid %s" ),
|
||||
MessageTextFromValue( GetUserUnits(), GetCanvas()->GetGAL()->GetGridSize().x,
|
||||
false ) );
|
||||
|
||||
@@ -979,18 +963,22 @@ bool EDA_DRAW_FRAME::LibraryFileBrowser( bool doOpen, wxFileName& aFilename,
|
||||
wxString prompt = doOpen ? _( "Select Library" ) : _( "New Library" );
|
||||
aFilename.SetExt( ext );
|
||||
|
||||
wxString dir = aGlobalPath;
|
||||
wxString dir;
|
||||
|
||||
if( GetMruPath().IsEmpty() )
|
||||
dir = aGlobalPath;
|
||||
else
|
||||
dir = GetMruPath();
|
||||
|
||||
|
||||
if( isDirectory && doOpen )
|
||||
{
|
||||
if( !aIsGlobal )
|
||||
if( !aIsGlobal && GetMruPath().IsEmpty() )
|
||||
{
|
||||
dir = Prj().GetProjectPath();
|
||||
}
|
||||
|
||||
wxDirDialog dlg( this, prompt, dir,
|
||||
wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST );
|
||||
wxDirDialog dlg( this, prompt, dir, wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return false;
|
||||
@@ -1002,9 +990,9 @@ bool EDA_DRAW_FRAME::LibraryFileBrowser( bool doOpen, wxFileName& aFilename,
|
||||
{
|
||||
// Ensure the file has a dummy name, otherwise GTK will display the regex from the filter
|
||||
if( aFilename.GetName().empty() )
|
||||
aFilename.SetName( "Library" );
|
||||
aFilename.SetName( wxT( "Library" ) );
|
||||
|
||||
if( !aIsGlobal )
|
||||
if( !aIsGlobal && GetMruPath().IsEmpty() )
|
||||
{
|
||||
dir = Prj().IsNullProject() ? aFilename.GetFullPath() : Prj().GetProjectPath();
|
||||
}
|
||||
@@ -1020,6 +1008,8 @@ bool EDA_DRAW_FRAME::LibraryFileBrowser( bool doOpen, wxFileName& aFilename,
|
||||
aFilename.SetExt( ext );
|
||||
}
|
||||
|
||||
SetMruPath( aFilename.GetPath() );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ bool EDA_PATTERN_MATCH_WILDCARD::SetPattern( const wxString& aPattern )
|
||||
}
|
||||
else if( to_replace.Find( c ) != wxNOT_FOUND )
|
||||
{
|
||||
regex += "\\";
|
||||
regex += wxT( "\\" );
|
||||
regex += c;
|
||||
}
|
||||
else
|
||||
@@ -192,7 +192,7 @@ bool EDA_PATTERN_MATCH_WILDCARD_EXPLICIT::SetPattern( const wxString& aPattern )
|
||||
}
|
||||
else if( to_replace.Find( c ) != wxNOT_FOUND )
|
||||
{
|
||||
regex += "\\";
|
||||
regex += wxT( "\\" );
|
||||
regex += c;
|
||||
}
|
||||
else
|
||||
@@ -221,20 +221,20 @@ bool EDA_PATTERN_MATCH_RELATIONAL::SetPattern( const wxString& aPattern )
|
||||
|
||||
m_key = key.Lower();
|
||||
|
||||
if( rel == "<" )
|
||||
if( rel == wxT( "<" ) )
|
||||
m_relation = LT;
|
||||
else if( rel == "<=" )
|
||||
else if( rel == wxT( "<=" ) )
|
||||
m_relation = LE;
|
||||
else if( rel == "=" )
|
||||
else if( rel == wxT( "=" ) )
|
||||
m_relation = EQ;
|
||||
else if( rel == ">=" )
|
||||
else if( rel == wxT( ">=" ) )
|
||||
m_relation = GE;
|
||||
else if( rel == ">" )
|
||||
else if( rel == wxT( ">" ) )
|
||||
m_relation = GT;
|
||||
else
|
||||
return false;
|
||||
|
||||
if( val == "" )
|
||||
if( val == wxEmptyString )
|
||||
{
|
||||
// Matching on empty values keeps the match list from going empty when
|
||||
// the user types the relational operator character, which helps prevent
|
||||
@@ -333,19 +333,19 @@ wxRegEx EDA_PATTERN_MATCH_RELATIONAL::m_regex_description(
|
||||
wxRegEx EDA_PATTERN_MATCH_RELATIONAL::m_regex_search(
|
||||
R"(^(\w+)(<|<=|=|>=|>)([-+]?[\d.]*)(\w*)$)", wxRE_ADVANCED );
|
||||
const std::map<wxString, double> EDA_PATTERN_MATCH_RELATIONAL::m_units = {
|
||||
{ "p", 1e-12 },
|
||||
{ "n", 1e-9 },
|
||||
{ "u", 1e-6 },
|
||||
{ "m", 1e-3 },
|
||||
{ "", 1. },
|
||||
{ "k", 1e3 },
|
||||
{ "meg",1e6 },
|
||||
{ "g", 1e9 },
|
||||
{ "t", 1e12 },
|
||||
{ "ki", 1024. },
|
||||
{ "mi", 1048576. },
|
||||
{ "gi", 1073741824. },
|
||||
{ "ti", 1099511627776. } };
|
||||
{ wxT( "p" ), 1e-12 },
|
||||
{ wxT( "n" ), 1e-9 },
|
||||
{ wxT( "u" ), 1e-6 },
|
||||
{ wxT( "m" ), 1e-3 },
|
||||
{ wxEmptyString, 1. },
|
||||
{ wxT( "k" ), 1e3 },
|
||||
{ wxT( "meg" ),1e6 },
|
||||
{ wxT( "g" ), 1e9 },
|
||||
{ wxT( "t" ), 1e12 },
|
||||
{ wxT( "ki" ), 1024. },
|
||||
{ wxT( "mi" ), 1048576. },
|
||||
{ wxT( "gi" ), 1073741824. },
|
||||
{ wxT( "ti" ), 1099511627776. } };
|
||||
|
||||
|
||||
EDA_COMBINED_MATCHER::EDA_COMBINED_MATCHER( const wxString& aPattern )
|
||||
|
||||
+13
-10
@@ -72,13 +72,13 @@ wxString EDA_SHAPE::SHAPE_T_asString() const
|
||||
{
|
||||
switch( m_shape )
|
||||
{
|
||||
case SHAPE_T::SEGMENT: return "S_SEGMENT";
|
||||
case SHAPE_T::RECT: return "S_RECT";
|
||||
case SHAPE_T::ARC: return "S_ARC";
|
||||
case SHAPE_T::CIRCLE: return "S_CIRCLE";
|
||||
case SHAPE_T::POLY: return "S_POLYGON";
|
||||
case SHAPE_T::BEZIER: return "S_CURVE";
|
||||
case SHAPE_T::LAST: return "!S_LAST!"; // Synthetic value, but if we come across it then
|
||||
case SHAPE_T::SEGMENT: return wxT( "S_SEGMENT" );
|
||||
case SHAPE_T::RECT: return wxT( "S_RECT" );
|
||||
case SHAPE_T::ARC: return wxT( "S_ARC" );
|
||||
case SHAPE_T::CIRCLE: return wxT( "S_CIRCLE" );
|
||||
case SHAPE_T::POLY: return wxT( "S_POLYGON" );
|
||||
case SHAPE_T::BEZIER: return wxT( "S_CURVE" );
|
||||
case SHAPE_T::LAST: return wxT( "!S_LAST!" ); // Synthetic value, but if we come across it then
|
||||
// we're going to want to know.
|
||||
}
|
||||
|
||||
@@ -572,7 +572,7 @@ void EDA_SHAPE::ShapeGetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PA
|
||||
case SHAPE_T::POLY:
|
||||
aList.emplace_back( shape, _( "Polygon" ) );
|
||||
|
||||
msg.Printf( "%d", GetPolyShape().Outline(0).PointCount() );
|
||||
msg.Printf( wxT( "%d" ), GetPolyShape().Outline(0).PointCount() );
|
||||
aList.emplace_back( _( "Points" ), msg );
|
||||
break;
|
||||
|
||||
@@ -1140,6 +1140,9 @@ std::vector<SHAPE*> EDA_SHAPE::MakeEffectiveShapes() const
|
||||
|
||||
case SHAPE_T::POLY:
|
||||
{
|
||||
if( GetPolyShape().OutlineCount() == 0 ) // malformed/empty polygon
|
||||
break;
|
||||
|
||||
SHAPE_LINE_CHAIN l = GetPolyShape().COutline( 0 );
|
||||
|
||||
l.Rotate( -DECIDEG2RAD( getParentOrientation() ) );
|
||||
@@ -1388,7 +1391,7 @@ void EDA_SHAPE::calcEdit( const wxPoint& aPosition )
|
||||
}
|
||||
|
||||
|
||||
void EDA_SHAPE::endEdit()
|
||||
void EDA_SHAPE::endEdit( bool aClosed )
|
||||
{
|
||||
switch( GetShape() )
|
||||
{
|
||||
@@ -1407,7 +1410,7 @@ void EDA_SHAPE::endEdit()
|
||||
{
|
||||
if( poly.CPoint( poly.GetPointCount() - 2 ) == poly.CLastPoint() )
|
||||
{
|
||||
poly.SetClosed( true );
|
||||
poly.SetClosed( aClosed );
|
||||
poly.Remove( poly.GetPointCount() - 1 );
|
||||
}
|
||||
}
|
||||
|
||||
+17
-30
@@ -275,18 +275,16 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const
|
||||
const auto& font = basic_gal.GetStrokeFont();
|
||||
VECTOR2D fontSize( GetTextSize() );
|
||||
double penWidth( thickness );
|
||||
int dx = KiROUND( font.ComputeStringBoundaryLimits( text, fontSize, penWidth ).x );
|
||||
int dy = GetInterline();
|
||||
VECTOR2D extents = font.ComputeStringBoundaryLimits( text, fontSize, penWidth );
|
||||
double interline = KIGFX::STROKE_FONT::GetInterline( fontSize.y );
|
||||
|
||||
// Creates bounding box (rectangle) for horizontal, left and top justified text. The
|
||||
// bounding box will be moved later according to the actual text options
|
||||
wxSize textsize = wxSize( dx, dy );
|
||||
wxSize textsize = wxSize( KiROUND( extents.x ), KiROUND( extents.y ) );
|
||||
wxPoint pos = GetTextPos();
|
||||
|
||||
if( IsMultilineAllowed() && aLine > 0 && ( aLine < static_cast<int>( strings.GetCount() ) ) )
|
||||
{
|
||||
pos.y -= aLine * GetInterline();
|
||||
}
|
||||
pos.y -= KiROUND( aLine * interline );
|
||||
|
||||
if( aInvertY )
|
||||
pos.y = -pos.y;
|
||||
@@ -312,10 +310,13 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const
|
||||
for( unsigned ii = 1; ii < strings.GetCount(); ii++ )
|
||||
{
|
||||
text = strings.Item( ii );
|
||||
dx = KiROUND( font.ComputeStringBoundaryLimits( text, fontSize, penWidth ).x );
|
||||
textsize.x = std::max( textsize.x, dx );
|
||||
textsize.y += dy;
|
||||
extents = font.ComputeStringBoundaryLimits( text, fontSize, penWidth );
|
||||
textsize.x = std::max( textsize.x, KiROUND( extents.x ) );
|
||||
}
|
||||
|
||||
// interline spacing is only *between* lines, so total height is the height of the first
|
||||
// line plus the interline distance (with interline spacing) for all subsequent lines
|
||||
textsize.y += KiROUND( ( strings.GetCount() - 1 ) * interline );
|
||||
}
|
||||
|
||||
rect.SetSize( textsize );
|
||||
@@ -334,7 +335,7 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const
|
||||
break;
|
||||
|
||||
case GR_TEXT_HJUSTIFY_CENTER:
|
||||
rect.SetX( rect.GetX() - (rect.GetWidth() / 2) );
|
||||
rect.SetX( rect.GetX() - ( rect.GetWidth() / 2 ) );
|
||||
break;
|
||||
|
||||
case GR_TEXT_HJUSTIFY_RIGHT:
|
||||
@@ -349,11 +350,11 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const
|
||||
break;
|
||||
|
||||
case GR_TEXT_VJUSTIFY_CENTER:
|
||||
rect.SetY( rect.GetY() - ( dy / 2) );
|
||||
rect.SetY( rect.GetY() - KiROUND( interline / 2.0 ) );
|
||||
break;
|
||||
|
||||
case GR_TEXT_VJUSTIFY_BOTTOM:
|
||||
rect.SetY( rect.GetY() - dy );
|
||||
rect.SetY( rect.GetY() - KiROUND( interline ) );
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -368,12 +369,12 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const
|
||||
break;
|
||||
|
||||
case GR_TEXT_VJUSTIFY_CENTER:
|
||||
yoffset = linecount * GetInterline() / 2;
|
||||
yoffset = KiROUND( linecount * interline / 2.0 );
|
||||
rect.SetY( rect.GetY() - yoffset );
|
||||
break;
|
||||
|
||||
case GR_TEXT_VJUSTIFY_BOTTOM:
|
||||
yoffset = linecount * GetInterline();
|
||||
yoffset = KiROUND( linecount * interline );
|
||||
rect.SetY( rect.GetY() - yoffset );
|
||||
break;
|
||||
}
|
||||
@@ -381,7 +382,7 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const
|
||||
|
||||
// Many fonts draw diacriticals, descenders, etc. outside the X-height of the font. This
|
||||
// will cacth most (but probably not all) of them.
|
||||
rect.Inflate( 0, thickness * 1.5 );
|
||||
rect.Inflate( 0, KiROUND( thickness * 0.75 ) );
|
||||
|
||||
rect.Normalize(); // Make h and v sizes always >= 0
|
||||
|
||||
@@ -685,21 +686,7 @@ void EDA_TEXT::TransformBoundingBoxWithClearanceToPolygon( SHAPE_POLY_SET* aCorn
|
||||
|
||||
EDA_RECT rect = GetTextBox();
|
||||
|
||||
// This ugly hack is because this code used to be defined in the board polygon code
|
||||
// file rather than in the EDA_TEXT source file where it belonged. Using the board
|
||||
// default text width was dubious so this recreates the same code with the exception
|
||||
// if for some reason a different default text width is require for some other object.
|
||||
#if !defined( DEFAULT_TEXT_WIDTH )
|
||||
#define LOCAL_DEFAULT_TEXT_WIDTH
|
||||
#define DEFAULT_TEXT_WIDTH 0.15
|
||||
#endif
|
||||
|
||||
rect.Inflate( aClearanceValue + Millimeter2iu( DEFAULT_TEXT_WIDTH ) );
|
||||
|
||||
#if defined( LOCAL_DEFAULT_TEXT_WIDTH )
|
||||
#undef DEFAULT_TEXT_WIDTH
|
||||
#undef LOCAL_DEFAULT_TEXT_WIDTH
|
||||
#endif
|
||||
rect.Inflate( aClearanceValue );
|
||||
|
||||
corners[0].x = rect.GetOrigin().x;
|
||||
corners[0].y = rect.GetOrigin().y;
|
||||
|
||||
+12
-6
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2017 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2017 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2017 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 2017-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2017 CERN
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
*
|
||||
@@ -27,17 +27,19 @@
|
||||
static bool normalizeAbsolutePaths( const wxFileName& aPathA, const wxFileName& aPathB,
|
||||
wxString* aResultPath )
|
||||
{
|
||||
wxCHECK_MSG( aPathA.IsAbsolute(), false, aPathA.GetPath() + " is not an absolute path." );
|
||||
wxCHECK_MSG( aPathB.IsAbsolute(), false, aPathB.GetPath() + " is not an absolute path." );
|
||||
wxCHECK_MSG( aPathA.IsAbsolute(), false, aPathA.GetPath() + wxT( " is not an absolute path." ) );
|
||||
wxCHECK_MSG( aPathB.IsAbsolute(), false, aPathB.GetPath() + wxT( " is not an absolute path." ) );
|
||||
|
||||
if( aPathA.GetPath() == aPathB.GetPath() )
|
||||
return true;
|
||||
|
||||
// Not sure all of volume checks are necessary since wxFileName::GetVolume() returns
|
||||
// an empty string if the path has no volume.
|
||||
if( ( aPathA.GetDirCount() > aPathB.GetDirCount() )
|
||||
|| ( aPathA.HasVolume() && !aPathB.HasVolume() )
|
||||
|| ( !aPathA.HasVolume() && aPathB.HasVolume() )
|
||||
|| ( ( aPathA.HasVolume() && aPathB.HasVolume() )
|
||||
&& ( aPathA.GetVolume() != aPathB.GetVolume() ) ) )
|
||||
&& ( aPathA.GetVolume().CmpNoCase( aPathB.GetVolume() ) != 0 ) ) )
|
||||
return false;
|
||||
|
||||
wxArrayString aDirs = aPathA.GetDirs();
|
||||
@@ -87,6 +89,7 @@ wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars
|
||||
envPath.SetPath( entry.second.GetValue() );
|
||||
|
||||
wxString tmp;
|
||||
|
||||
if( normalizeAbsolutePaths( envPath, aFilePath, &tmp ) )
|
||||
{
|
||||
int newDepth = envPath.GetDirs().GetCount();
|
||||
@@ -98,6 +101,9 @@ wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars
|
||||
varName = entry.first;
|
||||
remainingPath = tmp;
|
||||
}
|
||||
|
||||
// @fixme Shouldn't we break here if an environment variable path is found or try
|
||||
// at least try to pick the best match?
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -135,7 +141,7 @@ wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars
|
||||
if( aProject )
|
||||
return NormalizePath( aFilePath, aEnvVars, aProject->GetProjectPath() );
|
||||
else
|
||||
return NormalizePath( aFilePath, aEnvVars, "" );
|
||||
return NormalizePath( aFilePath, aEnvVars, wxEmptyString );
|
||||
}
|
||||
|
||||
|
||||
|
||||
+21
-21
@@ -34,14 +34,14 @@ using STRING_MAP = std::map<wxString, wxString>;
|
||||
* (where they are originally defined)
|
||||
*/
|
||||
static const ENV_VAR::ENV_VAR_LIST predefinedEnvVars = {
|
||||
"KIPRJMOD",
|
||||
"KICAD6_SYMBOL_DIR",
|
||||
"KICAD6_3DMODEL_DIR",
|
||||
"KICAD6_FOOTPRINT_DIR",
|
||||
"KICAD6_TEMPLATE_DIR",
|
||||
"KICAD_USER_TEMPLATE_DIR",
|
||||
"KICAD_PTEMPLATES",
|
||||
"KICAD6_3RD_PARTY",
|
||||
wxT( "KIPRJMOD" ),
|
||||
wxT( "KICAD6_SYMBOL_DIR" ),
|
||||
wxT( "KICAD6_3DMODEL_DIR" ),
|
||||
wxT( "KICAD6_FOOTPRINT_DIR" ),
|
||||
wxT( "KICAD6_TEMPLATE_DIR" ),
|
||||
wxT( "KICAD_USER_TEMPLATE_DIR" ),
|
||||
wxT( "KICAD_PTEMPLATES" ),
|
||||
wxT( "KICAD6_3RD_PARTY" ),
|
||||
};
|
||||
|
||||
|
||||
@@ -67,40 +67,40 @@ static void initialiseEnvVarHelp( STRING_MAP& aMap )
|
||||
{
|
||||
// Set up dynamically, as we want to be able to use _() translations,
|
||||
// which can't be done statically
|
||||
aMap["KICAD6_FOOTPRINT_DIR"] =
|
||||
aMap[wxT( "KICAD6_FOOTPRINT_DIR" )] =
|
||||
_( "The base path of locally installed system "
|
||||
"footprint libraries (.pretty folders).");
|
||||
aMap["KICAD6_3DMODEL_DIR"] =
|
||||
aMap[wxT( "KICAD6_3DMODEL_DIR" )] =
|
||||
_( "The base path of system footprint 3D shapes (.3Dshapes folders).");
|
||||
aMap["KICAD6_SYMBOL_DIR"] =
|
||||
aMap[wxT( "KICAD6_SYMBOL_DIR" )] =
|
||||
_( "The base path of the locally installed symbol libraries.");
|
||||
aMap["KICAD6_TEMPLATE_DIR"] =
|
||||
aMap[wxT( "KICAD6_TEMPLATE_DIR" )] =
|
||||
_( "A directory containing project templates installed with KiCad.");
|
||||
aMap["KICAD_USER_TEMPLATE_DIR"] =
|
||||
aMap[wxT( "KICAD_USER_TEMPLATE_DIR" )] =
|
||||
_( "Optional. Can be defined if you want to create your own project "
|
||||
"templates folder.");
|
||||
aMap["KICAD6_3RD_PARTY"] =
|
||||
aMap[wxT( "KICAD6_3RD_PARTY" )] =
|
||||
_( "A directory containing 3rd party plugins, libraries and other "
|
||||
"downloadable content.");
|
||||
aMap["KIPRJMOD"] =
|
||||
aMap[wxT( "KIPRJMOD" )] =
|
||||
_("Internally defined by KiCad (cannot be edited) and is set "
|
||||
"to the absolute path of the currently loaded project file. This environment "
|
||||
"variable can be used to define files and paths relative to the currently loaded "
|
||||
"project. For instance, ${KIPRJMOD}/libs/footprints.pretty can be defined as a "
|
||||
"folder containing a project specific footprint library named footprints.pretty." );
|
||||
aMap["KICAD6_SCRIPTING_DIR"] =
|
||||
aMap[wxT( "KICAD6_SCRIPTING_DIR" )] =
|
||||
_( "A directory containing system-wide scripts installed with KiCad" );
|
||||
aMap["KICAD6_USER_SCRIPTING_DIR"] =
|
||||
aMap[wxT( "KICAD6_USER_SCRIPTING_DIR" )] =
|
||||
_( "A directory containing user-specific scripts installed with KiCad" );
|
||||
|
||||
// Deprecated vars
|
||||
aMap["KICAD_PTEMPLATES"] =
|
||||
aMap[wxT( "KICAD_PTEMPLATES" )] =
|
||||
_( "Deprecated version of KICAD_TEMPLATE_DIR.");
|
||||
aMap["KISYS3DMOD"] =
|
||||
aMap[wxT( "KISYS3DMOD" )] =
|
||||
_( "Deprecated version of KICAD6_3DMODEL_DIR." );
|
||||
aMap["KISYSMOD"] =
|
||||
aMap[wxT( "KISYSMOD" )] =
|
||||
_( "Deprecated version of KICAD6_FOOTPRINT_DIR." );
|
||||
aMap["KICAD_SYMBOL_DIR"] =
|
||||
aMap[wxT( "KICAD_SYMBOL_DIR" )] =
|
||||
_( "Deprecated version of KICAD_SYMBOL_DIR.");
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
const wxString IO_ERROR::What() const
|
||||
{
|
||||
#ifdef DEBUG
|
||||
return wxString( "IO_ERROR: " ) + Problem() + "\n\n" + Where();
|
||||
return wxString( wxT( "IO_ERROR: " ) ) + Problem() + wxT( "\n\n" ) + Where();
|
||||
#else
|
||||
return Problem();
|
||||
#endif
|
||||
|
||||
+14
-14
@@ -28,19 +28,19 @@
|
||||
|
||||
// TODO Executable names TODO
|
||||
#ifdef __WINDOWS__
|
||||
const wxString CVPCB_EXE ( "cvpcb.exe" );
|
||||
const wxString PCBNEW_EXE ( "pcbnew.exe" );
|
||||
const wxString EESCHEMA_EXE ( "eeschema.exe" );
|
||||
const wxString GERBVIEW_EXE ( "gerbview.exe" );
|
||||
const wxString BITMAPCONVERTER_EXE ( "bitmap2component.exe" );
|
||||
const wxString PCB_CALCULATOR_EXE ( "pcb_calculator.exe" );
|
||||
const wxString PL_EDITOR_EXE ( "pl_editor.exe" );
|
||||
const wxString CVPCB_EXE ( wxT( "cvpcb.exe" ) );
|
||||
const wxString PCBNEW_EXE ( wxT( "pcbnew.exe" ) );
|
||||
const wxString EESCHEMA_EXE ( wxT( "eeschema.exe" ) );
|
||||
const wxString GERBVIEW_EXE ( wxT( "gerbview.exe" ) );
|
||||
const wxString BITMAPCONVERTER_EXE ( wxT( "bitmap2component.exe" ) );
|
||||
const wxString PCB_CALCULATOR_EXE ( wxT( "pcb_calculator.exe" ) );
|
||||
const wxString PL_EDITOR_EXE ( wxT( "pl_editor.exe" ) );
|
||||
#else
|
||||
const wxString CVPCB_EXE ( "cvpcb" );
|
||||
const wxString PCBNEW_EXE ( "pcbnew" );
|
||||
const wxString EESCHEMA_EXE ( "eeschema" );
|
||||
const wxString GERBVIEW_EXE ( "gerbview" );
|
||||
const wxString BITMAPCONVERTER_EXE ( "bitmap2component" );
|
||||
const wxString PCB_CALCULATOR_EXE ( "pcb_calculator" );
|
||||
const wxString PL_EDITOR_EXE ( "pl_editor" );
|
||||
const wxString CVPCB_EXE ( wxT( "cvpcb" ) );
|
||||
const wxString PCBNEW_EXE ( wxT( "pcbnew" ) );
|
||||
const wxString EESCHEMA_EXE ( wxT( "eeschema" ) );
|
||||
const wxString GERBVIEW_EXE ( wxT( "gerbview" ) );
|
||||
const wxString BITMAPCONVERTER_EXE ( wxT( "bitmap2component" ) );
|
||||
const wxString PCB_CALCULATOR_EXE ( wxT( "pcb_calculator" ) );
|
||||
const wxString PL_EDITOR_EXE ( wxT( "pl_editor" ) );
|
||||
#endif
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#define ERRFLG_RELPATH (2)
|
||||
#define ERRFLG_ENVPATH (4)
|
||||
|
||||
#define MASK_3D_RESOLVER "3D_RESOLVER"
|
||||
#define MASK_3D_RESOLVER wxT( "3D_RESOLVER" )
|
||||
|
||||
static std::mutex mutex_resolver;
|
||||
|
||||
@@ -64,7 +64,7 @@ bool FILENAME_RESOLVER::Set3DConfigDir( const wxString& aConfigDir )
|
||||
if( aConfigDir.empty() )
|
||||
return false;
|
||||
|
||||
wxFileName cfgdir( ExpandEnvVarSubstitutions( aConfigDir, m_project ), "" );
|
||||
wxFileName cfgdir( ExpandEnvVarSubstitutions( aConfigDir, m_project ), wxEmptyString );
|
||||
|
||||
cfgdir.Normalize();
|
||||
|
||||
@@ -85,7 +85,7 @@ bool FILENAME_RESOLVER::SetProject( PROJECT* aProject, bool* flgChanged )
|
||||
if( !aProject )
|
||||
return false;
|
||||
|
||||
wxFileName projdir( ExpandEnvVarSubstitutions( aProject->GetProjectPath(), aProject ), "" );
|
||||
wxFileName projdir( ExpandEnvVarSubstitutions( aProject->GetProjectPath(), aProject ), wxEmptyString );
|
||||
|
||||
projdir.Normalize();
|
||||
|
||||
@@ -100,8 +100,8 @@ bool FILENAME_RESOLVER::SetProject( PROJECT* aProject, bool* flgChanged )
|
||||
if( m_paths.empty() )
|
||||
{
|
||||
SEARCH_PATH al;
|
||||
al.m_Alias = "${KIPRJMOD}";
|
||||
al.m_Pathvar = "${KIPRJMOD}";
|
||||
al.m_Alias = wxT( "${KIPRJMOD}" );
|
||||
al.m_Pathvar = wxT( "${KIPRJMOD}" );
|
||||
al.m_Pathexp = m_curProjDir;
|
||||
m_paths.push_back( al );
|
||||
|
||||
@@ -129,7 +129,7 @@ bool FILENAME_RESOLVER::SetProject( PROJECT* aProject, bool* flgChanged )
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
ostr << " * [INFO] changed project dir to ";
|
||||
ostr << m_paths.front().m_Pathexp.ToUTF8();
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -168,8 +168,8 @@ bool FILENAME_RESOLVER::createPathList()
|
||||
// the user may change this later with a call to SetProjectDir()
|
||||
|
||||
SEARCH_PATH lpath;
|
||||
lpath.m_Alias = "${KIPRJMOD}";
|
||||
lpath.m_Pathvar = "${KIPRJMOD}";
|
||||
lpath.m_Alias = wxT( "${KIPRJMOD}" );
|
||||
lpath.m_Pathvar = wxT( "${KIPRJMOD}" );
|
||||
lpath.m_Pathexp = m_curProjDir;
|
||||
m_paths.push_back( lpath );
|
||||
wxFileName fndummy;
|
||||
@@ -188,7 +188,7 @@ bool FILENAME_RESOLVER::createPathList()
|
||||
}
|
||||
else
|
||||
{
|
||||
fndummy.Assign( pathVal, "" );
|
||||
fndummy.Assign( pathVal, wxEmptyString );
|
||||
fndummy.Normalize();
|
||||
lpath.m_Pathexp = fndummy.GetFullPath();
|
||||
}
|
||||
@@ -210,12 +210,12 @@ bool FILENAME_RESOLVER::createPathList()
|
||||
return false;
|
||||
|
||||
#ifdef DEBUG
|
||||
wxLogTrace( MASK_3D_RESOLVER, " * [3D model] search paths:\n" );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( " * [3D model] search paths:\n" ) );
|
||||
std::list< SEARCH_PATH >::const_iterator sPL = m_paths.begin();
|
||||
|
||||
while( sPL != m_paths.end() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_RESOLVER, " + %s : '%s'\n", (*sPL).m_Alias.GetData(),
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( " + %s : '%s'\n" ), (*sPL).m_Alias.GetData(),
|
||||
(*sPL).m_Pathexp.GetData() );
|
||||
++sPL;
|
||||
}
|
||||
@@ -274,7 +274,7 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
||||
|
||||
// special case: if a path begins with ${ENV_VAR} but is not in the resolver's path list
|
||||
// then add it.
|
||||
if( aFileName.StartsWith( "${" ) || aFileName.StartsWith( "$(" ) )
|
||||
if( aFileName.StartsWith( wxT( "${" ) ) || aFileName.StartsWith( wxT( "$(" ) ) )
|
||||
checkEnvVarPath( aFileName );
|
||||
|
||||
return tname;
|
||||
@@ -282,15 +282,15 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
||||
|
||||
// if a path begins with ${ENV_VAR}/$(ENV_VAR) and is not resolved then the file either does
|
||||
// not exist or the ENV_VAR is not defined
|
||||
if( aFileName.StartsWith( "${" ) || aFileName.StartsWith( "$(" ) )
|
||||
if( aFileName.StartsWith( wxT( "${" ) ) || aFileName.StartsWith( wxT( "$(" ) ) )
|
||||
{
|
||||
if( !( m_errflags & ERRFLG_ENVPATH ) )
|
||||
{
|
||||
m_errflags |= ERRFLG_ENVPATH;
|
||||
wxString errmsg = "[3D File Resolver] No such path; ensure the environment var is defined";
|
||||
errmsg.append( "\n" );
|
||||
wxString errmsg = wxT( "[3D File Resolver] No such path; ensure the environment var is defined" );
|
||||
errmsg.append( wxT( "\n" ) );
|
||||
errmsg.append( tname );
|
||||
errmsg.append( "\n" );
|
||||
errmsg.append( wxT( "\n" ) );
|
||||
wxLogTrace( tracePathsAndFiles, errmsg );
|
||||
}
|
||||
|
||||
@@ -306,9 +306,9 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
||||
// been checked. This case accounts for partial paths which do not contain ${KIPRJMOD}.
|
||||
// This check is performed before checking the path relative to ${KICAD6_3DMODEL_DIR} so that
|
||||
// users can potentially override a model within ${KICAD6_3DMODEL_DIR}.
|
||||
if( !m_paths.begin()->m_Pathexp.empty() && !tname.StartsWith( ":" ) )
|
||||
if( !m_paths.begin()->m_Pathexp.empty() && !tname.StartsWith( wxT( ":" ) ) )
|
||||
{
|
||||
tmpFN.Assign( m_paths.begin()->m_Pathexp, "" );
|
||||
tmpFN.Assign( m_paths.begin()->m_Pathexp, wxEmptyString );
|
||||
wxString fullPath = tmpFN.GetPathWithSep() + tname;
|
||||
|
||||
fullPath = ExpandEnvVarSubstitutions( fullPath, m_project );
|
||||
@@ -324,10 +324,10 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
||||
}
|
||||
|
||||
// check the partial path relative to ${KICAD6_3DMODEL_DIR} (legacy behavior)
|
||||
if( !tname.StartsWith( ":" ) )
|
||||
if( !tname.StartsWith( wxT( ":" ) ) )
|
||||
{
|
||||
wxFileName fpath;
|
||||
wxString fullPath( "${KICAD6_3DMODEL_DIR}" );
|
||||
wxString fullPath( wxT( "${KICAD6_3DMODEL_DIR}" ) );
|
||||
fullPath.Append( fpath.GetPathSeparator() );
|
||||
fullPath.Append( tname );
|
||||
fullPath = ExpandEnvVarSubstitutions( fullPath, m_project );
|
||||
@@ -352,10 +352,10 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
||||
// this can happen if the file was intended to be relative to ${KICAD6_3DMODEL_DIR}
|
||||
// but ${KICAD6_3DMODEL_DIR} is not set or is incorrect.
|
||||
m_errflags |= ERRFLG_RELPATH;
|
||||
wxString errmsg = "[3D File Resolver] No such path";
|
||||
errmsg.append( "\n" );
|
||||
wxString errmsg = wxT( "[3D File Resolver] No such path" );
|
||||
errmsg.append( wxT( "\n" ) );
|
||||
errmsg.append( tname );
|
||||
errmsg.append( "\n" );
|
||||
errmsg.append( wxT( "\n" ) );
|
||||
wxLogTrace( tracePathsAndFiles, errmsg );
|
||||
}
|
||||
|
||||
@@ -365,7 +365,7 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
||||
for( const SEARCH_PATH& path : m_paths )
|
||||
{
|
||||
// ${ENV_VAR} paths have already been checked; skip them
|
||||
if( path.m_Alias.StartsWith( "${" ) || path.m_Alias.StartsWith( "$(" ) )
|
||||
if( path.m_Alias.StartsWith( wxT( "${" ) ) || path.m_Alias.StartsWith( wxT( "$(" ) ) )
|
||||
continue;
|
||||
|
||||
if( path.m_Alias == alias && !path.m_Pathexp.empty() )
|
||||
@@ -392,10 +392,10 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
||||
if( !( m_errflags & ERRFLG_ALIAS ) )
|
||||
{
|
||||
m_errflags |= ERRFLG_ALIAS;
|
||||
wxString errmsg = "[3D File Resolver] No such path; ensure the path alias is defined";
|
||||
errmsg.append( "\n" );
|
||||
wxString errmsg = wxT( "[3D File Resolver] No such path; ensure the path alias is defined" );
|
||||
errmsg.append( wxT( "\n" ) );
|
||||
errmsg.append( tname.substr( 1 ) );
|
||||
errmsg.append( "\n" );
|
||||
errmsg.append( wxT( "\n" ) );
|
||||
wxLogTrace( tracePathsAndFiles, errmsg );
|
||||
}
|
||||
|
||||
@@ -420,15 +420,15 @@ bool FILENAME_RESOLVER::addPath( const SEARCH_PATH& aPath )
|
||||
tpath.m_Pathvar.erase( tpath.m_Pathvar.length() - 1 );
|
||||
#endif
|
||||
|
||||
wxFileName path( ExpandEnvVarSubstitutions( tpath.m_Pathvar, m_project ), "" );
|
||||
wxFileName path( ExpandEnvVarSubstitutions( tpath.m_Pathvar, m_project ), wxEmptyString );
|
||||
|
||||
path.Normalize();
|
||||
|
||||
if( !path.DirExists() )
|
||||
{
|
||||
if( aPath.m_Pathvar == "${KICAD6_3DMODEL_DIR}"
|
||||
|| aPath.m_Pathvar == "${KIPRJMOD}" || aPath.m_Pathvar == "$(KIPRJMOD)"
|
||||
|| aPath.m_Pathvar == "${KISYS3DMOD}" || aPath.m_Pathvar == "$(KISYS3DMOD)" )
|
||||
if( aPath.m_Pathvar == wxT( "${KICAD6_3DMODEL_DIR}" )
|
||||
|| aPath.m_Pathvar == wxT( "${KIPRJMOD}" ) || aPath.m_Pathvar == wxT( "$(KIPRJMOD)" )
|
||||
|| aPath.m_Pathvar == wxT( "${KISYS3DMOD}" ) || aPath.m_Pathvar == wxT( "$(KISYS3DMOD)" ) )
|
||||
{
|
||||
// suppress the message if the missing pathvar is a system variable
|
||||
}
|
||||
@@ -465,10 +465,10 @@ bool FILENAME_RESOLVER::addPath( const SEARCH_PATH& aPath )
|
||||
wxString msg = _( "Alias: " );
|
||||
msg.append( tpath.m_Alias );
|
||||
msg.append( wxT( "\n" ) );
|
||||
msg.append( _( "This path:" ) + wxS( " " ) );
|
||||
msg.append( _( "This path:wxT( " ) + wxS( " ) " ) );
|
||||
msg.append( tpath.m_Pathvar );
|
||||
msg.append( wxT( "\n" ) );
|
||||
msg.append( _( "Existing path:" ) + wxS( " " ) );
|
||||
msg.append( _( "Existing path:wxT( " ) + wxS( " ) " ) );
|
||||
msg.append( sPL->m_Pathvar );
|
||||
wxMessageBox( msg, _( "Bad alias (duplicate name)" ) );
|
||||
|
||||
@@ -489,9 +489,9 @@ bool FILENAME_RESOLVER::readPathList()
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = "3D configuration directory is unknown";
|
||||
ostr << " * " << errmsg.ToUTF8();
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxString errmsg = wxT( "3D configuration directory is unknown" );
|
||||
ostr << wxT( " * " ) << errmsg.ToUTF8();
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -508,10 +508,10 @@ bool FILENAME_RESOLVER::readPathList()
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = "no 3D configuration file";
|
||||
wxString errmsg = wxT( "no 3D configuration file" );
|
||||
ostr << " * " << errmsg.ToUTF8() << " '";
|
||||
ostr << cfgname.ToUTF8() << "'";
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -521,9 +521,9 @@ bool FILENAME_RESOLVER::readPathList()
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = "Could not open configuration file";
|
||||
wxString errmsg = wxT( "Could not open configuration file" );
|
||||
ostr << " * " << errmsg.ToUTF8() << " '" << cfgname.ToUTF8() << "'";
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -566,9 +566,9 @@ bool FILENAME_RESOLVER::readPathList()
|
||||
|
||||
// Don't add KICAD6_3DMODEL_DIR, one of its legacy equivalents, or KIPRJMOD from a
|
||||
// config file. They're system variables are are defined at runtime.
|
||||
if( al.m_Alias == "${KICAD6_3DMODEL_DIR}"
|
||||
|| al.m_Alias == "${KIPRJMOD}" || al.m_Alias == "$(KIPRJMOD)"
|
||||
|| al.m_Alias == "${KISYS3DMOD}" || al.m_Alias == "$(KISYS3DMOD)" )
|
||||
if( al.m_Alias == wxT( "${KICAD6_3DMODEL_DIR}" )
|
||||
|| al.m_Alias == wxT( "${KIPRJMOD}" ) || al.m_Alias == wxT( "$(KIPRJMOD)" )
|
||||
|| al.m_Alias == wxT( "${KISYS3DMOD}" ) || al.m_Alias == wxT( "$(KISYS3DMOD)" ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -600,7 +600,7 @@ bool FILENAME_RESOLVER::WritePathList( const wxString& aDir, const wxString& aFi
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = _( "3D configuration directory is unknown" );
|
||||
ostr << " * " << errmsg.ToUTF8();
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
wxMessageBox( errmsg, _( "Write 3D search path list" ) );
|
||||
|
||||
return false;
|
||||
@@ -613,7 +613,7 @@ bool FILENAME_RESOLVER::WritePathList( const wxString& aDir, const wxString& aFi
|
||||
// skip all ${ENV_VAR} alias names
|
||||
|
||||
while( sPL != m_paths.end()
|
||||
&& ( sPL->m_Alias.StartsWith( "${" ) || sPL->m_Alias.StartsWith( "$(" ) ) )
|
||||
&& ( sPL->m_Alias.StartsWith( wxT( "${" ) ) || sPL->m_Alias.StartsWith( wxT( "$(" ) ) ) )
|
||||
{
|
||||
++sPL;
|
||||
}
|
||||
@@ -631,7 +631,7 @@ bool FILENAME_RESOLVER::WritePathList( const wxString& aDir, const wxString& aFi
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = _( "Could not open configuration file" );
|
||||
ostr << " * " << errmsg.ToUTF8() << " '" << cfgname.ToUTF8() << "'";
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
wxMessageBox( errmsg, _( "Write 3D search path list" ) );
|
||||
|
||||
return false;
|
||||
@@ -677,17 +677,17 @@ void FILENAME_RESOLVER::checkEnvVarPath( const wxString& aPath )
|
||||
{
|
||||
bool useParen = false;
|
||||
|
||||
if( aPath.StartsWith( "$(" ) )
|
||||
if( aPath.StartsWith( wxT( "$(" ) ) )
|
||||
useParen = true;
|
||||
else if( !aPath.StartsWith( "${" ) )
|
||||
else if( !aPath.StartsWith( wxT( "${" ) ) )
|
||||
return;
|
||||
|
||||
size_t pEnd;
|
||||
|
||||
if( useParen )
|
||||
pEnd = aPath.find( ")" );
|
||||
pEnd = aPath.find( wxT( ")" ) );
|
||||
else
|
||||
pEnd = aPath.find( "}" );
|
||||
pEnd = aPath.find( wxT( "}" ) );
|
||||
|
||||
if( pEnd == wxString::npos )
|
||||
return;
|
||||
@@ -704,7 +704,7 @@ void FILENAME_RESOLVER::checkEnvVarPath( const wxString& aPath )
|
||||
if( sPL->m_Alias == envar )
|
||||
return;
|
||||
|
||||
if( !sPL->m_Alias.StartsWith( "${" ) )
|
||||
if( !sPL->m_Alias.StartsWith( wxT( "${" ) ) )
|
||||
break;
|
||||
|
||||
++sPL;
|
||||
@@ -713,7 +713,7 @@ void FILENAME_RESOLVER::checkEnvVarPath( const wxString& aPath )
|
||||
SEARCH_PATH lpath;
|
||||
lpath.m_Alias = envar;
|
||||
lpath.m_Pathvar = lpath.m_Alias;
|
||||
wxFileName tmpFN( ExpandEnvVarSubstitutions( lpath.m_Alias, m_project ), "" );
|
||||
wxFileName tmpFN( ExpandEnvVarSubstitutions( lpath.m_Alias, m_project ), wxEmptyString );
|
||||
|
||||
wxUniChar psep = tmpFN.GetPathSeparator();
|
||||
tmpFN.Normalize();
|
||||
@@ -758,7 +758,7 @@ wxString FILENAME_RESOLVER::ShortenPath( const wxString& aFullPathName )
|
||||
wxFileName fpath;
|
||||
|
||||
// in the case of aliases, ensure that we use the most recent definition
|
||||
if( sL->m_Alias.StartsWith( "${" ) || sL->m_Alias.StartsWith( "$(" ) )
|
||||
if( sL->m_Alias.StartsWith( wxT( "${" ) ) || sL->m_Alias.StartsWith( wxT( "$(" ) ) )
|
||||
{
|
||||
wxString tpath = ExpandEnvVarSubstitutions( sL->m_Alias, m_project );
|
||||
|
||||
@@ -768,11 +768,11 @@ wxString FILENAME_RESOLVER::ShortenPath( const wxString& aFullPathName )
|
||||
continue;
|
||||
}
|
||||
|
||||
fpath.Assign( tpath, wxT( "" ) );
|
||||
fpath.Assign( tpath, wxEmptyString );
|
||||
}
|
||||
else
|
||||
{
|
||||
fpath.Assign( sL->m_Pathexp, wxT( "" ) );
|
||||
fpath.Assign( sL->m_Pathexp, wxEmptyString );
|
||||
}
|
||||
|
||||
wxString fps = fpath.GetPathWithSep();
|
||||
@@ -789,19 +789,19 @@ wxString FILENAME_RESOLVER::ShortenPath( const wxString& aFullPathName )
|
||||
fname.Replace( wxT( "\\" ), wxT( "/" ) );
|
||||
#endif
|
||||
|
||||
if( sL->m_Alias.StartsWith( "${" ) || sL->m_Alias.StartsWith( "$(" ) )
|
||||
if( sL->m_Alias.StartsWith( wxT( "${" ) ) || sL->m_Alias.StartsWith( wxT( "$(" ) ) )
|
||||
{
|
||||
// old style ENV_VAR
|
||||
tname = sL->m_Alias;
|
||||
tname.Append( "/" );
|
||||
tname.Append( wxT( "/" ) );
|
||||
tname.append( fname );
|
||||
}
|
||||
else
|
||||
{
|
||||
// new style alias
|
||||
tname = ":";
|
||||
tname = wxT( ":" );
|
||||
tname.append( sL->m_Alias );
|
||||
tname.append( ":" );
|
||||
tname.append( wxT( ":" ) );
|
||||
tname.append( fname );
|
||||
}
|
||||
|
||||
@@ -864,9 +864,9 @@ static bool getHollerith( const std::string& aString, size_t& aIndex, wxString&
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = "bad Hollerith string on line";
|
||||
wxString errmsg = wxT( "bad Hollerith string on line" );
|
||||
ostr << " * " << errmsg.ToUTF8() << "\n'" << aString << "'";
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -877,9 +877,9 @@ static bool getHollerith( const std::string& aString, size_t& aIndex, wxString&
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = "missing opening quote mark in config file";
|
||||
wxString errmsg = wxT( "missing opening quote mark in config file" );
|
||||
ostr << " * " << errmsg.ToUTF8() << "\n'" << aString << "'";
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -890,9 +890,9 @@ static bool getHollerith( const std::string& aString, size_t& aIndex, wxString&
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = "invalid entry (unexpected end of line)";
|
||||
wxString errmsg = wxT( "invalid entry (unexpected end of line)" );
|
||||
ostr << " * " << errmsg.ToUTF8() << "\n'" << aString << "'";
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -906,9 +906,9 @@ static bool getHollerith( const std::string& aString, size_t& aIndex, wxString&
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = "bad Hollerith string on line";
|
||||
wxString errmsg = wxT( "bad Hollerith string on line" );
|
||||
ostr << " * " << errmsg.ToUTF8() << "\n'" << aString << "'";
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -922,9 +922,9 @@ static bool getHollerith( const std::string& aString, size_t& aIndex, wxString&
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = "invalid entry (unexpected end of line)";
|
||||
wxString errmsg = wxT( "invalid entry (unexpected end of line)" );
|
||||
ostr << " * " << errmsg.ToUTF8() << "\n'" << aString << "'";
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -939,9 +939,9 @@ static bool getHollerith( const std::string& aString, size_t& aIndex, wxString&
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = "missing closing quote mark in config file";
|
||||
wxString errmsg = wxT( "missing closing quote mark in config file" );
|
||||
ostr << " * " << errmsg.ToUTF8() << "\n'" << aString << "'";
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -1015,9 +1015,9 @@ bool FILENAME_RESOLVER::ValidateFileName( const wxString& aFileName, bool& hasAl
|
||||
// environment string before testing
|
||||
aliasEnd = wxString::npos;
|
||||
|
||||
if( aFileName.StartsWith( "${" ) )
|
||||
if( aFileName.StartsWith( wxT( "${" ) ) )
|
||||
aliasEnd = aFileName.find( '}' );
|
||||
else if( aFileName.StartsWith( "$(" ) )
|
||||
else if( aFileName.StartsWith( wxT( "$(" ) ) )
|
||||
aliasEnd = aFileName.find( ')' );
|
||||
|
||||
if( aliasEnd != wxString::npos )
|
||||
@@ -1031,8 +1031,8 @@ bool FILENAME_RESOLVER::ValidateFileName( const wxString& aFileName, bool& hasAl
|
||||
// So remove separators
|
||||
wxString lpath_no_sep = lpath;
|
||||
#ifdef __WINDOWS__
|
||||
lpath_no_sep.Replace( "/", " " );
|
||||
lpath_no_sep.Replace( "\\", " " );
|
||||
lpath_no_sep.Replace( wxT( "/" ), wxT( " " ) );
|
||||
lpath_no_sep.Replace( wxT( "\\" ), wxT( " " ) );
|
||||
|
||||
// A disk identifier is allowed, and therefore remove its separator
|
||||
if( lpath_no_sep.Length() > 1 && lpath_no_sep[1] == ':' )
|
||||
@@ -1064,32 +1064,32 @@ bool FILENAME_RESOLVER::GetKicadPaths( std::list< wxString >& paths ) const
|
||||
while( mS != mE )
|
||||
{
|
||||
// filter out URLs, template directories, and known system paths
|
||||
if( mS->first == wxString( "KICAD_PTEMPLATES" )
|
||||
|| mS->first == wxString( "KICAD6_FOOTPRINT_DIR" ) )
|
||||
if( mS->first == wxString( wxT( "KICAD_PTEMPLATES" ) )
|
||||
|| mS->first == wxString( wxT( "KICAD6_FOOTPRINT_DIR" ) ) )
|
||||
{
|
||||
++mS;
|
||||
continue;
|
||||
}
|
||||
|
||||
if( wxString::npos != mS->second.GetValue().find( wxString( "://" ) ) )
|
||||
if( wxString::npos != mS->second.GetValue().find( wxString( wxT( "://" ) ) ) )
|
||||
{
|
||||
++mS;
|
||||
continue;
|
||||
}
|
||||
|
||||
wxString tmp( "${" );
|
||||
wxString tmp( wxT( "${" ) );
|
||||
tmp.Append( mS->first );
|
||||
tmp.Append( "}" );
|
||||
tmp.Append( wxT( "}" ) );
|
||||
paths.push_back( tmp );
|
||||
|
||||
if( tmp == "${KICAD6_3DMODEL_DIR}" )
|
||||
if( tmp == wxT( "${KICAD6_3DMODEL_DIR}" ) )
|
||||
hasKisys3D = true;
|
||||
|
||||
++mS;
|
||||
}
|
||||
|
||||
if( !hasKisys3D )
|
||||
paths.emplace_back("${KICAD6_3DMODEL_DIR}" );
|
||||
paths.emplace_back(wxT( "${KICAD6_3DMODEL_DIR}" ) );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ bool FOOTPRINT_FILTER_IT::FootprintFilterMatch( FOOTPRINT_INFO& aItem )
|
||||
// If the filter contains a ':' character, include the library name in the pattern
|
||||
if( each_filter->GetPattern().Contains( ":" ) )
|
||||
{
|
||||
name = aItem.GetLibNickname().Lower() + ":";
|
||||
name = aItem.GetLibNickname().Lower() + wxT( ":" );
|
||||
}
|
||||
|
||||
name += aItem.GetFootprintName().Lower();
|
||||
|
||||
@@ -107,7 +107,7 @@ void FOOTPRINT_LIST::DisplayErrors( wxTopLevelWindow* aWindow )
|
||||
wxString tmp = error->Problem();
|
||||
|
||||
// Preserve new lines in error messages so queued errors don't run together.
|
||||
tmp.Replace( "\n", "<BR>" );
|
||||
tmp.Replace( wxT( "\n" ), wxT( "<BR>" ) );
|
||||
msg += wxT( "<p>" ) + tmp + wxT( "</p>" );
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ FOOTPRINT_LIST* FOOTPRINT_LIST::GetInstance( KIWAY& aKiway )
|
||||
return nullptr;
|
||||
|
||||
if( !footprintInfo->GetCount() )
|
||||
footprintInfo->ReadCacheFromFile( aKiway.Prj().GetProjectPath() + "fp-info-cache" );
|
||||
footprintInfo->ReadCacheFromFile( aKiway.Prj().GetProjectPath() + wxT( "fp-info-cache" ) );
|
||||
|
||||
return footprintInfo;
|
||||
}
|
||||
|
||||
@@ -474,7 +474,7 @@ FOOTPRINT* FP_LIB_TABLE::FootprintLoadWithOptionalNickname( const LIB_ID& aFootp
|
||||
|
||||
const wxString FP_LIB_TABLE::GlobalPathEnvVariableName()
|
||||
{
|
||||
return "KICAD6_FOOTPRINT_DIR";
|
||||
return wxT( "KICAD6_FOOTPRINT_DIR" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -204,6 +204,8 @@ wxColour COLOR4D::ToColour() const
|
||||
return colour;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
COLOR4D COLOR4D::LegacyMix( const COLOR4D& aColor ) const
|
||||
{
|
||||
@@ -237,8 +239,6 @@ void COLOR4D::FromU32( unsigned int aPackedColor )
|
||||
a = c.Alpha() / 255.0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
namespace KIGFX {
|
||||
|
||||
@@ -510,7 +510,7 @@ const COLOR4D COLOR4D::BLACK( 0, 0, 0, 1 );
|
||||
const COLOR4D COLOR4D::CLEAR( 1, 0, 1, 0 );
|
||||
|
||||
|
||||
int COLOR4D::Distance( const COLOR4D& other ) const
|
||||
double COLOR4D::Distance( const COLOR4D& other ) const
|
||||
{
|
||||
return ( r - other.r ) * ( r - other.r )
|
||||
+ ( g - other.g ) * ( g - other.g )
|
||||
|
||||
@@ -59,7 +59,7 @@ static OPT<double> getKiCadConfiguredScale( const COMMON_SETTINGS& aConfig )
|
||||
|
||||
if( scale )
|
||||
{
|
||||
wxLogTrace( traceHiDpi, "Scale factor (configured): %f", *scale );
|
||||
wxLogTrace( traceHiDpi, wxT( "Scale factor (configured): %f" ), *scale );
|
||||
}
|
||||
|
||||
return scale;
|
||||
@@ -85,7 +85,7 @@ static OPT<double> getEnvironmentScale()
|
||||
|
||||
if( scale )
|
||||
{
|
||||
wxLogTrace( traceHiDpi, "Scale factor (environment): %f", *scale );
|
||||
wxLogTrace( traceHiDpi, wxT( "Scale factor (environment): %f" ), *scale );
|
||||
}
|
||||
|
||||
return scale;
|
||||
@@ -118,14 +118,14 @@ double DPI_SCALING::GetScaleFactor() const
|
||||
// On Linux, this will not work until WX 3.2 and GTK >= 3.10
|
||||
// Otherwise it returns 1.0
|
||||
val = KIPLATFORM::UI::GetSystemScaleFactor( m_window );
|
||||
wxLogTrace( traceHiDpi, "Scale factor (WX): %f", *val );
|
||||
wxLogTrace( traceHiDpi, wxT( "Scale factor (WX): %f" ), *val );
|
||||
}
|
||||
|
||||
if( !val )
|
||||
{
|
||||
// Nothing else we can do, give it a default value
|
||||
val = GetDefaultScaleFactor();
|
||||
wxLogTrace( traceHiDpi, "Scale factor (default): %f", *val );
|
||||
wxLogTrace( traceHiDpi, wxT( "Scale factor (default): %f" ), *val );
|
||||
}
|
||||
|
||||
return *val;
|
||||
@@ -141,14 +141,14 @@ bool DPI_SCALING::GetCanvasIsAutoScaled() const
|
||||
}
|
||||
|
||||
const bool automatic = getKiCadConfiguredScale( *m_config ) == boost::none;
|
||||
wxLogTrace( traceHiDpi, "Scale is automatic: %d", automatic );
|
||||
wxLogTrace( traceHiDpi, wxT( "Scale is automatic: %d" ), automatic );
|
||||
return automatic;
|
||||
}
|
||||
|
||||
|
||||
void DPI_SCALING::SetDpiConfig( bool aAuto, double aValue )
|
||||
{
|
||||
wxCHECK_RET( m_config != nullptr, "Setting DPI config without a config store." );
|
||||
wxCHECK_RET( m_config != nullptr, wxT( "Setting DPI config without a config store." ) );
|
||||
|
||||
const double value = aAuto ? 0.0 : aValue;
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ GAL_DISPLAY_OPTIONS::GAL_DISPLAY_OPTIONS()
|
||||
|
||||
void GAL_DISPLAY_OPTIONS::ReadWindowSettings( WINDOW_SETTINGS& aCfg )
|
||||
{
|
||||
wxLogTrace( traceGalDispOpts, "Reading app-specific options" );
|
||||
wxLogTrace( traceGalDispOpts, wxT( "Reading app-specific options" ) );
|
||||
|
||||
m_gridStyle = UTIL::GetValFromConfig( gridStyleConfigVals, aCfg.grid.style );
|
||||
m_gridSnapping = UTIL::GetValFromConfig( gridSnapConfigVals, aCfg.grid.snap );
|
||||
@@ -91,7 +91,7 @@ void GAL_DISPLAY_OPTIONS::ReadWindowSettings( WINDOW_SETTINGS& aCfg )
|
||||
|
||||
void GAL_DISPLAY_OPTIONS::ReadCommonConfig( COMMON_SETTINGS& aSettings, wxWindow* aWindow )
|
||||
{
|
||||
wxLogTrace( traceGalDispOpts, "Reading common config" );
|
||||
wxLogTrace( traceGalDispOpts, wxT( "Reading common config" ) );
|
||||
|
||||
gl_antialiasing_mode = static_cast<KIGFX::OPENGL_ANTIALIASING_MODE>(
|
||||
aSettings.m_Graphics.opengl_aa_mode );
|
||||
@@ -109,7 +109,7 @@ void GAL_DISPLAY_OPTIONS::ReadCommonConfig( COMMON_SETTINGS& aSettings, wxWindow
|
||||
void GAL_DISPLAY_OPTIONS::ReadConfig( COMMON_SETTINGS& aCommonConfig,
|
||||
WINDOW_SETTINGS& aWindowConfig, wxWindow* aWindow )
|
||||
{
|
||||
wxLogTrace( traceGalDispOpts, "Reading common and app config" );
|
||||
wxLogTrace( traceGalDispOpts, wxT( "Reading common and app config" ) );
|
||||
|
||||
ReadWindowSettings( aWindowConfig );
|
||||
|
||||
@@ -119,7 +119,7 @@ void GAL_DISPLAY_OPTIONS::ReadConfig( COMMON_SETTINGS& aCommonConfig,
|
||||
|
||||
void GAL_DISPLAY_OPTIONS::WriteConfig( WINDOW_SETTINGS& aCfg )
|
||||
{
|
||||
wxLogTrace( traceGalDispOpts, "Writing window settings" );
|
||||
wxLogTrace( traceGalDispOpts, wxT( "Writing window settings" ) );
|
||||
|
||||
aCfg.grid.style = UTIL::GetConfigForVal( gridStyleConfigVals, m_gridStyle );
|
||||
aCfg.grid.snap = UTIL::GetConfigForVal( gridSnapConfigVals, m_gridSnapping );
|
||||
@@ -143,7 +143,7 @@ void GAL_DISPLAY_OPTIONS::UpdateScaleFactor()
|
||||
|
||||
void GAL_DISPLAY_OPTIONS::NotifyChanged()
|
||||
{
|
||||
wxLogTrace( traceGalDispOpts, "Change notification" );
|
||||
wxLogTrace( traceGalDispOpts, wxT( "Change notification" ) );
|
||||
|
||||
Notify( &GAL_DISPLAY_OPTIONS_OBSERVER::OnGalDisplayOptionsChanged, *this );
|
||||
}
|
||||
|
||||
@@ -62,12 +62,12 @@ CACHED_CONTAINER_GPU::CACHED_CONTAINER_GPU( unsigned int aSize ) :
|
||||
// disable glCopyBuffer, causes crashes/freezes on certain driver versions
|
||||
// Note, Intel's GL_VENDOR string varies depending on GPU/driver generation
|
||||
// But generally always starts with Intel at least
|
||||
if( vendor.StartsWith( "Intel" ) || vendor.Contains( "etnaviv" ) )
|
||||
if( vendor.StartsWith( wxT( "Intel" ) ) || vendor.Contains( "etnaviv" ) )
|
||||
{
|
||||
m_useCopyBuffer = false;
|
||||
}
|
||||
|
||||
KI_TRACE( traceGalProfile, "VBO initial size: %d\n", m_currentSize );
|
||||
KI_TRACE( traceGalProfile, wxT( "VBO initial size: %d\n" ), m_currentSize );
|
||||
|
||||
glGenBuffers( 1, &m_glBufferHandle );
|
||||
glBindBuffer( GL_ARRAY_BUFFER, m_glBufferHandle );
|
||||
@@ -213,14 +213,14 @@ bool CACHED_CONTAINER_GPU::defragmentResize( unsigned int aNewSize )
|
||||
#ifdef KICAD_GAL_PROFILE
|
||||
totalTime.Stop();
|
||||
|
||||
wxLogTrace( traceGalCachedContainerGpu, "Defragmented container storing %d vertices / %.1f ms",
|
||||
wxLogTrace( traceGalCachedContainerGpu, wxT( "Defragmented container storing %d vertices / %.1f ms" ),
|
||||
m_currentSize - m_freeSpace, totalTime.msecs() );
|
||||
#endif /* KICAD_GAL_PROFILE */
|
||||
|
||||
m_freeSpace += ( aNewSize - m_currentSize );
|
||||
m_currentSize = aNewSize;
|
||||
|
||||
KI_TRACE( traceGalProfile, "VBO size %d used %d\n", m_currentSize, AllItemsSize() );
|
||||
KI_TRACE( traceGalProfile, wxT( "VBO size %d used %d\n" ), m_currentSize, AllItemsSize() );
|
||||
|
||||
// Now there is only one big chunk of free memory
|
||||
m_freeChunks.clear();
|
||||
@@ -280,14 +280,14 @@ bool CACHED_CONTAINER_GPU::defragmentResizeMemcpy( unsigned int aNewSize )
|
||||
#ifdef KICAD_GAL_PROFILE
|
||||
totalTime.Stop();
|
||||
|
||||
wxLogTrace( traceGalCachedContainerGpu, "Defragmented container storing %d vertices / %.1f ms",
|
||||
wxLogTrace( traceGalCachedContainerGpu, wxT( "Defragmented container storing %d vertices / %.1f ms" ),
|
||||
m_currentSize - m_freeSpace, totalTime.msecs() );
|
||||
#endif /* KICAD_GAL_PROFILE */
|
||||
|
||||
m_freeSpace += ( aNewSize - m_currentSize );
|
||||
m_currentSize = aNewSize;
|
||||
|
||||
KI_TRACE( traceGalProfile, "VBO size %d used: %d \n", m_currentSize, AllItemsSize() );
|
||||
KI_TRACE( traceGalProfile, wxT( "VBO size %d used: %d \n" ), m_currentSize, AllItemsSize() );
|
||||
|
||||
// Now there is only one big chunk of free memory
|
||||
m_freeChunks.clear();
|
||||
|
||||
@@ -118,7 +118,7 @@ bool CACHED_CONTAINER_RAM::defragmentResize( unsigned int aNewSize )
|
||||
#ifdef KICAD_GAL_PROFILE
|
||||
totalTime.Stop();
|
||||
|
||||
wxLogTrace( traceGalCachedContainer, "Defragmented container storing %d vertices / %.1f ms",
|
||||
wxLogTrace( traceGalCachedContainer, wxT( "Defragmented container storing %d vertices / %.1f ms" ),
|
||||
m_currentSize - m_freeSpace, totalTime.msecs() );
|
||||
#endif /* KICAD_GAL_PROFILE */
|
||||
|
||||
|
||||
@@ -219,7 +219,7 @@ void GPU_CACHED_MANAGER::EndDrawing()
|
||||
cntDraw.Stop();
|
||||
|
||||
KI_TRACE( traceGalProfile,
|
||||
"Cached manager size: VBO size %u iranges %llu max elt size %u drawcalls %u\n",
|
||||
"Cached manager size: VBO size %u iranges %zu max elt size %u drawcalls %u\n",
|
||||
cached->AllItemsSize(), m_vranges.size(), m_indexBufMaxSize, drawCalls );
|
||||
KI_TRACE( traceGalProfile, "Timing: %s\n", cntDraw.to_string() );
|
||||
|
||||
|
||||
@@ -204,8 +204,10 @@ OPENGL_GAL::OPENGL_GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions, wxWindow* aParent,
|
||||
m_cachedManager( nullptr ),
|
||||
m_nonCachedManager( nullptr ),
|
||||
m_overlayManager( nullptr ),
|
||||
m_tempManager( nullptr ),
|
||||
m_mainBuffer( 0 ),
|
||||
m_overlayBuffer( 0 ),
|
||||
m_tempBuffer( 0 ),
|
||||
m_isContextLocked( false ),
|
||||
m_lockClientCookie( 0 )
|
||||
{
|
||||
@@ -300,6 +302,7 @@ OPENGL_GAL::~OPENGL_GAL()
|
||||
delete m_cachedManager;
|
||||
delete m_nonCachedManager;
|
||||
delete m_overlayManager;
|
||||
delete m_tempManager;
|
||||
}
|
||||
|
||||
GL_CONTEXT_MANAGER::Get().UnlockCtx( m_glPrivContext );
|
||||
@@ -333,7 +336,7 @@ wxString OPENGL_GAL::CheckFeatures( GAL_DISPLAY_OPTIONS& aOptions )
|
||||
{
|
||||
wxString retVal = wxEmptyString;
|
||||
|
||||
wxFrame* testFrame = new wxFrame( nullptr, wxID_ANY, wxT( "" ), wxDefaultPosition,
|
||||
wxFrame* testFrame = new wxFrame( nullptr, wxID_ANY, wxEmptyString, wxDefaultPosition,
|
||||
wxSize( 1, 1 ), wxFRAME_TOOL_WINDOW | wxNO_BORDER );
|
||||
|
||||
KIGFX::OPENGL_GAL* opengl_gal = nullptr;
|
||||
@@ -442,13 +445,14 @@ void OPENGL_GAL::BeginDrawing()
|
||||
// Prepare rendering target buffers
|
||||
m_compositor->Initialize();
|
||||
m_mainBuffer = m_compositor->CreateBuffer();
|
||||
m_tempBuffer = m_compositor->CreateBuffer();
|
||||
try
|
||||
{
|
||||
m_overlayBuffer = m_compositor->CreateBuffer();
|
||||
}
|
||||
catch( const std::runtime_error& )
|
||||
{
|
||||
wxLogVerbose( "Could not create a framebuffer for overlays.\n" );
|
||||
wxLogVerbose( wxT( "Could not create a framebuffer for overlays.\n" ) );
|
||||
m_overlayBuffer = 0;
|
||||
}
|
||||
|
||||
@@ -493,10 +497,12 @@ void OPENGL_GAL::BeginDrawing()
|
||||
// Remove all previously stored items
|
||||
m_nonCachedManager->Clear();
|
||||
m_overlayManager->Clear();
|
||||
m_tempManager->Clear();
|
||||
|
||||
m_cachedManager->BeginDrawing();
|
||||
m_nonCachedManager->BeginDrawing();
|
||||
m_overlayManager->BeginDrawing();
|
||||
m_tempManager->BeginDrawing();
|
||||
|
||||
if( !m_isBitmapFontInitialized )
|
||||
{
|
||||
@@ -573,7 +579,7 @@ void OPENGL_GAL::BeginDrawing()
|
||||
|
||||
void OPENGL_GAL::EndDrawing()
|
||||
{
|
||||
wxASSERT_MSG( m_isContextLocked, "What happened to the context lock?" );
|
||||
wxASSERT_MSG( m_isContextLocked, wxT( "What happened to the context lock?" ) );
|
||||
|
||||
PROF_TIMER cntTotal("gl-end-total");
|
||||
PROF_TIMER cntEndCached("gl-end-cached");
|
||||
@@ -623,7 +629,7 @@ void OPENGL_GAL::EndDrawing()
|
||||
|
||||
cntTotal.Stop();
|
||||
|
||||
KI_TRACE( traceGalProfile, "Timing: %s %s %s %s %s %s\n", cntTotal.to_string(),
|
||||
KI_TRACE( traceGalProfile, wxT( "Timing: %s %s %s %s %s %s\n" ), cntTotal.to_string(),
|
||||
cntEndCached.to_string(), cntEndNoncached.to_string(), cntEndOverlay.to_string(),
|
||||
cntComposite.to_string(), cntSwap.to_string() );
|
||||
}
|
||||
@@ -631,7 +637,7 @@ void OPENGL_GAL::EndDrawing()
|
||||
|
||||
void OPENGL_GAL::LockContext( int aClientCookie )
|
||||
{
|
||||
wxASSERT_MSG( !m_isContextLocked, "Context already locked." );
|
||||
wxASSERT_MSG( !m_isContextLocked, wxT( "Context already locked." ) );
|
||||
m_isContextLocked = true;
|
||||
m_lockClientCookie = aClientCookie;
|
||||
|
||||
@@ -1705,6 +1711,7 @@ void OPENGL_GAL::SetTarget( RENDER_TARGET aTarget )
|
||||
case TARGET_CACHED: m_currentManager = m_cachedManager; break;
|
||||
case TARGET_NONCACHED: m_currentManager = m_nonCachedManager; break;
|
||||
case TARGET_OVERLAY: m_currentManager = m_overlayManager; break;
|
||||
case TARGET_TEMP: m_currentManager = m_tempManager; break;
|
||||
}
|
||||
|
||||
m_currentTarget = aTarget;
|
||||
@@ -1731,6 +1738,10 @@ void OPENGL_GAL::ClearTarget( RENDER_TARGET aTarget )
|
||||
m_compositor->SetBuffer( m_mainBuffer );
|
||||
break;
|
||||
|
||||
case TARGET_TEMP:
|
||||
m_compositor->SetBuffer( m_tempBuffer );
|
||||
break;
|
||||
|
||||
case TARGET_OVERLAY:
|
||||
if( m_overlayBuffer )
|
||||
m_compositor->SetBuffer( m_overlayBuffer );
|
||||
@@ -1752,6 +1763,7 @@ bool OPENGL_GAL::HasTarget( RENDER_TARGET aTarget )
|
||||
switch( aTarget )
|
||||
{
|
||||
default:
|
||||
case TARGET_TEMP:
|
||||
case TARGET_CACHED:
|
||||
case TARGET_NONCACHED: return true;
|
||||
case TARGET_OVERLAY: return ( m_overlayBuffer != 0 );
|
||||
@@ -1762,14 +1774,18 @@ bool OPENGL_GAL::HasTarget( RENDER_TARGET aTarget )
|
||||
void OPENGL_GAL::StartDiffLayer()
|
||||
{
|
||||
m_currentManager->EndDrawing();
|
||||
SetTarget( TARGET_TEMP );
|
||||
ClearTarget( TARGET_TEMP );
|
||||
}
|
||||
|
||||
|
||||
void OPENGL_GAL::EndDiffLayer()
|
||||
{
|
||||
glBlendFunc( GL_SRC_ALPHA, GL_ONE );
|
||||
glBlendEquation( GL_MAX );
|
||||
m_currentManager->EndDrawing();
|
||||
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
|
||||
glBlendEquation( GL_FUNC_ADD );
|
||||
|
||||
m_compositor->DrawBuffer( m_tempBuffer, m_mainBuffer );
|
||||
}
|
||||
|
||||
|
||||
@@ -2216,7 +2232,7 @@ void OPENGL_GAL::init()
|
||||
{
|
||||
wxASSERT( IsShownOnScreen() );
|
||||
|
||||
wxASSERT_MSG( m_isContextLocked, "This should only be called from within a locked context." );
|
||||
wxASSERT_MSG( m_isContextLocked, wxT( "This should only be called from within a locked context." ) );
|
||||
|
||||
// IsDisplayAttr() handles WX_GL_{MAJOR,MINOR}_VERSION correctly only in 3.0.4
|
||||
// starting with 3.1.0 one should use wxGLContext::IsOk() (done by GL_CONTEXT_MANAGER)
|
||||
@@ -2296,11 +2312,13 @@ void OPENGL_GAL::init()
|
||||
m_cachedManager = new VERTEX_MANAGER( true );
|
||||
m_nonCachedManager = new VERTEX_MANAGER( false );
|
||||
m_overlayManager = new VERTEX_MANAGER( false );
|
||||
m_tempManager = new VERTEX_MANAGER( false );
|
||||
|
||||
// Make VBOs use shaders
|
||||
m_cachedManager->SetShader( *m_shader );
|
||||
m_nonCachedManager->SetShader( *m_shader );
|
||||
m_overlayManager->SetShader( *m_shader );
|
||||
m_tempManager->SetShader( *m_shader );
|
||||
|
||||
m_isInitialized = true;
|
||||
}
|
||||
|
||||
+17
-17
@@ -74,41 +74,41 @@ int checkGlError( const std::string& aInfo, const char* aFile, int aLine, bool a
|
||||
switch( status )
|
||||
{
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT:
|
||||
errorMsg = "The framebuffer attachment points are incomplete.";
|
||||
errorMsg = wxT( "The framebuffer attachment points are incomplete." );
|
||||
break;
|
||||
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT:
|
||||
errorMsg = "No images attached to the framebuffer.";
|
||||
errorMsg = wxT( "No images attached to the framebuffer." );
|
||||
break;
|
||||
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT:
|
||||
errorMsg = "The framebuffer does not have at least one image attached to it.";
|
||||
errorMsg = wxT( "The framebuffer does not have at least one image attached to it." );
|
||||
break;
|
||||
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT:
|
||||
errorMsg = "The framebuffer read buffer is incomplete.";
|
||||
errorMsg = wxT( "The framebuffer read buffer is incomplete." );
|
||||
break;
|
||||
|
||||
case GL_FRAMEBUFFER_UNSUPPORTED_EXT:
|
||||
errorMsg = "The combination of internal formats of the attached images violates "
|
||||
"an implementation dependent set of restrictions.";
|
||||
errorMsg = wxT( "The combination of internal formats of the attached images violates " )
|
||||
wxT( "an implementation dependent set of restrictions." );
|
||||
break;
|
||||
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT:
|
||||
errorMsg = "GL_RENDERBUFFER_SAMPLES is not the same for all attached render "
|
||||
"buffers.";
|
||||
errorMsg = wxT( "GL_RENDERBUFFER_SAMPLES is not the same for all attached render " )
|
||||
wxT( "buffers." );
|
||||
break;
|
||||
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT:
|
||||
errorMsg = "Framebuffer incomplete layer targets errors.";
|
||||
errorMsg = wxT( "Framebuffer incomplete layer targets errors." );
|
||||
break;
|
||||
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT:
|
||||
errorMsg = "Framebuffer attachments have different dimensions";
|
||||
errorMsg = wxT( "Framebuffer attachments have different dimensions" );
|
||||
break;
|
||||
|
||||
default:
|
||||
errorMsg.Printf( "Unknown incomplete framebuffer error id %X", status );
|
||||
errorMsg.Printf( wxT( "Unknown incomplete framebuffer error id %X" ), status );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -140,7 +140,7 @@ int checkGlError( const std::string& aInfo, const char* aFile, int aLine, bool a
|
||||
if( aThrow )
|
||||
{
|
||||
wxLogTrace( traceGalOpenGlError, wxT( "Throwing exception for glGetError() '%s' "
|
||||
"in file '%s' on line %d." ),
|
||||
wxT( "in file '%s' on line %d." ) ),
|
||||
errorMsg,
|
||||
aFile,
|
||||
aLine );
|
||||
@@ -154,7 +154,7 @@ int checkGlError( const std::string& aInfo, const char* aFile, int aLine, bool a
|
||||
aFile,
|
||||
aLine );
|
||||
|
||||
DisplayErrorMessage( nullptr, "OpenGL Error", errorMsg );
|
||||
DisplayErrorMessage( nullptr, wxT( "OpenGL Error" ), errorMsg );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,13 +170,13 @@ static void GLAPIENTRY debugMsgCallback( GLenum aSource, GLenum aType, GLuint aI
|
||||
{
|
||||
switch( aSeverity )
|
||||
{
|
||||
case GL_DEBUG_SEVERITY_HIGH: wxLogDebug( "OpenGL ERROR: " ); break;
|
||||
case GL_DEBUG_SEVERITY_MEDIUM: wxLogDebug( "OpenGL WARNING: " ); break;
|
||||
case GL_DEBUG_SEVERITY_LOW: wxLogDebug( "OpenGL INFO: " ); break;
|
||||
case GL_DEBUG_SEVERITY_HIGH: wxLogDebug( wxT( "OpenGL ERROR: " ) ); break;
|
||||
case GL_DEBUG_SEVERITY_MEDIUM: wxLogDebug( wxT( "OpenGL WARNING: " ) ); break;
|
||||
case GL_DEBUG_SEVERITY_LOW: wxLogDebug( wxT( "OpenGL INFO: " ) ); break;
|
||||
case GL_DEBUG_SEVERITY_NOTIFICATION: return;
|
||||
}
|
||||
|
||||
wxLogDebug( "%s\n", aMessage );
|
||||
wxLogDebug( wxT( "%s\n" ), aMessage );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -536,7 +536,7 @@ std::string FormatStringToGerber( const wxString& aString )
|
||||
// Netname and Pan num fields cannot be empty in Gerber files
|
||||
// Normalized names must be used, if any
|
||||
#define NO_NET_NAME wxT( "N/C" ) // net name of not connected pads (one pad net) (normalized)
|
||||
#define NO_PAD_NAME wxT( "" ) // pad name of pads without pad name/number (not normalized)
|
||||
#define NO_PAD_NAME wxEmptyString // pad name of pads without pad name/number (not normalized)
|
||||
|
||||
|
||||
bool FormatNetAttribute( std::string& aPrintedText, std::string& aLastNetAttributes,
|
||||
|
||||
+5
-1
@@ -511,7 +511,11 @@ void GRCircle( EDA_RECT* ClipBox, wxDC* DC, int xc, int yc, int r, int width, co
|
||||
|
||||
GRSetBrush( DC, Color, NOT_FILLED );
|
||||
GRSetColorPen( DC, Color, width );
|
||||
DC->DrawEllipse( xc - r, yc - r, r + r, r + r );
|
||||
|
||||
// Draw two arcs here to make a circle. Unfortunately, the printerDC doesn't handle
|
||||
// transparent brushes when used with circles. It does work for for arcs, however
|
||||
DC->DrawArc(xc + r, yc, xc - r, yc, xc, yc);
|
||||
DC->DrawArc(xc - r, yc, xc + r, yc, xc, yc);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+38
-2
@@ -57,6 +57,7 @@ GRID_TRICKS::GRID_TRICKS( WX_GRID* aGrid ):
|
||||
wxGridEventHandler( GRID_TRICKS::onGridLabelLeftClick ), nullptr, this );
|
||||
aGrid->Connect( GRIDTRICKS_FIRST_ID, GRIDTRICKS_LAST_ID, wxEVT_COMMAND_MENU_SELECTED,
|
||||
wxCommandEventHandler( GRID_TRICKS::onPopupSelection ), nullptr, this );
|
||||
aGrid->Connect( wxEVT_CHAR_HOOK, wxCharEventHandler( GRID_TRICKS::onCharHook ), nullptr, this );
|
||||
aGrid->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( GRID_TRICKS::onKeyDown ), nullptr, this );
|
||||
aGrid->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( GRID_TRICKS::onUpdateUI ),
|
||||
nullptr, this );
|
||||
@@ -299,8 +300,11 @@ void GRID_TRICKS::showPopupMenu( wxMenu& menu )
|
||||
|
||||
if( wxTheClipboard->Open() )
|
||||
{
|
||||
if( wxTheClipboard->IsSupported( wxDF_TEXT ) )
|
||||
if( wxTheClipboard->IsSupported( wxDF_TEXT )
|
||||
|| wxTheClipboard->IsSupported( wxDF_UNICODETEXT ) )
|
||||
{
|
||||
menu.Enable( GRIDTRICKS_ID_PASTE, true );
|
||||
}
|
||||
|
||||
wxTheClipboard->Close();
|
||||
}
|
||||
@@ -358,6 +362,37 @@ void GRID_TRICKS::doPopupSelection( wxCommandEvent& event )
|
||||
}
|
||||
|
||||
|
||||
void GRID_TRICKS::onCharHook( wxKeyEvent& ev )
|
||||
{
|
||||
bool handled = false;
|
||||
|
||||
if( ev.GetModifiers() == wxMOD_CONTROL && ev.GetKeyCode() == 'V' )
|
||||
{
|
||||
if( m_grid->IsCellEditControlShown() && wxTheClipboard->Open() )
|
||||
{
|
||||
if( wxTheClipboard->IsSupported( wxDF_TEXT ) )
|
||||
{
|
||||
wxTextDataObject data;
|
||||
wxTheClipboard->GetData( data );
|
||||
|
||||
if( data.GetText().Contains( COL_SEP ) || data.GetText().Contains( ROW_SEP ) )
|
||||
{
|
||||
m_grid->CommitPendingChanges( true /* quiet mode */ );
|
||||
paste_text( data.GetText() );
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
wxTheClipboard->Close();
|
||||
m_grid->ForceRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
if( !handled )
|
||||
ev.Skip( true );
|
||||
}
|
||||
|
||||
|
||||
void GRID_TRICKS::onKeyDown( wxKeyEvent& ev )
|
||||
{
|
||||
if( ev.GetModifiers() == wxMOD_CONTROL && ev.GetKeyCode() == 'A' )
|
||||
@@ -535,7 +570,8 @@ void GRID_TRICKS::paste_clipboard()
|
||||
|
||||
if( wxTheClipboard->Open() )
|
||||
{
|
||||
if( wxTheClipboard->IsSupported( wxDF_TEXT ) )
|
||||
if( wxTheClipboard->IsSupported( wxDF_TEXT )
|
||||
|| wxTheClipboard->IsSupported( wxDF_UNICODETEXT ) )
|
||||
{
|
||||
wxTextDataObject data;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user