Compare commits
585 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e8553dcdf7 | |||
| dc3012933a | |||
| 291ff615bc | |||
| 26d1080e52 | |||
| c1452a24d2 | |||
| 34c833966f | |||
| f0e1bc3562 | |||
| 6da9034322 | |||
| 6887e8cbe3 | |||
| 89ef5986e7 | |||
| 5572a72bb3 | |||
| b40e446149 | |||
| 757bfd7b32 | |||
| c5e1c3db62 | |||
| b25ff44ff7 | |||
| cad7a18fa0 | |||
| 1c3637cb33 | |||
| 3a5f84d1ec | |||
| 44f8df592b | |||
| 17e19f8652 | |||
| 34fe104431 | |||
| 2bdb155838 | |||
| 22ebade907 | |||
| 9d594214fe | |||
| 2c89717c0a | |||
| 7574a46a19 | |||
| e5c4d75ce1 | |||
| f038ee3083 | |||
| e1ab2a0836 | |||
| 9070d9ff22 | |||
| 606c19780d | |||
| 8fecebb209 | |||
| da8e1be1c8 | |||
| e14a3caf18 | |||
| 5afb3ad5cc | |||
| b29ca47f25 | |||
| 5d1737d654 | |||
| bdc371f057 | |||
| dc2dd20ec7 | |||
| 057174caa0 | |||
| 4b035d5b5c | |||
| b22948988f | |||
| 7a05d58b3e | |||
| 695ab290e6 | |||
| 54a373a7e2 | |||
| 637f331724 | |||
| 931a9697ca | |||
| 5ffc58844f | |||
| 3ea2c6f1ff | |||
| 2cba724659 | |||
| 254260a616 | |||
| 45b13d513b | |||
| ba86c3ac75 | |||
| 19d4c31fcc | |||
| 160f69d720 | |||
| 4fa42960e9 | |||
| 9c4ca6da14 | |||
| c113385016 | |||
| 68e37a93ec | |||
| 9b158e70f5 | |||
| ab536192c3 | |||
| bc87b0db60 | |||
| 981f82db93 | |||
| b6f5aeba1e | |||
| 4fa34677ea | |||
| c67346991f | |||
| 811de6a462 | |||
| cfe7992723 | |||
| 8c84f2ac23 | |||
| fb23d62b6b | |||
| 84f182ef03 | |||
| 987d151977 | |||
| c622da5fbf | |||
| 19f163b724 | |||
| 3fcf207443 | |||
| 4814f29fbd | |||
| 39f4ea5ffa | |||
| 5d08531ecb | |||
| 4a0fdfd2ab | |||
| c88aab3a4f | |||
| bf4aebff4d | |||
| 39627bfcfa | |||
| 55fafe3401 | |||
| dd870deec5 | |||
| 7ecf18ba80 | |||
| 68e4ccf196 | |||
| 0a28398944 | |||
| 27002f568b | |||
| 9b5840b7ee | |||
| 5a3f8b4235 | |||
| 7be78d50a4 | |||
| b1f861137e | |||
| 3e3a958d4f | |||
| cc5a3eb61f | |||
| eabf2f57aa | |||
| 1667b1312e | |||
| 1123a25f04 | |||
| ef757ffd28 | |||
| f63d018f1c | |||
| 83de056de9 | |||
| 015906d862 | |||
| c288c469fb | |||
| 7a8efc1d27 | |||
| aaaa8a8835 | |||
| 2891c580b1 | |||
| 97d75ae844 | |||
| 7ccc89196b | |||
| 7774145a8f | |||
| 0bf2d2ca32 | |||
| 6338a69f17 | |||
| 5f8ba6f9a1 | |||
| a53bbd92f5 | |||
| aa71423d5f | |||
| f3ae7afec2 | |||
| 29194761e5 | |||
| f56c05ac3e | |||
| 15256b379c | |||
| b4113decc5 | |||
| b249932888 | |||
| 6b6057b194 | |||
| b9623e9359 | |||
| 735b05ba30 | |||
| 62724f9cb6 | |||
| 2e4dd4bc3f | |||
| 87139ce571 | |||
| 582d2e7bdb | |||
| 5c89937870 | |||
| 412e244d48 | |||
| 0940565025 | |||
| c5b2e859c1 | |||
| e06a8131c5 | |||
| 16dee8608b | |||
| 396e531e7c | |||
| 24c234fd93 | |||
| fdbe35e20c | |||
| cc3e3ee34c | |||
| d0da1725ca | |||
| 7e115249af | |||
| 07e8edfcdf | |||
| cbb2c187bd | |||
| 011018b002 | |||
| d3a44607e6 | |||
| 1ad3532740 | |||
| 26caad8b35 | |||
| f1da2e90d7 | |||
| 59492bd947 | |||
| 7b96cc3d0c | |||
| df873158bc | |||
| f88e1aa279 | |||
| a02f12c68a | |||
| cc141e346d | |||
| f5954b0d7d | |||
| 6bb1e59e10 | |||
| ced6b1cbb7 | |||
| d1d7d0eb05 | |||
| e1e196f1b1 | |||
| b55d760cd5 | |||
| b0a0408528 | |||
| d238a149a6 | |||
| 57d2f7209a | |||
| 8d08992c24 | |||
| 9938e7f723 | |||
| 17ad578675 | |||
| 044dd59c5c | |||
| 6ef90cfa18 | |||
| 7abf4c2d91 | |||
| 896ff72019 | |||
| 9c2eeb54fc | |||
| 69f583660f | |||
| 6334c733e1 | |||
| a50144f889 | |||
| 1ed85d521d | |||
| 793790b359 | |||
| 154112d4cc | |||
| 97d8ddeb4f | |||
| 4809b00206 | |||
| 5bc1040a8b | |||
| f6c8dbe81e | |||
| 0280989920 | |||
| 0b762fb804 | |||
| b71eb1186f | |||
| c78273cb99 | |||
| 26b8978b3e | |||
| 618bbfda8d | |||
| ee573a1480 | |||
| 20efc3b6e6 | |||
| 8632e74c5c | |||
| 6f35fd7058 | |||
| 761bfcd291 | |||
| 7663928a66 | |||
| dd3c846f4a | |||
| 6877bc32bc | |||
| 64564825c7 | |||
| b1ec1011b6 | |||
| 80539790c3 | |||
| 981772887a | |||
| 896b80652f | |||
| 968cf4267a | |||
| f3567cda99 | |||
| df372baff8 | |||
| dec96e6a77 | |||
| 8a1de8c6f8 | |||
| 255975f5fd | |||
| aa608ca147 | |||
| 682b74f7d2 | |||
| d662b2c34b | |||
| 7740c66479 | |||
| 4d4f6a810c | |||
| d74dca3a7a | |||
| 6513ca9168 | |||
| 6782bb73bd | |||
| 9c35689b04 | |||
| 8aff7cad17 | |||
| c2c6cad525 | |||
| 9b17ec5d2d | |||
| e971f90adc | |||
| 06c61a4831 | |||
| 7977f0f745 | |||
| 38a2b8eba7 | |||
| 951f0065ed | |||
| 22c06c7ed8 | |||
| 4f086271aa | |||
| 297999cb43 | |||
| 91aec9ac7f | |||
| 9105b380c3 | |||
| a285f86240 | |||
| b2f8a43c24 | |||
| 8383165269 | |||
| bc8af77aba | |||
| 7d0e1670ee | |||
| 877f7daa2b | |||
| 4c563e5ef3 | |||
| d6d6075a60 | |||
| 49c528f3ef | |||
| ae1bccfb85 | |||
| c2c13a5226 | |||
| 5b2e0d113a | |||
| 7ee8f786f2 | |||
| bd14224b42 | |||
| ccfec170b0 | |||
| 9852b535e7 | |||
| 758ac90069 | |||
| 697ff382f8 | |||
| 6b6aa84158 | |||
| a0d219c2d1 | |||
| 8af1af7f76 | |||
| 991d5812e2 | |||
| b019ce4515 | |||
| 168a1b3e75 | |||
| e8a6e579e4 | |||
| f2b1422ed5 | |||
| 63f4d45665 | |||
| 96ab1e47c9 | |||
| 4d69d966ee | |||
| e9294bee9e | |||
| d2b052b12c | |||
| 34f0a97cca | |||
| ad5ca38cc2 | |||
| 58bd7f3b24 | |||
| 5b2b4832d4 | |||
| a3618cbfeb | |||
| 8c6edc0414 | |||
| 1308fd7c4a | |||
| b241e09914 | |||
| 0a29c0dea3 | |||
| 8832b22952 | |||
| 33b93a3824 | |||
| b589da63d8 | |||
| 48077d77c4 | |||
| a605c4b6ff | |||
| 092ce30b40 | |||
| 28eb6dab97 | |||
| fb82130530 | |||
| a3d218ffbc | |||
| 471f72a340 | |||
| 2abbc601a0 | |||
| 522f1c7bea | |||
| 828f32649f | |||
| b39b54a92e | |||
| 6a55a47276 | |||
| 648d463b32 | |||
| 489f345fb2 | |||
| e308d65108 | |||
| ee0be76fb4 | |||
| 813fce2d2d | |||
| e0a27b430a | |||
| 73b2180c06 | |||
| b3f53ac862 | |||
| 9b49fc5a0d | |||
| 03c71b22d5 | |||
| 7d79bebcc6 | |||
| 5c2300022b | |||
| 91b042990f | |||
| 265e2d61be | |||
| df3924421d | |||
| 4ee2a007eb | |||
| b19a47fa2a | |||
| 7f3ca3b889 | |||
| a3d64d604c | |||
| 006f0a95c1 | |||
| 6afd865259 | |||
| d319cd4b89 | |||
| 566fefafc5 | |||
| 66bd0f850a | |||
| 491bb6e57a | |||
| 4fe74a9870 | |||
| 8f03f7c367 | |||
| 7f690d596b | |||
| be4c2715ab | |||
| 02f8260e18 | |||
| a8871fdda4 | |||
| d552ce00aa | |||
| 37dd7c6df9 | |||
| a5cbcd4abe | |||
| 4ede6f61b2 | |||
| 994c1c971a | |||
| ebdfeb4c0a | |||
| e1ffd956e6 | |||
| 3f4dc01d97 | |||
| be192d5df0 | |||
| efc35dec74 | |||
| 096566e857 | |||
| 944ee4af7d | |||
| 245894e8eb | |||
| 74abb40e84 | |||
| 1eb2983efe | |||
| 63b3e0cc4f | |||
| a8b127019c | |||
| 4d0ca33b47 | |||
| e2c53df13b | |||
| 03dd6c7a8e | |||
| bdd5a752dc | |||
| 8dbdc3717c | |||
| f60b76696a | |||
| 695505fc71 | |||
| b34dbf58c5 | |||
| 1fb19c0d81 | |||
| d6162196ec | |||
| 3ea314cb9f | |||
| 9d51fabe9b | |||
| c6b483acb9 | |||
| 96370f6665 | |||
| ad7bd9b5f8 | |||
| 2a1ef2d09d | |||
| 9f9fa0dd8d | |||
| 6ecfa65c4c | |||
| 831d438852 | |||
| a9b5b1728a | |||
| d304a30155 | |||
| 02ca96df48 | |||
| 5ca3414707 | |||
| 76a68b1f8d | |||
| 41ebd3c560 | |||
| fbc75656f4 | |||
| b882defb28 | |||
| 7d7decafd4 | |||
| 8705bea9ab | |||
| 64da49f22e | |||
| 0c9554a325 | |||
| dc24d13fef | |||
| 78cbb8e994 | |||
| ddd0ccbefd | |||
| f5797d367f | |||
| 89dff6411b | |||
| 093da7f73a | |||
| 2215e8906f | |||
| d34df3e951 | |||
| 044a2305e3 | |||
| 05264424b3 | |||
| 3e59c40283 | |||
| 2a99464fc1 | |||
| 412da66cf6 | |||
| c6215b08ed | |||
| 769060c584 | |||
| 0b48a66cb0 | |||
| 836b3219c1 | |||
| 2c0010fbcb | |||
| c1ed2506f9 | |||
| 299495a0aa | |||
| 6f3b6e3ad8 | |||
| cb9d78b46c | |||
| 46b3dcba4f | |||
| 06150388d8 | |||
| b07de4f6af | |||
| 6dd5422137 | |||
| 546ca18662 | |||
| de0f6ecf68 | |||
| 995c1a179e | |||
| bee4856a7f | |||
| 9721559005 | |||
| 7a1ab44207 | |||
| d269513857 | |||
| b4928f20a6 | |||
| 05d2893ac1 | |||
| 7ea205222d | |||
| e853b593b1 | |||
| c2a41bad09 | |||
| 1a13bed1c1 | |||
| 7b9c775cbd | |||
| e9bf1daa5f | |||
| d6727934a5 | |||
| a8df90762d | |||
| 7b4bb28307 | |||
| ee8744770f | |||
| ace480d3f6 | |||
| 154795d32a | |||
| ce20c6ec77 | |||
| 6380f29214 | |||
| 1aaf767c5d | |||
| bd4ffa493f | |||
| cf26b12478 | |||
| cdb26a9c97 | |||
| b5687b87bd | |||
| e581ba4c7b | |||
| a2064f85b1 | |||
| 2dbe4485cc | |||
| 6b7b6fa3e3 | |||
| be71f776ce | |||
| 51ba4763f0 | |||
| f9a9db6503 | |||
| 8d001a8031 | |||
| 88115e1dd2 | |||
| e914c0c1a0 | |||
| a1cd73e730 | |||
| cecc1a2ff1 | |||
| dc08cf3252 | |||
| e20a11cbb3 | |||
| c27ca33a2e | |||
| 1073ca0760 | |||
| 4440fe0935 | |||
| d1cd859765 | |||
| 36119b869c | |||
| 3e5ceaa319 | |||
| 78cd01038f | |||
| 7b4952df11 | |||
| 73acc80c1d | |||
| 8b41207351 | |||
| 5dbc1c7b18 | |||
| 5780a15468 | |||
| 15f6d5ad73 | |||
| 421bc27181 | |||
| afe41498c4 | |||
| 92c40f2761 | |||
| bb82d99a76 | |||
| 1d0e118294 | |||
| d40b12301d | |||
| 138d22b26f | |||
| 9c69ea9df3 | |||
| 3395738e55 | |||
| 6afc2e727b | |||
| f10864b3a7 | |||
| 892602c070 | |||
| d8f2a455e0 | |||
| 561b2d490d | |||
| 1869da0e7d | |||
| be2f317f6d | |||
| c248993a84 | |||
| 0a227ea916 | |||
| f75e6dae84 | |||
| 160a493885 | |||
| 625d241adf | |||
| 1264230973 | |||
| 6dfd417767 | |||
| 585f11a01d | |||
| d6a121d617 | |||
| dfd8aa402d | |||
| 5b1c84b5dd | |||
| 11586863cf | |||
| d52e50a97a | |||
| fee0028ee9 | |||
| a762311733 | |||
| e0581370e1 | |||
| 2cd0139cbf | |||
| 28cd2a203e | |||
| 33715143e3 | |||
| ba6fd2716e | |||
| 882ff06e24 | |||
| f52a51dce3 | |||
| a96e16b766 | |||
| 81e51b00ca | |||
| c01681a32e | |||
| eeb9133588 | |||
| d45769e508 | |||
| a499bc9f66 | |||
| 341f102d79 | |||
| 3e50a03ce7 | |||
| 1defa3872e | |||
| e66d25b6e8 | |||
| 76f38600af | |||
| 44b0ef64e8 | |||
| c3e7509823 | |||
| 3622a296be | |||
| 0b48913876 | |||
| 9000cfb9cd | |||
| c748645334 | |||
| 79443b7e59 | |||
| 02925fdecc | |||
| ef1e054bb6 | |||
| bb13ab2963 | |||
| 9c7fb0697c | |||
| c92b11900b | |||
| cde18d7ae7 | |||
| 1a932cb13b | |||
| cc75d8c0af | |||
| cb93d2940c | |||
| 88e0d373d1 | |||
| c2d59c6103 | |||
| f8f48f922e | |||
| eb7e781bec | |||
| 378300c733 | |||
| ddd7c35586 | |||
| 6482a322da | |||
| dc6d421fa2 | |||
| 7b19fb0c8d | |||
| f6480d67eb | |||
| 35c788a332 | |||
| a0cba3a9af | |||
| af6835e766 | |||
| 1f88d33c81 | |||
| 6aee6f857e | |||
| 6d69fee097 | |||
| c7dd993439 | |||
| 7e5dd02ef1 | |||
| ca16ff05df | |||
| b8fa10ab2b | |||
| 09736ebf2c | |||
| 897b9fe6a1 | |||
| 48f14d6dea | |||
| 1ef916086d | |||
| 0b44ba61d8 | |||
| 3c99a3797e | |||
| 76c98859bf | |||
| 57c8fbc9fe | |||
| bbac5430cf | |||
| 279ef4210d | |||
| 2ef18ad4ca | |||
| 1a76fce255 | |||
| ee75a50d84 | |||
| 99d8d0bc63 | |||
| f859fe37ca | |||
| 451cb7a194 | |||
| 17175fe71e | |||
| f8b02f99dd | |||
| 69fb86322c | |||
| 4d683232b7 | |||
| cb7e0e4383 | |||
| 90b62762d3 | |||
| 787a9ae4e4 | |||
| 83be5ba63d | |||
| e1cad6189e | |||
| f29fc2a025 | |||
| 43d4c8d801 | |||
| c179f4d4f1 | |||
| ac8b3989be | |||
| 9a7b1a20dc | |||
| cff58bae7f | |||
| 2ee2d7d5d9 | |||
| 743759578d | |||
| 9f1d1fc45e | |||
| b4ea25dccb | |||
| f15551a6b5 | |||
| 5c0a654e1e | |||
| edace908fb | |||
| ff966eaf62 | |||
| a39b9b8890 | |||
| 9f39420808 | |||
| 67b5e86cc4 | |||
| baaa8b6537 | |||
| 4f776050e6 | |||
| fa490644dd | |||
| 0363806e7e | |||
| c0a608bfdd | |||
| fe26628113 | |||
| c7ead70e0f | |||
| 31177be88f | |||
| 48fd6bab7b | |||
| 9fd2b32665 | |||
| 1ba05d4c9c | |||
| bae3ccdfb5 | |||
| dd2f15c96d | |||
| 7e04a1b8d3 | |||
| aea70a14ff | |||
| 8edfc23679 | |||
| 87f3d45109 | |||
| 2ca07b47af |
+1
-1
@@ -6,7 +6,7 @@ build_doxygen_docker:
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_JOB_NAME == "doxygen"
|
||||
tags:
|
||||
- docker
|
||||
- gitlab-org-docker
|
||||
before_script:
|
||||
- docker info
|
||||
- docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY"
|
||||
|
||||
+1
-19
@@ -15,25 +15,7 @@ macos_build:
|
||||
- cd build/macos
|
||||
- cmake
|
||||
-G Ninja
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
-DDEFAULT_INSTALL_PATH=/Library/Application\ Support /kicad
|
||||
-DOCC_INCLUDE_DIR=/opt/homebrew/Cellar/opencascade/7.7.2_2/include/opencascade
|
||||
-DOCC_LIBRARY_DIR=/opt/homebrew/Cellar/opencascade/7.7.2_2/Lib
|
||||
-DCMAKE_INSTALL_PREFIX=/Users/ci/kicad-mac-builder/build/kicad-dest
|
||||
-DCMAKE_C_COMPILER=/usr/bin/clang
|
||||
-DCMAKE_CXX_COMPILER=/usr/bin/clang++
|
||||
-DwxWidgets_CONFIG_EXECUTABLE=/Users/ci/kicad-mac-builder/build/wxwidgets-dest/bin/wx-config
|
||||
-DKICAD_BUILD_I18N=ON
|
||||
-DKICAD_SCRIPTING_WXPYTHON=ON
|
||||
-DKICAD_BUILD_PNS_DEBUG_TOOL=ON
|
||||
-DPYTHON_EXECUTABLE=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/bin/python3
|
||||
-DPYTHON_INCLUDE_DIR=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/include/python3.9/
|
||||
-DPYTHON_LIBRARY=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/lib/libpython3.9.dylib
|
||||
-DPYTHON_SITE_PACKAGE_PATH=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/lib/python3.9/site-packages
|
||||
-DPYTHON_FRAMEWORK=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework
|
||||
-DNGSPICE_INCLUDE_DIR=/Users/ci/kicad-mac-builder/build/ngspice-dest/include
|
||||
-DNGSPICE_LIBRARY=/Users/ci/kicad-mac-builder/build/ngspice-dest/lib/libngspice.dylib
|
||||
-DKICAD_USE_3DCONNEXION=ON
|
||||
-DCMAKE_TOOLCHAIN_FILE=/Users/ci/kicad-mac-builder/toolchain/kicad-mac-builder.cmake
|
||||
../../
|
||||
- cmake --build . 2>&1 | tee compilation_log.txt
|
||||
- cd ../../
|
||||
|
||||
@@ -708,6 +708,8 @@ void BOARD_ADAPTER::SetLayerColors( const std::map<int, COLOR4D>& aColors )
|
||||
|
||||
for( const auto& [ layer, color ] : aColors )
|
||||
settings->SetColor( layer, color );
|
||||
|
||||
Pgm().GetSettingsManager().SaveColorSettings( settings, "3d_viewer" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -374,6 +374,13 @@ void BOARD_ADAPTER::createPadWithMargin( const PAD* aPad, CONTAINER_2D_BASE* aCo
|
||||
// Remove group membership from dummy item before deleting
|
||||
dummy.SetParentGroup( nullptr );
|
||||
}
|
||||
else if( aPad->GetShape() == PAD_SHAPE::CUSTOM )
|
||||
{
|
||||
// A custom pad can have many complex subshape items. To avoid issues, use its
|
||||
// final polygon shape, not its basic shape set. One cannot apply the clearance
|
||||
// to each subshape: it does no work
|
||||
aPad->TransformShapeToPolygon( poly, aLayer, 0, maxError );
|
||||
}
|
||||
else
|
||||
{
|
||||
auto padShapes = std::static_pointer_cast<SHAPE_COMPOUND>( aPad->GetEffectiveShape() );
|
||||
@@ -422,7 +429,7 @@ void BOARD_ADAPTER::createPadWithMargin( const PAD* aPad, CONTAINER_2D_BASE* aCo
|
||||
break;
|
||||
|
||||
case SH_POLY_SET:
|
||||
poly = *(SHAPE_POLY_SET*) shape;
|
||||
poly.Append( *static_cast<const SHAPE_POLY_SET*>( shape ) );
|
||||
break;
|
||||
|
||||
case SH_ARC:
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <3d_rendering/opengl/render_3d_opengl.h>
|
||||
#include <3d_viewer_id.h>
|
||||
#include <advanced_config.h>
|
||||
#include <build_version.h>
|
||||
#include <board.h>
|
||||
#include <reporter.h>
|
||||
#include <gal/opengl/gl_context_mgr.h>
|
||||
@@ -229,6 +230,9 @@ bool EDA_3D_CANVAS::initializeOpenGL()
|
||||
From_UTF8( (char*) glewGetString( GLEW_VERSION ) ) );
|
||||
}
|
||||
|
||||
SetOpenGLInfo( (const char*) glGetString( GL_VENDOR ), (const char*) glGetString( GL_RENDERER ),
|
||||
(const char*) glGetString( GL_VERSION ) );
|
||||
|
||||
wxString version = From_UTF8( (char *) glGetString( GL_VERSION ) );
|
||||
|
||||
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::%s OpenGL version string %s." ),
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2015-2016 Mario Luzeiro <mrluzeiro@ua.pt>
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2024 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
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "../3d_cache/3d_cache.h"
|
||||
#include <wx/dcclient.h>
|
||||
#include <base_units.h>
|
||||
#include <build_version.h>
|
||||
#include <gal/opengl/gl_context_mgr.h>
|
||||
#include <settings/common_settings.h>
|
||||
#include <pgm_base.h>
|
||||
@@ -102,11 +103,6 @@ EDA_3D_MODEL_VIEWER::EDA_3D_MODEL_VIEWER( wxWindow* aParent, const int* aAttribL
|
||||
m_BiuTo3dUnits = 1.0;
|
||||
|
||||
m_glRC = nullptr;
|
||||
|
||||
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
|
||||
|
||||
const DPI_SCALING_COMMON dpi{ settings, this };
|
||||
SetScaleFactor( dpi.GetScaleFactor() );
|
||||
}
|
||||
|
||||
|
||||
@@ -200,6 +196,9 @@ void EDA_3D_MODEL_VIEWER::ogl_initialize()
|
||||
From_UTF8( (char*) glewGetString( GLEW_VERSION ) ) );
|
||||
}
|
||||
|
||||
SetOpenGLInfo( (const char*) glGetString( GL_VENDOR ), (const char*) glGetString( GL_RENDERER ),
|
||||
(const char*) glGetString( GL_VERSION ) );
|
||||
|
||||
glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST );
|
||||
glHint( GL_LINE_SMOOTH_HINT, GL_NICEST );
|
||||
glHint( GL_POLYGON_SMOOTH_HINT, GL_NICEST );
|
||||
|
||||
@@ -812,9 +812,6 @@ void EDA_3D_VIEWER_FRAME::loadCommonSettings()
|
||||
|
||||
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
|
||||
|
||||
const DPI_SCALING_COMMON dpi{ settings, this };
|
||||
m_canvas->SetScaleFactor( dpi.GetScaleFactor() );
|
||||
|
||||
// TODO(JE) use all control options
|
||||
m_boardAdapter.m_MousewheelPanning = settings->m_Input.scroll_modifier_zoom != 0;
|
||||
}
|
||||
|
||||
@@ -210,9 +210,6 @@ void PANEL_PREVIEW_3D_MODEL::loadSettings()
|
||||
|
||||
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
|
||||
|
||||
const DPI_SCALING_COMMON dpi{ settings, this };
|
||||
m_previewPane->SetScaleFactor( dpi.GetScaleFactor() );
|
||||
|
||||
// TODO(JE) use all control options
|
||||
m_boardAdapter.m_MousewheelPanning = settings->m_Input.scroll_modifier_zoom != 0;
|
||||
|
||||
@@ -444,10 +441,15 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementScale( wxSpinEvent& event, double aSign
|
||||
else if( spinCtrl == m_spinZscale )
|
||||
textCtrl = zscale;
|
||||
|
||||
double step = SCALE_INCREMENT;
|
||||
|
||||
if( wxGetMouseState().ShiftDown( ) )
|
||||
step = SCALE_INCREMENT_FINE;
|
||||
|
||||
double curr_value = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, EDA_UNITS::UNSCALED,
|
||||
textCtrl->GetValue() );
|
||||
|
||||
curr_value += ( SCALE_INCREMENT * aSign );
|
||||
curr_value += ( step * aSign );
|
||||
curr_value = std::max( 1/MAX_SCALE, curr_value );
|
||||
curr_value = std::min( curr_value, MAX_SCALE );
|
||||
|
||||
@@ -465,10 +467,15 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementRotation( wxSpinEvent& aEvent, double aS
|
||||
else if( spinCtrl == m_spinZrot )
|
||||
textCtrl = zrot;
|
||||
|
||||
double step = ROTATION_INCREMENT;
|
||||
|
||||
if( wxGetMouseState().ShiftDown( ) )
|
||||
step = ROTATION_INCREMENT_FINE;
|
||||
|
||||
double curr_value = EDA_UNIT_UTILS::UI::DoubleValueFromString( unityScale, EDA_UNITS::DEGREES,
|
||||
textCtrl->GetValue() );
|
||||
|
||||
curr_value += ( ROTATION_INCREMENT * aSign );
|
||||
curr_value += ( step * aSign );
|
||||
curr_value = std::max( -MAX_ROTATION, curr_value );
|
||||
curr_value = std::min( curr_value, MAX_ROTATION );
|
||||
|
||||
@@ -488,16 +495,22 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementOffset( wxSpinEvent& event, double aSign
|
||||
textCtrl = zoff;
|
||||
|
||||
double step_mm = OFFSET_INCREMENT_MM;
|
||||
double curr_value_mm =
|
||||
EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, m_userUnits,
|
||||
textCtrl->GetValue() )
|
||||
/ pcbIUScale.IU_PER_MM;
|
||||
|
||||
if( wxGetMouseState().ShiftDown( ) )
|
||||
step_mm = OFFSET_INCREMENT_MM_FINE;
|
||||
|
||||
if( m_userUnits == EDA_UNITS::MILS || m_userUnits == EDA_UNITS::INCHES )
|
||||
{
|
||||
step_mm = 25.4*OFFSET_INCREMENT_MIL/1000;
|
||||
|
||||
if( wxGetMouseState().ShiftDown( ) )
|
||||
step_mm = 25.4*OFFSET_INCREMENT_MIL_FINE/1000;;
|
||||
}
|
||||
|
||||
double curr_value_mm = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, m_userUnits,
|
||||
textCtrl->GetValue() )
|
||||
/ pcbIUScale.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 );
|
||||
@@ -533,10 +546,10 @@ void PANEL_PREVIEW_3D_MODEL::onMouseWheelRot( wxMouseEvent& event )
|
||||
{
|
||||
wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
|
||||
|
||||
double step = ROTATION_INCREMENT_WHEEL;
|
||||
double step = ROTATION_INCREMENT;
|
||||
|
||||
if( event.ShiftDown( ) )
|
||||
step = ROTATION_INCREMENT_WHEEL_FINE;
|
||||
step = ROTATION_INCREMENT_FINE;
|
||||
|
||||
if( event.GetWheelRotation() >= 0 )
|
||||
step = -step;
|
||||
|
||||
@@ -43,9 +43,8 @@
|
||||
#define SCALE_INCREMENT_FINE 0.02
|
||||
#define SCALE_INCREMENT 0.1
|
||||
|
||||
#define ROTATION_INCREMENT 90 // in degrees, for spin button command
|
||||
#define ROTATION_INCREMENT_WHEEL 90 // in degrees, for mouse wheel command
|
||||
#define ROTATION_INCREMENT_WHEEL_FINE 1 // in degrees, for mouse wheel command
|
||||
#define ROTATION_INCREMENT 90 // in degrees
|
||||
#define ROTATION_INCREMENT_FINE 1 // in degrees
|
||||
|
||||
#define OFFSET_INCREMENT_MM 0.5
|
||||
#define OFFSET_INCREMENT_MM_FINE 0.1
|
||||
|
||||
@@ -138,7 +138,7 @@ void IMAGE_SIZE::SetUnit( EDA_UNITS aUnit )
|
||||
}
|
||||
|
||||
|
||||
BEGIN_EVENT_TABLE( BITMAP2CMP_FRAME, EDA_BASE_FRAME )
|
||||
BEGIN_EVENT_TABLE( BITMAP2CMP_FRAME, KIWAY_PLAYER )
|
||||
EVT_MENU( wxID_CLOSE, BITMAP2CMP_FRAME::OnExit )
|
||||
EVT_MENU( wxID_EXIT, BITMAP2CMP_FRAME::OnExit )
|
||||
|
||||
@@ -193,6 +193,7 @@ BITMAP2CMP_FRAME::BITMAP2CMP_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||
m_toolManager->InitTools();
|
||||
|
||||
ReCreateMenuBar();
|
||||
setupUIConditions();
|
||||
|
||||
GetSizer()->SetSizeHints( this );
|
||||
|
||||
|
||||
@@ -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.12 3.11 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.13 3.12 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.12 3.11 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.13 3.12 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]+.*)?$")
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
find_program(SWIG_EXECUTABLE NAMES swig4.0 swig3.0 swig2.0 swig)
|
||||
find_program(SWIG_EXECUTABLE NAMES swig4.2 swig4.1 swig4.0 swig3.0 swig2.0 swig)
|
||||
|
||||
if(SWIG_EXECUTABLE)
|
||||
execute_process(COMMAND ${SWIG_EXECUTABLE} -swiglib
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
# KiCad.
|
||||
#
|
||||
# Note: This version string should follow the semantic versioning system
|
||||
set( KICAD_SEMANTIC_VERSION "8.0.2" )
|
||||
set( KICAD_SEMANTIC_VERSION "8.0.5" )
|
||||
|
||||
# Default the version to the semantic version.
|
||||
# This is overridden by the git repository tag though (if using git)
|
||||
|
||||
@@ -209,7 +209,7 @@ void BACKGROUND_JOB_REPORTER::AdvancePhase()
|
||||
}
|
||||
|
||||
|
||||
BACKGROUND_JOBS_MONITOR::BACKGROUND_JOBS_MONITOR() : m_jobListDialog( nullptr )
|
||||
BACKGROUND_JOBS_MONITOR::BACKGROUND_JOBS_MONITOR()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
+80
-18
@@ -524,9 +524,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_24.png" ), 24, wxT( "light" ) );
|
||||
@@ -926,9 +934,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
@@ -1328,9 +1344,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_16.png" ), 16, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_16.png" ), 16, wxT( "light" ) );
|
||||
@@ -1730,9 +1754,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_16.png" ), 16, wxT( "dark" ) );
|
||||
@@ -2132,9 +2164,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_32.png" ), 32, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_32.png" ), 32, wxT( "light" ) );
|
||||
@@ -2534,9 +2574,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
@@ -2936,9 +2984,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_48.png" ), 48, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_48.png" ), 48, wxT( "light" ) );
|
||||
@@ -3338,9 +3394,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_48.png" ), 48, wxT( "dark" ) );
|
||||
@@ -3740,9 +3804,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_64.png" ), 64, wxT( "light" ) );
|
||||
@@ -4142,9 +4214,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_64.png" ), 64, wxT( "dark" ) );
|
||||
@@ -4394,24 +4474,6 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_32].emplace_back( BITMAPS::icon_pagelayout_editor_32, wxT( "icon_pagelayout_editor_32_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_32].emplace_back( BITMAPS::icon_pcbcalculator_32, wxT( "icon_pcbcalculator_32_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_32].emplace_back( BITMAPS::icon_pcbnew_32, wxT( "icon_pcbnew_32_dark_32.png" ), 32, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_24.png" ), 24, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_24.png" ), 24, wxT( "dark" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_eeschema].emplace_back( BITMAPS::icon_eeschema, wxT( "icon_eeschema_64.png" ), 64, wxT( "light" ) );
|
||||
aBitmapInfoCache[BITMAPS::icon_gerbview].emplace_back( BITMAPS::icon_gerbview, wxT( "icon_gerbview_64.png" ), 64, wxT( "light" ) );
|
||||
|
||||
@@ -51,6 +51,19 @@ extern std::string GetCurlLibVersion();
|
||||
#include <kicad_build_version.h>
|
||||
#undef INCLUDE_KICAD_VERSION
|
||||
|
||||
// Remember OpenGL info
|
||||
static wxString s_glVendor;
|
||||
static wxString s_glRenderer;
|
||||
static wxString s_glVersion;
|
||||
|
||||
void SetOpenGLInfo( const char* aVendor, const char* aRenderer, const char* aVersion )
|
||||
{
|
||||
s_glVendor = wxString::FromUTF8( aVendor );
|
||||
s_glRenderer = wxString::FromUTF8( aRenderer );
|
||||
s_glVersion = wxString::FromUTF8( aVersion );
|
||||
}
|
||||
|
||||
|
||||
wxString GetPlatformGetBitnessName()
|
||||
{
|
||||
wxPlatformInfo platform;
|
||||
@@ -200,6 +213,12 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
|
||||
<< ", " << wxGetenv( "XDG_SESSION_TYPE" );
|
||||
#endif
|
||||
|
||||
if( !s_glVendor.empty() || !s_glRenderer.empty() || !s_glVersion.empty() )
|
||||
{
|
||||
aMsg << eol;
|
||||
aMsg << "OpenGL: " << s_glVendor << ", " << s_glRenderer << ", " << s_glVersion;
|
||||
}
|
||||
|
||||
aMsg << eol << eol;
|
||||
|
||||
if( !aBrief )
|
||||
|
||||
+5
-2
@@ -147,7 +147,8 @@ wxString KIwxExpandEnvVars( const wxString& str, const PROJECT* aProject, std::s
|
||||
wxString strResult;
|
||||
strResult.Alloc( strlen ); // best guess (improves performance)
|
||||
|
||||
auto getVersionedEnvVar = []( const wxString& aMatch, wxString& aResult ) -> bool
|
||||
auto getVersionedEnvVar =
|
||||
[]( const wxString& aMatch, wxString& aResult ) -> bool
|
||||
{
|
||||
for ( const wxString& var : ENV_VAR::GetPredefinedEnvVars() )
|
||||
{
|
||||
@@ -180,7 +181,9 @@ wxString KIwxExpandEnvVars( const wxString& str, const PROJECT* aProject, std::s
|
||||
Bracket bracket;
|
||||
#ifdef __WINDOWS__
|
||||
if( str_n == wxT( '%' ) )
|
||||
bracket = Bracket_Windows;
|
||||
{
|
||||
bracket = Bracket_Windows;
|
||||
}
|
||||
else
|
||||
#endif // __WINDOWS__
|
||||
if( n == strlen - 1 )
|
||||
|
||||
@@ -347,6 +347,24 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogTrace( traceDatabase, wxT( "SelectOne: table `%s` not in row cache; will SelectAll" ),
|
||||
tableName, aWhere.second );
|
||||
|
||||
selectAllAndCache( tableName, aWhere.first );
|
||||
|
||||
if( m_cache->Get( tableName, cacheEntry ) )
|
||||
{
|
||||
if( cacheEntry.count( aWhere.second ) )
|
||||
{
|
||||
wxLogTrace( traceDatabase, wxT( "SelectOne: `%s` with parameter `%s` - cache hit" ),
|
||||
tableName, aWhere.second );
|
||||
aResult = cacheEntry.at( aWhere.second );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( !m_columnCache.count( tableName ) )
|
||||
{
|
||||
@@ -372,15 +390,14 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
|
||||
columnsFor( tableName ),
|
||||
m_quoteChar, tableName, m_quoteChar,
|
||||
m_quoteChar, columnName, m_quoteChar );
|
||||
|
||||
nanodbc::statement statement( *m_conn );
|
||||
nanodbc::string query = fromUTF8( queryStr );
|
||||
|
||||
PROF_TIMER timer;
|
||||
nanodbc::statement statement;
|
||||
|
||||
try
|
||||
{
|
||||
statement.prepare( query );
|
||||
statement.prepare( *m_conn, query );
|
||||
statement.bind( 0, aWhere.second.c_str() );
|
||||
}
|
||||
catch( nanodbc::database_error& e )
|
||||
@@ -474,44 +491,14 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
|
||||
}
|
||||
|
||||
|
||||
bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::string& aKey,
|
||||
std::vector<ROW>& aResults )
|
||||
bool DATABASE_CONNECTION::selectAllAndCache( const std::string& aTable, const std::string& aKey )
|
||||
{
|
||||
if( !m_conn )
|
||||
{
|
||||
wxLogTrace( traceDatabase, wxT( "Called SelectAll without valid connection!" ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
auto tableMapIter = m_tables.find( aTable );
|
||||
|
||||
if( tableMapIter == m_tables.end() )
|
||||
{
|
||||
wxLogTrace( traceDatabase, wxT( "SelectAll: requested table %s not found in cache" ),
|
||||
aTable );
|
||||
return false;
|
||||
}
|
||||
|
||||
DB_CACHE_TYPE::CACHE_VALUE cacheEntry;
|
||||
|
||||
if( m_cache->Get( aTable, cacheEntry ) )
|
||||
{
|
||||
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s` - cache hit" ), aTable );
|
||||
|
||||
aResults.reserve( cacheEntry.size() );
|
||||
|
||||
for( auto &[ key, row ] : cacheEntry )
|
||||
aResults.emplace_back( row );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
nanodbc::statement statement( *m_conn );
|
||||
|
||||
nanodbc::string query = fromUTF8( fmt::format( "SELECT {} FROM {}{}{}", columnsFor( aTable ),
|
||||
m_quoteChar, aTable, m_quoteChar ) );
|
||||
|
||||
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s`" ), toUTF8( query ) );
|
||||
wxLogTrace( traceDatabase, wxT( "selectAllAndCache: `%s`" ), toUTF8( query ) );
|
||||
|
||||
PROF_TIMER timer;
|
||||
|
||||
@@ -522,7 +509,8 @@ bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::strin
|
||||
catch( nanodbc::database_error& e )
|
||||
{
|
||||
m_lastError = e.what();
|
||||
wxLogTrace( traceDatabase, wxT( "Exception while preparing query for SelectAll: %s" ),
|
||||
wxLogTrace( traceDatabase,
|
||||
wxT( "Exception while preparing query for selectAllAndCache: %s" ),
|
||||
m_lastError );
|
||||
|
||||
// Exception may be due to a connection error; nanodbc won't auto-reconnect
|
||||
@@ -540,7 +528,8 @@ bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::strin
|
||||
catch( nanodbc::database_error& e )
|
||||
{
|
||||
m_lastError = e.what();
|
||||
wxLogTrace( traceDatabase, wxT( "Exception while executing query for SelectAll: %s" ),
|
||||
wxLogTrace( traceDatabase,
|
||||
wxT( "Exception while executing query for selectAllAndCache: %s" ),
|
||||
m_lastError );
|
||||
|
||||
// Exception may be due to a connection error; nanodbc won't auto-reconnect
|
||||
@@ -551,15 +540,17 @@ bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::strin
|
||||
|
||||
timer.Stop();
|
||||
|
||||
DB_CACHE_TYPE::CACHE_VALUE cacheEntry;
|
||||
|
||||
auto handleException =
|
||||
[&]( std::runtime_error& aException, const std::string& aExtraContext = "" )
|
||||
{
|
||||
m_lastError = aException.what();
|
||||
std::string extra = aExtraContext.empty() ? "" : ": " + aExtraContext;
|
||||
wxLogTrace( traceDatabase,
|
||||
wxT( "Exception while parsing result %d from SelectAll: %s%s" ),
|
||||
aResults.size(), m_lastError, extra );
|
||||
};
|
||||
{
|
||||
m_lastError = aException.what();
|
||||
std::string extra = aExtraContext.empty() ? "" : ": " + aExtraContext;
|
||||
wxLogTrace( traceDatabase,
|
||||
wxT( "Exception while parsing result %d from selectAllAndCache: %s%s" ),
|
||||
cacheEntry.size(), m_lastError, extra );
|
||||
};
|
||||
|
||||
while( results.next() )
|
||||
{
|
||||
@@ -636,20 +627,64 @@ bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::strin
|
||||
}
|
||||
}
|
||||
|
||||
aResults.emplace_back( std::move( result ) );
|
||||
wxASSERT( result.count( aKey ) );
|
||||
std::string keyStr = std::any_cast<std::string>( result.at( aKey ) );
|
||||
cacheEntry[keyStr] = result;
|
||||
}
|
||||
|
||||
wxLogTrace( traceDatabase, wxT( "SelectAll from %s completed in %0.1f ms" ), aTable,
|
||||
wxLogTrace( traceDatabase, wxT( "selectAllAndCache from %s completed in %0.1f ms" ), aTable,
|
||||
timer.msecs() );
|
||||
|
||||
for( const ROW& row : aResults )
|
||||
m_cache->Put( aTable, cacheEntry );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::string& aKey,
|
||||
std::vector<ROW>& aResults )
|
||||
{
|
||||
if( !m_conn )
|
||||
{
|
||||
wxASSERT( row.count( aKey ) );
|
||||
std::string keyStr = std::any_cast<std::string>( row.at( aKey ) );
|
||||
cacheEntry[keyStr] = row;
|
||||
wxLogTrace( traceDatabase, wxT( "Called SelectAll without valid connection!" ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
m_cache->Put( aTable, cacheEntry );
|
||||
auto tableMapIter = m_tables.find( aTable );
|
||||
|
||||
if( tableMapIter == m_tables.end() )
|
||||
{
|
||||
wxLogTrace( traceDatabase, wxT( "SelectAll: requested table %s not found in cache" ),
|
||||
aTable );
|
||||
return false;
|
||||
}
|
||||
|
||||
DB_CACHE_TYPE::CACHE_VALUE cacheEntry;
|
||||
|
||||
if( !m_cache->Get( aTable, cacheEntry ) )
|
||||
{
|
||||
if( !selectAllAndCache( aTable, aKey ) )
|
||||
{
|
||||
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s` cache fill failed" ), aTable );
|
||||
return false;
|
||||
}
|
||||
|
||||
// Now it should be filled
|
||||
m_cache->Get( aTable, cacheEntry );
|
||||
}
|
||||
|
||||
if( !m_cache->Get( aTable, cacheEntry ) )
|
||||
{
|
||||
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s` failed to get results from cache!" ),
|
||||
aTable );
|
||||
return false;
|
||||
}
|
||||
|
||||
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s` - returning cached results" ), aTable );
|
||||
|
||||
aResults.reserve( cacheEntry.size() );
|
||||
|
||||
for( auto &[ key, row ] : cacheEntry )
|
||||
aResults.emplace_back( row );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <pgm_base.h>
|
||||
#include <widgets/wx_grid.h>
|
||||
#include <widgets/grid_text_button_helpers.h>
|
||||
#include <widgets/grid_text_helpers.h>
|
||||
#include <widgets/std_bitmap_button.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@@ -49,7 +49,7 @@ DIALOG_CONFIGURE_PATHS_BASE::DIALOG_CONFIGURE_PATHS_BASE( wxWindow* parent, wxWi
|
||||
// Label Appearance
|
||||
|
||||
// Cell Defaults
|
||||
m_EnvVars->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
|
||||
m_EnvVars->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
|
||||
m_EnvVars->SetMinSize( wxSize( 604,170 ) );
|
||||
|
||||
sbEnvVars->Add( m_EnvVars, 1, wxALL|wxEXPAND, 5 );
|
||||
@@ -70,7 +70,7 @@ DIALOG_CONFIGURE_PATHS_BASE::DIALOG_CONFIGURE_PATHS_BASE( wxWindow* parent, wxWi
|
||||
sbEnvVars->Add( bSizerEnvVarBtns, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerMain->Add( sbEnvVars, 1, wxEXPAND|wxALL, 5 );
|
||||
bSizerMain->Add( sbEnvVars, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_sdbSizer = new wxStdDialogButtonSizer();
|
||||
m_sdbSizerOK = new wxButton( this, wxID_OK );
|
||||
|
||||
@@ -62,109 +62,23 @@
|
||||
<property name="name">bSizerMain</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxTOP</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxGrid" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="autosize_cols">0</property>
|
||||
<property name="autosize_rows">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="cell_bg"></property>
|
||||
<property name="cell_font"></property>
|
||||
<property name="cell_horiz_alignment">wxALIGN_LEFT</property>
|
||||
<property name="cell_text"></property>
|
||||
<property name="cell_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="col_label_horiz_alignment">wxALIGN_CENTER</property>
|
||||
<property name="col_label_size">wxGRID_AUTOSIZE</property>
|
||||
<property name="col_label_values">"Environment Variables" "Path" ""</property>
|
||||
<property name="col_label_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="cols">2</property>
|
||||
<property name="column_sizes">150,454</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_col_move">0</property>
|
||||
<property name="drag_col_size">1</property>
|
||||
<property name="drag_grid_size">0</property>
|
||||
<property name="drag_row_size">1</property>
|
||||
<property name="editing">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="grid_line_color"></property>
|
||||
<property name="grid_lines">1</property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label_bg"></property>
|
||||
<property name="label_font"></property>
|
||||
<property name="label_text"></property>
|
||||
<property name="margin_height">0</property>
|
||||
<property name="margin_width">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">604,170</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_EnvVars</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="row_label_horiz_alignment">wxALIGN_CENTER</property>
|
||||
<property name="row_label_size">0</property>
|
||||
<property name="row_label_values"></property>
|
||||
<property name="row_label_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="row_sizes"></property>
|
||||
<property name="rows">1</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="subclass">WX_GRID; widgets/wx_grid.h; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnSize">OnGridSize</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Environment Variables</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerEnvVarBtns</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="name">sbEnvVars</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="parent">1</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBitmapButton" expanded="1">
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxGrid" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
@@ -173,209 +87,251 @@
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="autosize_cols">0</property>
|
||||
<property name="autosize_rows">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="cell_bg"></property>
|
||||
<property name="cell_font"></property>
|
||||
<property name="cell_horiz_alignment">wxALIGN_LEFT</property>
|
||||
<property name="cell_text"></property>
|
||||
<property name="cell_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="col_label_horiz_alignment">wxALIGN_CENTER</property>
|
||||
<property name="col_label_size">wxGRID_AUTOSIZE</property>
|
||||
<property name="col_label_values">"Name" "Path"</property>
|
||||
<property name="col_label_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="cols">2</property>
|
||||
<property name="column_sizes">150,454</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_col_move">0</property>
|
||||
<property name="drag_col_size">1</property>
|
||||
<property name="drag_grid_size">0</property>
|
||||
<property name="drag_row_size">1</property>
|
||||
<property name="editing">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="focus"></property>
|
||||
<property name="font"></property>
|
||||
<property name="grid_line_color"></property>
|
||||
<property name="grid_lines">1</property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Add Environment Variable</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">0</property>
|
||||
<property name="label_bg"></property>
|
||||
<property name="label_font"></property>
|
||||
<property name="label_text"></property>
|
||||
<property name="margin_height">0</property>
|
||||
<property name="margin_width">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="minimum_size">604,170</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_btnAddEnvVar</property>
|
||||
<property name="name">m_EnvVars</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="row_label_horiz_alignment">wxALIGN_CENTER</property>
|
||||
<property name="row_label_size">0</property>
|
||||
<property name="row_label_values"></property>
|
||||
<property name="row_label_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="row_sizes"></property>
|
||||
<property name="rows">1</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare</property>
|
||||
<property name="subclass">WX_GRID; widgets/wx_grid.h; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnAddEnvVar</event>
|
||||
<event name="OnSize">OnGridSize</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerEnvVarBtns</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBitmapButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="focus"></property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Add Environment Variable</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_btnAddEnvVar</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnAddEnvVar</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBitmapButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="focus"></property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Delete Environment Variable</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_btnDeleteEnvVar</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnRemoveEnvVar</event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBitmapButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="focus"></property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Delete Environment Variable</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_btnDeleteEnvVar</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnRemoveEnvVar</event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticLine" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticline1</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxLI_HORIZONTAL</property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
|
||||
@@ -43,6 +43,9 @@ void DIALOG_EDIT_LIBRARY_TABLES::InstallPanel( wxPanel* aPanel )
|
||||
auto mainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
SetSizer( mainSizer );
|
||||
|
||||
m_infoBar = new WX_INFOBAR( this );
|
||||
mainSizer->Add( m_infoBar, 0, wxEXPAND, 0 );
|
||||
|
||||
mainSizer->Add( m_contentPanel, 1, wxEXPAND|wxLEFT|wxTOP|wxRIGHT, 5 );
|
||||
m_contentPanel->SetMinSize( FromDIP( wxSize( 1000, 600 ) ) );
|
||||
|
||||
|
||||
@@ -442,14 +442,11 @@ bool PANEL_SETUP_NETCLASSES::TransferDataFromWindow()
|
||||
wxString netclass = m_assignmentGrid->GetCellValue( row, 1 );
|
||||
|
||||
m_netSettings->m_NetClassPatternAssignments.push_back(
|
||||
{
|
||||
std::make_unique<EDA_COMBINED_MATCHER>( pattern, CTX_NETCLASS ),
|
||||
netclass
|
||||
} );
|
||||
|
||||
m_netSettings->m_NetClassPatternAssignmentCache.clear();
|
||||
{ std::make_unique<EDA_COMBINED_MATCHER>( pattern, CTX_NETCLASS ), netclass } );
|
||||
}
|
||||
|
||||
m_netSettings->m_NetClassPatternAssignmentCache.clear();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <project.h>
|
||||
#include <grid_tricks.h>
|
||||
#include <widgets/std_bitmap_button.h>
|
||||
#include <widgets/grid_text_helpers.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
@@ -648,8 +648,21 @@ void EDA_DRAW_PANEL_GAL::onShowTimer( wxTimerEvent& aEvent )
|
||||
|
||||
void EDA_DRAW_PANEL_GAL::SetCurrentCursor( KICURSOR aCursor )
|
||||
{
|
||||
if( m_gal )
|
||||
m_gal->SetNativeCursorStyle( aCursor );
|
||||
if( !m_gal )
|
||||
return;
|
||||
|
||||
DPI_SCALING_COMMON dpi( nullptr, m_parent );
|
||||
|
||||
bool hidpi = false;
|
||||
|
||||
// Cursor scaling factor cannot be set for a wxCursor on GTK and OSX (at least before wx 3.3),
|
||||
// resulting in 4x rendered size on 2x window scale.
|
||||
// MSW renders the bitmap as-is, without scaling, so this works here.
|
||||
#ifdef __WXMSW__
|
||||
hidpi = dpi.GetContentScaleFactor() >= 2.0;
|
||||
#endif
|
||||
|
||||
m_gal->SetNativeCursorStyle( aCursor, hidpi );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -681,6 +681,35 @@ void DS_DATA_ITEM_TEXT::SetConstrainedTextSize()
|
||||
|
||||
if( m_ConstrainedTextSize.y == 0 )
|
||||
m_ConstrainedTextSize.y = DS_DATA_MODEL::GetTheInstance().m_DefaultTextSize.y;
|
||||
|
||||
if( m_BoundingBoxSize.x > 0 || m_BoundingBoxSize.y > 0 )
|
||||
{
|
||||
// to know the X and Y size of the line, we should use EDA_TEXT::GetTextBox()
|
||||
// but this function uses integers
|
||||
// So, to avoid truncations with our unit in mm, use microns.
|
||||
VECTOR2I size_micron;
|
||||
#define FSCALE 1000.0
|
||||
int linewidth = 0;
|
||||
size_micron.x = KiROUND( m_ConstrainedTextSize.x * FSCALE );
|
||||
size_micron.y = KiROUND( m_ConstrainedTextSize.y * FSCALE );
|
||||
DS_DRAW_ITEM_TEXT dummy( unityScale, this, 0, m_FullText, VECTOR2I( 0, 0 ), size_micron,
|
||||
linewidth, m_Font, m_Italic, m_Bold, m_TextColor );
|
||||
dummy.SetMultilineAllowed( true );
|
||||
dummy.SetHorizJustify( m_Hjustify ) ;
|
||||
dummy.SetVertJustify( m_Vjustify );
|
||||
dummy.SetTextAngle( EDA_ANGLE( m_Orient, DEGREES_T ) );
|
||||
|
||||
BOX2I rect = dummy.GetTextBox();
|
||||
VECTOR2D size;
|
||||
size.x = KiROUND( (int) rect.GetWidth() / FSCALE );
|
||||
size.y = KiROUND( (int) rect.GetHeight() / FSCALE );
|
||||
|
||||
if( m_BoundingBoxSize.x > 0 && size.x > m_BoundingBoxSize.x )
|
||||
m_ConstrainedTextSize.x *= m_BoundingBoxSize.x / size.x;
|
||||
|
||||
if( m_BoundingBoxSize.y > 0 && size.y > m_BoundingBoxSize.y )
|
||||
m_ConstrainedTextSize.y *= m_BoundingBoxSize.y / size.y;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -265,6 +265,10 @@ void EDA_BASE_FRAME::windowClosing( wxCloseEvent& event )
|
||||
|
||||
EDA_BASE_FRAME::~EDA_BASE_FRAME()
|
||||
{
|
||||
Disconnect( ID_AUTO_SAVE_TIMER, wxEVT_TIMER,
|
||||
wxTimerEventHandler( EDA_BASE_FRAME::onAutoSaveTimer ) );
|
||||
Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( EDA_BASE_FRAME::windowClosing ) );
|
||||
|
||||
delete m_autoSaveTimer;
|
||||
delete m_fileHistory;
|
||||
|
||||
|
||||
@@ -401,8 +401,6 @@ void EDA_SHAPE::flip( const VECTOR2I& aCentre, bool aFlipLeftRight )
|
||||
m_start.y = aCentre.y - ( m_start.y - aCentre.y );
|
||||
m_end.y = aCentre.y - ( m_end.y - aCentre.y );
|
||||
}
|
||||
|
||||
std::swap( m_start, m_end );
|
||||
break;
|
||||
|
||||
case SHAPE_T::CIRCLE:
|
||||
@@ -1991,13 +1989,13 @@ static struct EDA_SHAPE_DESC
|
||||
.SetAvailableFunc( isNotPolygonOrCircle );
|
||||
|
||||
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Center X" ),
|
||||
&EDA_SHAPE::SetStartX, &EDA_SHAPE::GetStartX, PROPERTY_DISPLAY::PT_COORD,
|
||||
&EDA_SHAPE::SetCenterX, &EDA_SHAPE::GetStartX, PROPERTY_DISPLAY::PT_COORD,
|
||||
ORIGIN_TRANSFORMS::ABS_X_COORD ),
|
||||
shapeProps )
|
||||
.SetAvailableFunc( isCircle );
|
||||
|
||||
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Center Y" ),
|
||||
&EDA_SHAPE::SetStartY, &EDA_SHAPE::GetStartY, PROPERTY_DISPLAY::PT_COORD,
|
||||
&EDA_SHAPE::SetCenterY, &EDA_SHAPE::GetStartY, PROPERTY_DISPLAY::PT_COORD,
|
||||
ORIGIN_TRANSFORMS::ABS_Y_COORD ),
|
||||
shapeProps )
|
||||
.SetAvailableFunc( isCircle );
|
||||
|
||||
+24
-3
@@ -48,6 +48,7 @@
|
||||
#include <font/outline_font.h>
|
||||
#include <geometry/shape_poly_set.h>
|
||||
#include <properties/property_validators.h>
|
||||
#include <ctl_flags.h> // for CTL_OMIT_HIDE definition
|
||||
|
||||
#include <wx/debug.h> // for wxASSERT
|
||||
#include <wx/string.h>
|
||||
@@ -219,6 +220,22 @@ void EDA_TEXT::SetItalic( bool aItalic )
|
||||
|
||||
|
||||
void EDA_TEXT::SetBold( bool aBold )
|
||||
{
|
||||
if( m_attributes.m_Bold != aBold )
|
||||
{
|
||||
int size = std::min( m_attributes.m_Size.x, m_attributes.m_Size.y );
|
||||
|
||||
if( aBold )
|
||||
m_attributes.m_StrokeWidth = GetPenSizeForBold( size );
|
||||
else
|
||||
m_attributes.m_StrokeWidth = GetPenSizeForNormal( size );
|
||||
}
|
||||
|
||||
SetBoldFlag( aBold );
|
||||
}
|
||||
|
||||
|
||||
void EDA_TEXT::SetBoldFlag( bool aBold )
|
||||
{
|
||||
m_attributes.m_Bold = aBold;
|
||||
ClearRenderCache();
|
||||
@@ -528,10 +545,13 @@ EDA_TEXT::GetRenderCache( const KIFONT::FONT* aFont, const wxString& forResolved
|
||||
}
|
||||
|
||||
|
||||
void EDA_TEXT::SetupRenderCache( const wxString& aResolvedText, const EDA_ANGLE& aAngle )
|
||||
void EDA_TEXT::SetupRenderCache( const wxString& aResolvedText, const KIFONT::FONT* aFont,
|
||||
const EDA_ANGLE& aAngle, const VECTOR2I& aOffset )
|
||||
{
|
||||
m_render_cache_text = aResolvedText;
|
||||
m_render_cache_font = aFont;
|
||||
m_render_cache_angle = aAngle;
|
||||
m_render_cache_offset = aOffset;
|
||||
m_render_cache.clear();
|
||||
}
|
||||
|
||||
@@ -539,6 +559,7 @@ void EDA_TEXT::SetupRenderCache( const wxString& aResolvedText, const EDA_ANGLE&
|
||||
void EDA_TEXT::AddRenderCacheGlyph( const SHAPE_POLY_SET& aPoly )
|
||||
{
|
||||
m_render_cache.emplace_back( std::make_unique<KIFONT::OUTLINE_GLYPH>( aPoly ) );
|
||||
static_cast<KIFONT::OUTLINE_GLYPH*>( m_render_cache.back().get() )->CacheTriangulation();
|
||||
}
|
||||
|
||||
|
||||
@@ -914,7 +935,7 @@ void EDA_TEXT::Format( OUTPUTFORMATTER* aFormatter, int aNestLevel, int aControl
|
||||
if( IsItalic() )
|
||||
aFormatter->Print( 0, " (italic yes)" );
|
||||
|
||||
if( GetTextColor() != COLOR4D::UNSPECIFIED )
|
||||
if( !( aControlBits & CTL_OMIT_COLOR ) && GetTextColor() != COLOR4D::UNSPECIFIED )
|
||||
{
|
||||
aFormatter->Print( 0, " (color %d %d %d %s)",
|
||||
KiROUND( GetTextColor().r * 255.0 ),
|
||||
@@ -945,7 +966,7 @@ void EDA_TEXT::Format( OUTPUTFORMATTER* aFormatter, int aNestLevel, int aControl
|
||||
if( !( aControlBits & CTL_OMIT_HIDE ) && !IsVisible() )
|
||||
aFormatter->Print( 0, " (hide yes)" );
|
||||
|
||||
if( HasHyperlink() )
|
||||
if( !( aControlBits & CTL_OMIT_HYPERLINK ) && HasHyperlink() )
|
||||
{
|
||||
aFormatter->Print( 0, " (href %s)", aFormatter->Quotew( GetHyperlink() ).c_str() );
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <string_utils.h>
|
||||
#include <macros.h>
|
||||
#include <cstdint>
|
||||
#include <reporter.h>
|
||||
|
||||
#ifdef __WIN32__
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
@@ -37,6 +38,8 @@ using namespace fontconfig;
|
||||
static FONTCONFIG* g_config = nullptr;
|
||||
static bool g_fcInitSuccess = false;
|
||||
|
||||
REPORTER* FONTCONFIG::s_reporter = nullptr;
|
||||
|
||||
/**
|
||||
* A simple wrapper to avoid exporing fontconfig in the header
|
||||
*/
|
||||
@@ -57,6 +60,12 @@ FONTCONFIG::FONTCONFIG()
|
||||
};
|
||||
|
||||
|
||||
void fontconfig::FONTCONFIG::SetReporter( REPORTER* aReporter )
|
||||
{
|
||||
s_reporter = aReporter;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This is simply a wrapper to call FcInit() with SEH for Windows
|
||||
* SEH on Windows can only be used in functions without objects that might be unwinded
|
||||
@@ -195,6 +204,17 @@ FONTCONFIG::FF_RESULT FONTCONFIG::FindFont( const wxString &aFontName, wxString
|
||||
if( !g_fcInitSuccess )
|
||||
return retval;
|
||||
|
||||
// If the original font name contains any of these, then it is bold, regardless
|
||||
// of whether we are looking for bold or not
|
||||
if( aFontName.Lower().Contains( wxS( "bold" ) ) // also catches ultrabold
|
||||
|| aFontName.Lower().Contains( wxS( "heavy" ) )
|
||||
|| aFontName.Lower().Contains( wxS( "black" ) ) // also catches extrablack
|
||||
|| aFontName.Lower().Contains( wxS( "thick" ) )
|
||||
|| aFontName.Lower().Contains( wxS( "dark" ) ) )
|
||||
{
|
||||
aBold = true;
|
||||
}
|
||||
|
||||
wxString qualifiedFontName = aFontName;
|
||||
|
||||
wxScopedCharBuffer const fcBuffer = qualifiedFontName.ToUTF8();
|
||||
@@ -317,12 +337,18 @@ FONTCONFIG::FF_RESULT FONTCONFIG::FindFont( const wxString &aFontName, wxString
|
||||
|
||||
if( retval == FF_RESULT::FF_ERROR )
|
||||
{
|
||||
wxLogWarning( _( "Error loading font '%s'." ), qualifiedFontName );
|
||||
if( s_reporter )
|
||||
s_reporter->Report( wxString::Format( _( "Error loading font '%s'." ), qualifiedFontName ) );
|
||||
}
|
||||
else if( retval == FF_RESULT::FF_SUBSTITUTE )
|
||||
{
|
||||
fontName.Replace( ':', ' ' );
|
||||
wxLogWarning( _( "Font '%s' not found; substituting '%s'." ), qualifiedFontName, fontName );
|
||||
|
||||
// If we missed a case but the matching found the original font name, then we are not substituting
|
||||
if( fontName.CmpNoCase( qualifiedFontName ) == 0 )
|
||||
retval = FF_RESULT::FF_OK;
|
||||
else if( s_reporter )
|
||||
s_reporter->Report( wxString::Format( _( "Font '%s' not found; substituting '%s'." ), qualifiedFontName, fontName ) );
|
||||
}
|
||||
|
||||
FcPatternDestroy( pat );
|
||||
|
||||
@@ -259,6 +259,7 @@ VECTOR2I OUTLINE_FONT::getTextAsGlyphs( BOX2I* aBBox, std::vector<std::unique_pt
|
||||
struct GLYPH_CACHE_KEY {
|
||||
FT_Face face;
|
||||
hb_codepoint_t codepoint;
|
||||
double scaler;
|
||||
bool fakeItalic;
|
||||
bool fakeBold;
|
||||
bool mirror;
|
||||
@@ -266,7 +267,7 @@ struct GLYPH_CACHE_KEY {
|
||||
|
||||
bool operator==(const GLYPH_CACHE_KEY& rhs ) const
|
||||
{
|
||||
return face == rhs.face && codepoint == rhs.codepoint
|
||||
return face == rhs.face && codepoint == rhs.codepoint && scaler == rhs.scaler
|
||||
&& fakeItalic == rhs.fakeItalic && fakeBold == rhs.fakeBold
|
||||
&& mirror == rhs.mirror && angle == rhs.angle;
|
||||
}
|
||||
@@ -280,6 +281,7 @@ namespace std
|
||||
std::size_t operator()( const GLYPH_CACHE_KEY& k ) const
|
||||
{
|
||||
return hash<const void*>()( k.face ) ^ hash<unsigned>()( k.codepoint )
|
||||
^ hash<double>()( k.scaler )
|
||||
^ hash<int>()( k.fakeItalic ) ^ hash<int>()( k.fakeBold )
|
||||
^ hash<int>()( k.mirror ) ^ hash<int>()( k.angle.AsTenthsOfADegree() );
|
||||
}
|
||||
@@ -339,7 +341,7 @@ VECTOR2I OUTLINE_FONT::getTextAsGlyphsUnlocked( BOX2I* aBBox,
|
||||
|
||||
if( aGlyphs )
|
||||
{
|
||||
GLYPH_CACHE_KEY key = { face, glyphInfo[i].codepoint, m_fakeItal, m_fakeBold,
|
||||
GLYPH_CACHE_KEY key = { face, glyphInfo[i].codepoint, scaler, m_fakeItal, m_fakeBold,
|
||||
aMirror, aAngle };
|
||||
GLYPH_DATA& glyphData = s_glyphCache[ key ];
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ static double roundp( double x )
|
||||
|
||||
const VECTOR2D CAIRO_GAL_BASE::roundp( const VECTOR2D& v )
|
||||
{
|
||||
if( m_lineWidthIsOdd && m_isStrokeEnabled )
|
||||
if( m_lineWidthIsOdd )
|
||||
return VECTOR2D( ::roundp( v.x ), ::roundp( v.y ) );
|
||||
else
|
||||
return VECTOR2D( floor( v.x + 0.5 ), floor( v.y + 0.5 ) );
|
||||
@@ -352,13 +352,18 @@ void CAIRO_GAL_BASE::DrawArc( const VECTOR2D& aCenterPoint, double aRadius,
|
||||
|
||||
double r = xform( aRadius );
|
||||
|
||||
// N.B. This is backwards. We set this because we want to adjust the center
|
||||
// point that changes both endpoints. In the worst case, this is twice as far.
|
||||
// We cannot adjust radius or center based on the other because this causes the
|
||||
// whole arc to change position/size
|
||||
m_lineWidthIsOdd = !( static_cast<int>( aRadius ) % 2 );
|
||||
// Adjust center and radius slightly to better match the rounding of endpoints.
|
||||
VECTOR2D mid = roundp( xform( aCenterPoint ) );
|
||||
|
||||
auto mid = roundp( xform( aCenterPoint ) );
|
||||
VECTOR2D startPointS = VECTOR2D( r, 0.0 );
|
||||
VECTOR2D endPointS = VECTOR2D( r, 0.0 );
|
||||
RotatePoint( startPointS, -EDA_ANGLE( startAngle, RADIANS_T ) );
|
||||
RotatePoint( endPointS, -EDA_ANGLE( endAngle, RADIANS_T ) );
|
||||
|
||||
VECTOR2D refStart = roundp( xform( aCenterPoint ) + startPointS );
|
||||
VECTOR2D refEnd = roundp( xform( aCenterPoint ) + endPointS );
|
||||
|
||||
r = ( ( refStart - mid ).EuclideanNorm() + ( refEnd - mid ).EuclideanNorm() ) / 2.0;
|
||||
|
||||
cairo_set_line_width( m_currentContext, m_lineWidthInPixels );
|
||||
cairo_new_sub_path( m_currentContext );
|
||||
@@ -403,13 +408,7 @@ void CAIRO_GAL_BASE::DrawArcSegment( const VECTOR2D& aCenterPoint, double aRadiu
|
||||
|
||||
double r = xform( aRadius );
|
||||
|
||||
// N.B. This is backwards. We set this because we want to adjust the center
|
||||
// point that changes both endpoints. In the worst case, this is twice as far.
|
||||
// We cannot adjust radius or center based on the other because this causes the
|
||||
// whole arc to change position/size
|
||||
m_lineWidthIsOdd = !( static_cast<int>( aRadius ) % 2 );
|
||||
|
||||
VECTOR2D mid = roundp( xform( aCenterPoint ) );
|
||||
VECTOR2D mid = xform( aCenterPoint );
|
||||
double width = xform( aWidth / 2.0 );
|
||||
VECTOR2D startPointS = VECTOR2D( r, 0.0 );
|
||||
VECTOR2D endPointS = VECTOR2D( r, 0.0 );
|
||||
@@ -1672,13 +1671,16 @@ bool CAIRO_GAL::updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions )
|
||||
}
|
||||
|
||||
|
||||
bool CAIRO_GAL::SetNativeCursorStyle( KICURSOR aCursor )
|
||||
bool CAIRO_GAL::SetNativeCursorStyle( KICURSOR aCursor, bool aHiDPI )
|
||||
{
|
||||
// Store the current cursor type and get the wxCursor for it
|
||||
if( !GAL::SetNativeCursorStyle( aCursor ) )
|
||||
if( !GAL::SetNativeCursorStyle( aCursor, aHiDPI ) )
|
||||
return false;
|
||||
|
||||
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
|
||||
if( aHiDPI )
|
||||
m_currentwxCursor = CURSOR_STORE::GetHiDPICursor( m_currentNativeCursor );
|
||||
else
|
||||
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
|
||||
|
||||
// Update the cursor in the wx control
|
||||
wxWindow::SetCursor( m_currentwxCursor );
|
||||
|
||||
+259
-51
@@ -44,85 +44,76 @@
|
||||
#include <cursors/cursor-subtract.xpm>
|
||||
#include <cursors/cursor-text.xpm>
|
||||
#include <cursors/cursor-xor.xpm>
|
||||
#include <cursors/cursor-zoom.xpm>
|
||||
#include <cursors/cursor-zoom-in.xpm>
|
||||
#include <cursors/cursor-zoom-out.xpm>
|
||||
#include <cursors/cursor_tune.xpm>
|
||||
#include <cursors/voltage_probe.xpm>
|
||||
#include <cursors/current_probe.xpm>
|
||||
|
||||
// HiDPI cursor files
|
||||
#include <cursors/cursor-add64.xpm>
|
||||
#include <cursors/cursor-component64.xpm>
|
||||
#include <cursors/cursor-eraser64.xpm>
|
||||
#include <cursors/cursor-label-global64.xpm>
|
||||
#include <cursors/cursor-label-hier64.xpm>
|
||||
#include <cursors/cursor-label-net64.xpm>
|
||||
#include <cursors/cursor-line-bus64.xpm>
|
||||
#include <cursors/cursor-line-graphic64.xpm>
|
||||
#include <cursors/cursor-line-wire64.xpm>
|
||||
#include <cursors/cursor-line-wire-add64.xpm>
|
||||
#include <cursors/cursor-measure64.xpm>
|
||||
#include <cursors/cursor-pencil64.xpm>
|
||||
#include <cursors/cursor-select-lasso64.xpm>
|
||||
#include <cursors/cursor-select-window64.xpm>
|
||||
#include <cursors/cursor-subtract64.xpm>
|
||||
#include <cursors/cursor-text64.xpm>
|
||||
#include <cursors/cursor-xor64.xpm>
|
||||
#include <cursors/cursor-zoom-in64.xpm>
|
||||
#include <cursors/cursor-zoom-out64.xpm>
|
||||
#include <cursors/cursor_tune64.xpm>
|
||||
#include <cursors/voltage_probe64.xpm>
|
||||
#include <cursors/current_probe64.xpm>
|
||||
|
||||
|
||||
// Under MSW, the standard cursor is white on black. Elsewhere it is black on white
|
||||
#ifdef __WINDOWS__
|
||||
#include <cursors/cursor-place.xpm>
|
||||
#include <cursors/cursor-place64.xpm>
|
||||
#include <cursors/cursor-select-m.xpm>
|
||||
#include <cursors/cursor-select-m64.xpm>
|
||||
#else
|
||||
#include <cursors/cursor-place-black.xpm>
|
||||
#include <cursors/cursor-place-black64.xpm>
|
||||
#include <cursors/cursor-select-m-black.xpm>
|
||||
#include <cursors/cursor-select-m-black64.xpm>
|
||||
#endif
|
||||
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/debug.h>
|
||||
|
||||
|
||||
static const unsigned char voltage_probe[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00,
|
||||
0x00, 0x30, 0x06, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x0e, 0x08, 0x00, 0x80, 0x07, 0x08, 0x00,
|
||||
0xc0, 0x07, 0x18, 0x00, 0xe0, 0x07, 0x30, 0x00, 0xf0, 0x03, 0x60, 0x00, 0xf8, 0x01, 0x00, 0x00,
|
||||
0xfc, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0xc0,
|
||||
0x0f, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0xf0,
|
||||
0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
|
||||
static const unsigned char current_probe[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x60, 0x06, 0x00,
|
||||
0x00, 0x30, 0x0c, 0x00, 0x00, 0x1c, 0x08, 0x00, 0x00, 0x0f, 0x08, 0x00, 0x80, 0x0f, 0x18, 0x00,
|
||||
0xc0, 0x0f, 0x30, 0x80, 0xe1, 0x07, 0x60, 0x80, 0xf1, 0x03, 0x00, 0x80, 0xf9, 0x01, 0x00, 0x80,
|
||||
0xfd, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0xc0,
|
||||
0x0f, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0xc6, 0x01, 0x00, 0x00, 0x83,
|
||||
0x01, 0x00, 0x00, 0x83, 0x01, 0x00, 0x00, 0x83, 0x01, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xfc,
|
||||
0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00 };
|
||||
|
||||
static const unsigned char cursor_tune[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xc0, 0x0f, 0x00,
|
||||
0x00, 0xe0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00,
|
||||
0x00, 0xfe, 0x03, 0x00, 0x00, 0xff, 0x01, 0x00, 0x80, 0xff, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00,
|
||||
0xe0, 0x3f, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00,
|
||||
0xfc, 0x03, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0xea, 0x00, 0x00, 0x00,
|
||||
0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x50,
|
||||
0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0a,
|
||||
0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00 };
|
||||
|
||||
static const unsigned char cursor_tune_mask[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xc0, 0x0f,
|
||||
0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xfc, 0x07,
|
||||
0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0xff, 0x01, 0x00, 0x80, 0xff, 0x00, 0x00, 0xc0, 0x7f, 0x00,
|
||||
0x00, 0xe0, 0x3f, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00,
|
||||
0x00, 0xfc, 0x03, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xee, 0x00, 0x00,
|
||||
0x00, 0x07, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00,
|
||||
0x70, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
|
||||
0x0e, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00 };
|
||||
|
||||
|
||||
static const std::vector<CURSOR_STORE::CURSOR_DEF> standard_cursors = {
|
||||
{
|
||||
KICURSOR::VOLTAGE_PROBE,
|
||||
voltage_probe,
|
||||
voltage_probe,
|
||||
nullptr,
|
||||
nullptr,
|
||||
voltage_probe_xpm,
|
||||
{ 32, 32 },
|
||||
{ 1, 31 },
|
||||
},
|
||||
{
|
||||
KICURSOR::CURRENT_PROBE,
|
||||
current_probe,
|
||||
current_probe,
|
||||
nullptr,
|
||||
nullptr,
|
||||
current_probe_xpm,
|
||||
{ 32, 32 },
|
||||
{ 4, 27 },
|
||||
},
|
||||
{
|
||||
KICURSOR::TUNE,
|
||||
cursor_tune,
|
||||
cursor_tune_mask,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_tune_xpm,
|
||||
{ 32, 32 },
|
||||
{ 1, 30 },
|
||||
},
|
||||
@@ -198,7 +189,7 @@ static const std::vector<CURSOR_STORE::CURSOR_DEF> standard_cursors = {
|
||||
KICURSOR::ZOOM_IN,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_zoom_xpm,
|
||||
cursor_zoom_in_xpm,
|
||||
{ 32, 32 },
|
||||
{ 6, 6 },
|
||||
},
|
||||
@@ -305,6 +296,209 @@ static const std::vector<CURSOR_STORE::CURSOR_DEF> standard_cursors = {
|
||||
};
|
||||
|
||||
|
||||
static const std::vector<CURSOR_STORE::CURSOR_DEF> hidpi_cursors = {
|
||||
{
|
||||
KICURSOR::VOLTAGE_PROBE,
|
||||
nullptr,
|
||||
nullptr,
|
||||
voltage_probe64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 1, 62 },
|
||||
},
|
||||
{
|
||||
KICURSOR::CURRENT_PROBE,
|
||||
nullptr,
|
||||
nullptr,
|
||||
current_probe64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 8, 54 },
|
||||
},
|
||||
{
|
||||
KICURSOR::TUNE,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_tune64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 2, 60 },
|
||||
},
|
||||
{
|
||||
KICURSOR::PENCIL,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_pencil64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 8, 54 },
|
||||
},
|
||||
{
|
||||
KICURSOR::MOVING,
|
||||
nullptr,
|
||||
nullptr,
|
||||
#ifdef __WINDOWS__
|
||||
cursor_select_m64_xpm,
|
||||
#else
|
||||
cursor_select_m_black64_xpm,
|
||||
#endif
|
||||
{ 64, 64 },
|
||||
{ 2, 2 },
|
||||
},
|
||||
{
|
||||
KICURSOR::REMOVE,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_eraser64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 8, 8 },
|
||||
},
|
||||
{
|
||||
KICURSOR::TEXT,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_text64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::MEASURE,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_measure64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 8, 8 },
|
||||
},
|
||||
{
|
||||
KICURSOR::ADD,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_add64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::SUBTRACT,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_subtract64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::XOR,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_xor64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::ZOOM_IN,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_zoom_in64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 12, 12 },
|
||||
},
|
||||
{
|
||||
KICURSOR::ZOOM_OUT,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_zoom_out64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 12, 12 },
|
||||
},
|
||||
{
|
||||
KICURSOR::LABEL_NET,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_label_net64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::LABEL_GLOBAL,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_label_global64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::COMPONENT,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_component64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::SELECT_LASSO,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_select_lasso64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::SELECT_WINDOW,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_select_window64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 20 },
|
||||
},
|
||||
{
|
||||
KICURSOR::LINE_BUS,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_line_bus64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 10, 52 },
|
||||
},
|
||||
{
|
||||
KICURSOR::LINE_WIRE,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_line_wire64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 10, 52 },
|
||||
},
|
||||
{
|
||||
KICURSOR::LINE_WIRE_ADD,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_line_wire_add64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 10, 52 },
|
||||
},
|
||||
{
|
||||
KICURSOR::LINE_GRAPHIC,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_line_graphic64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 10, 52 },
|
||||
},
|
||||
{
|
||||
KICURSOR::LABEL_HIER,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_label_hier64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::PLACE,
|
||||
nullptr,
|
||||
nullptr,
|
||||
#ifdef __WINDOWS__
|
||||
cursor_place64_xpm,
|
||||
#else
|
||||
cursor_place_black64_xpm,
|
||||
#endif
|
||||
{ 64, 64 },
|
||||
{ 2, 2 },
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Construct a cursor for the given definition.
|
||||
*
|
||||
@@ -393,8 +587,8 @@ const wxCursor& CURSOR_STORE::Get( KICURSOR aIdKey ) const
|
||||
|
||||
const wxCursor CURSOR_STORE::GetCursor( KICURSOR aCursorType )
|
||||
{
|
||||
wxStockCursor stock =
|
||||
GetStockCursor( aCursorType );
|
||||
wxStockCursor stock = GetStockCursor( aCursorType );
|
||||
|
||||
if( stock != wxCURSOR_MAX )
|
||||
{
|
||||
return wxCursor( stock );
|
||||
@@ -405,6 +599,20 @@ const wxCursor CURSOR_STORE::GetCursor( KICURSOR aCursorType )
|
||||
}
|
||||
|
||||
|
||||
const wxCursor CURSOR_STORE::GetHiDPICursor( KICURSOR aCursorType )
|
||||
{
|
||||
wxStockCursor stock = GetStockCursor( aCursorType );
|
||||
|
||||
if( stock != wxCURSOR_MAX )
|
||||
{
|
||||
return wxCursor( stock );
|
||||
}
|
||||
|
||||
static CURSOR_STORE store( hidpi_cursors );
|
||||
return store.Get( aCursorType );
|
||||
}
|
||||
|
||||
|
||||
wxStockCursor CURSOR_STORE::GetStockCursor( KICURSOR aCursorType )
|
||||
{
|
||||
wxStockCursor stockCursor;
|
||||
|
||||
@@ -81,7 +81,7 @@ GAL::GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions ) :
|
||||
SetCursorEnabled( false );
|
||||
|
||||
// Initialize the native widget to an arrow cursor
|
||||
SetNativeCursorStyle( KICURSOR::ARROW );
|
||||
SetNativeCursorStyle( KICURSOR::ARROW, false );
|
||||
|
||||
// Initialize text properties
|
||||
ResetTextAttributes();
|
||||
@@ -277,7 +277,7 @@ void GAL::BitmapText( const wxString& aText, const VECTOR2I& aPosition, const ED
|
||||
}
|
||||
|
||||
|
||||
bool GAL::SetNativeCursorStyle( KICURSOR aCursor )
|
||||
bool GAL::SetNativeCursorStyle( KICURSOR aCursor, bool aHiDPI )
|
||||
{
|
||||
if( m_currentNativeCursor == aCursor )
|
||||
return false;
|
||||
|
||||
@@ -34,8 +34,7 @@ HIDPI_GL_CANVAS::HIDPI_GL_CANVAS( const KIGFX::VC_SETTINGS& aSettings, wxWindow*
|
||||
const wxPoint& aPos, const wxSize& aSize, long aStyle,
|
||||
const wxString& aName, const wxPalette& aPalette ) :
|
||||
wxGLCanvas( aParent, aId, aAttribList, aPos, aSize, aStyle, aName, aPalette ),
|
||||
m_settings( aSettings ),
|
||||
m_scale_factor( DPI_SCALING::GetDefaultScaleFactor() )
|
||||
m_settings( aSettings )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -64,13 +63,7 @@ wxPoint HIDPI_GL_CANVAS::GetNativePosition( const wxPoint& aPoint ) const
|
||||
}
|
||||
|
||||
|
||||
void HIDPI_GL_CANVAS::SetScaleFactor( double aNewScaleFactor )
|
||||
{
|
||||
m_scale_factor = aNewScaleFactor;
|
||||
}
|
||||
|
||||
|
||||
double HIDPI_GL_CANVAS::GetScaleFactor() const
|
||||
{
|
||||
return m_scale_factor;
|
||||
return GetContentScaleFactor();
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KICAD, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2012 Torsten Hueter, torstenhtr <at> gmx.de
|
||||
* Copyright (C) 2012-2023 Kicad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2012-2024 Kicad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2013-2017 CERN
|
||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||
*
|
||||
@@ -33,6 +33,7 @@
|
||||
#endif
|
||||
|
||||
#include <advanced_config.h>
|
||||
#include <build_version.h>
|
||||
#include <gal/opengl/opengl_gal.h>
|
||||
#include <gal/opengl/utils.h>
|
||||
#include <gal/definitions.h>
|
||||
@@ -254,7 +255,8 @@ GLuint GL_BITMAP_CACHE::cacheBitmap( const BITMAP_BASE* aBitmap )
|
||||
bmp.accessTime = currentTime;
|
||||
|
||||
#ifndef DISABLE_BITMAP_CACHE
|
||||
if( m_cacheLru.size() + 1 > m_cacheMaxElements || m_cacheSize + bmp.size > m_cacheMaxSize )
|
||||
if( ( m_cacheLru.size() + 1 > m_cacheMaxElements || m_cacheSize + bmp.size > m_cacheMaxSize )
|
||||
&& !m_cacheLru.empty() )
|
||||
{
|
||||
KIID toRemove( 0 );
|
||||
auto toRemoveLru = m_cacheLru.end();
|
||||
@@ -506,13 +508,6 @@ bool OPENGL_GAL::updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions )
|
||||
refresh = true;
|
||||
}
|
||||
|
||||
if( m_options.m_scaleFactor != GetScaleFactor() )
|
||||
{
|
||||
SetScaleFactor( m_options.m_scaleFactor );
|
||||
m_gridLineWidth = m_options.m_scaleFactor * ( m_options.m_gridLineWidth + 0.25 );
|
||||
refresh = true;
|
||||
}
|
||||
|
||||
if( super::updatedGalDisplayOptions( aOptions ) || refresh )
|
||||
{
|
||||
Refresh();
|
||||
@@ -2133,13 +2128,16 @@ void OPENGL_GAL::EndDiffLayer()
|
||||
}
|
||||
|
||||
|
||||
bool OPENGL_GAL::SetNativeCursorStyle( KICURSOR aCursor )
|
||||
bool OPENGL_GAL::SetNativeCursorStyle( KICURSOR aCursor, bool aHiDPI )
|
||||
{
|
||||
// Store the current cursor type and get the wxCursor for it
|
||||
if( !GAL::SetNativeCursorStyle( aCursor ) )
|
||||
if( !GAL::SetNativeCursorStyle( aCursor, aHiDPI ) )
|
||||
return false;
|
||||
|
||||
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
|
||||
if( aHiDPI )
|
||||
m_currentwxCursor = CURSOR_STORE::GetHiDPICursor( m_currentNativeCursor );
|
||||
else
|
||||
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
|
||||
|
||||
// Update the cursor in the wx control
|
||||
HIDPI_GL_CANVAS::SetCursor( m_currentwxCursor );
|
||||
@@ -2678,6 +2676,9 @@ void OPENGL_GAL::init()
|
||||
|
||||
#endif // KICAD_USE_EGL
|
||||
|
||||
SetOpenGLInfo( (const char*) glGetString( GL_VENDOR ), (const char*) glGetString( GL_RENDERER ),
|
||||
(const char*) glGetString( GL_VERSION ) );
|
||||
|
||||
if( GLEW_OK != err )
|
||||
throw std::runtime_error( (const char*) glewGetErrorString( err ) );
|
||||
|
||||
|
||||
@@ -642,10 +642,6 @@ void DXF_IMPORT_PLUGIN::addEllipse( const DL_EllipseData& aData )
|
||||
if( startAngle > endAngle )
|
||||
endAngle += ANGLE_360;
|
||||
|
||||
// Angles are relative to major axis
|
||||
startAngle -= EDA_ANGLE( major );
|
||||
endAngle -= EDA_ANGLE( major );
|
||||
|
||||
if( aData.ratio == 1.0 )
|
||||
{
|
||||
double radius = major.EuclideanNorm();
|
||||
@@ -658,6 +654,10 @@ void DXF_IMPORT_PLUGIN::addEllipse( const DL_EllipseData& aData )
|
||||
}
|
||||
else
|
||||
{
|
||||
// Angles are relative to major axis
|
||||
startAngle -= EDA_ANGLE( major );
|
||||
endAngle -= EDA_ANGLE( major );
|
||||
|
||||
DL_ArcData arc( aData.cx, aData.cy, aData.cz, radius, startAngle.AsDegrees(),
|
||||
endAngle.AsDegrees() );
|
||||
addArc( arc );
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2023 Alex Shvartzkop <dudesuchamazing@gmail.com>
|
||||
* Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2023-2024 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
|
||||
@@ -246,7 +246,7 @@ EASYEDA_PARSER_BASE::ParseLineChains( const wxString& data, int aArcMinSegLen, b
|
||||
arc.ConstructFromStartEndCenter( RelPos( start ), RelPos( end ), RelPos( arcCenter ),
|
||||
!cw );
|
||||
|
||||
chain.Append( arc );
|
||||
chain.Append( arc, aArcMinSegLen );
|
||||
|
||||
prevPt = end;
|
||||
}
|
||||
|
||||
@@ -140,7 +140,8 @@ EASYEDAPRO::ProjectToSelectorDialog( const nlohmann::json& aProject, bool aPcbOn
|
||||
}
|
||||
|
||||
|
||||
nlohmann::json EASYEDAPRO::ReadProjectOrDeviceFile( const wxString& aZipFileName )
|
||||
nlohmann::json EASYEDAPRO::FindJsonFile( const wxString& aZipFileName,
|
||||
const std::set<wxString>& aFileNames )
|
||||
{
|
||||
std::shared_ptr<wxZipEntry> entry;
|
||||
wxFFileInputStream in( aZipFileName );
|
||||
@@ -152,7 +153,7 @@ nlohmann::json EASYEDAPRO::ReadProjectOrDeviceFile( const wxString& aZipFileName
|
||||
|
||||
try
|
||||
{
|
||||
if( name == wxS( "project.json" ) || name == wxS( "device.json" ) )
|
||||
if( aFileNames.find( name ) != aFileNames.end() )
|
||||
{
|
||||
wxMemoryOutputStream memos;
|
||||
memos << zip;
|
||||
@@ -175,6 +176,20 @@ nlohmann::json EASYEDAPRO::ReadProjectOrDeviceFile( const wxString& aZipFileName
|
||||
}
|
||||
}
|
||||
|
||||
return nlohmann::json{};
|
||||
}
|
||||
|
||||
|
||||
nlohmann::json EASYEDAPRO::ReadProjectOrDeviceFile( const wxString& aZipFileName )
|
||||
{
|
||||
static const std::set<wxString> c_files = { wxS( "project.json" ), wxS( "device.json" ),
|
||||
wxS( "footprint.json" ), wxS( "symbol.json" ) };
|
||||
|
||||
nlohmann::json j = FindJsonFile( aZipFileName, c_files );
|
||||
|
||||
if( !j.is_null() )
|
||||
return j;
|
||||
|
||||
THROW_IO_ERROR( wxString::Format(
|
||||
_( "'%s' does not appear to be a valid EasyEDA (JLCEDA) Pro "
|
||||
"project or library file. Cannot find project.json or device.json." ),
|
||||
@@ -230,8 +245,17 @@ std::vector<nlohmann::json> EASYEDAPRO::ParseJsonLines( wxInputStream& aInput,
|
||||
{
|
||||
try
|
||||
{
|
||||
nlohmann::json js = nlohmann::json::parse( txt.ReadLine() );
|
||||
lines.emplace_back( js );
|
||||
wxString line = txt.ReadLine();
|
||||
|
||||
if( !line.IsEmpty() )
|
||||
{
|
||||
nlohmann::json js = nlohmann::json::parse( line );
|
||||
lines.emplace_back( js );
|
||||
}
|
||||
else
|
||||
{
|
||||
lines.emplace_back( nlohmann::json() );
|
||||
}
|
||||
}
|
||||
catch( nlohmann::json::exception& e )
|
||||
{
|
||||
@@ -244,3 +268,42 @@ std::vector<nlohmann::json> EASYEDAPRO::ParseJsonLines( wxInputStream& aInput,
|
||||
|
||||
return lines;
|
||||
}
|
||||
|
||||
|
||||
std::vector<std::vector<nlohmann::json>>
|
||||
EASYEDAPRO::ParseJsonLinesWithSeparation( wxInputStream& aInput, const wxString& aSource )
|
||||
{
|
||||
wxTextInputStream txt( aInput, wxS( " " ), wxConvUTF8 );
|
||||
|
||||
int currentLine = 1;
|
||||
|
||||
std::vector<std::vector<nlohmann::json>> lineBlocks;
|
||||
lineBlocks.emplace_back();
|
||||
|
||||
while( aInput.CanRead() )
|
||||
{
|
||||
try
|
||||
{
|
||||
wxString line = txt.ReadLine();
|
||||
|
||||
if( !line.IsEmpty() )
|
||||
{
|
||||
nlohmann::json js = nlohmann::json::parse( line );
|
||||
lineBlocks.back().emplace_back( js );
|
||||
}
|
||||
else
|
||||
{
|
||||
lineBlocks.emplace_back();
|
||||
}
|
||||
}
|
||||
catch( nlohmann::json::exception& e )
|
||||
{
|
||||
wxLogWarning( wxString::Format( _( "Cannot parse JSON line %d in '%s': %s" ),
|
||||
currentLine, aSource, e.what() ) );
|
||||
}
|
||||
|
||||
currentLine++;
|
||||
}
|
||||
|
||||
return lineBlocks;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#ifndef EASYEDAPRO_IMPORT_UTILS_H_
|
||||
#define EASYEDAPRO_IMPORT_UTILS_H_
|
||||
|
||||
#include <set>
|
||||
#include <wx/stream.h>
|
||||
#include <wx/string.h>
|
||||
#include <lib_id.h>
|
||||
@@ -46,6 +47,8 @@ std::vector<IMPORT_PROJECT_DESC> ProjectToSelectorDialog( const nlohmann::json&
|
||||
bool aPcbOnly = false,
|
||||
bool aSchOnly = false );
|
||||
|
||||
nlohmann::json FindJsonFile( const wxString& aZipFileName, const std::set<wxString>& aFileNames );
|
||||
|
||||
nlohmann::json ReadProjectOrDeviceFile( const wxString& aZipFileName );
|
||||
|
||||
void IterateZipFiles(
|
||||
@@ -54,6 +57,12 @@ void IterateZipFiles(
|
||||
|
||||
std::vector<nlohmann::json> ParseJsonLines( wxInputStream& aInput, const wxString& aSource );
|
||||
|
||||
/**
|
||||
* Multiple document types (e.g. footprint and PCB) can be put into a single file, separated by empty line.
|
||||
*/
|
||||
std::vector<std::vector<nlohmann::json>> ParseJsonLinesWithSeparation( wxInputStream& aInput,
|
||||
const wxString& aSource );
|
||||
|
||||
} // namespace EASYEDAPRO
|
||||
|
||||
|
||||
|
||||
@@ -36,7 +36,9 @@ void EASYEDAPRO::from_json( const nlohmann::json& j, EASYEDAPRO::SCH_ATTR& d )
|
||||
d.id = j.at( 1 ).get<wxString>();
|
||||
d.parentId = j.at( 2 ).get<wxString>();
|
||||
d.key = j.at( 3 ).get<wxString>();
|
||||
d.value = j.at( 4 ).get<wxString>();
|
||||
|
||||
if( j.at( 4 ).is_string() )
|
||||
d.value = j.at( 4 ).get<wxString>();
|
||||
|
||||
if( j.at( 5 ).is_number() )
|
||||
d.keyVisible = j.at( 5 ).get<int>();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2015 Mark Roszko <mark.roszko@gmail.com>
|
||||
* Copyright (C) 2016 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||
* Copyright (C) 2015-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2015-2024 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
|
||||
@@ -27,11 +27,18 @@
|
||||
// conflicts for some defines, at least on Windows
|
||||
#include <kicad_curl/kicad_curl.h>
|
||||
|
||||
#include <mutex>
|
||||
#include <ki_exception.h> // THROW_IO_ERROR
|
||||
|
||||
|
||||
static std::shared_mutex s_curlMutex;
|
||||
static bool s_curlShuttingDown = false;
|
||||
|
||||
|
||||
void KICAD_CURL::Init()
|
||||
{
|
||||
s_curlShuttingDown = false;
|
||||
|
||||
if( curl_global_init( CURL_GLOBAL_ALL ) != CURLE_OK )
|
||||
{
|
||||
THROW_IO_ERROR( "curl_global_init() failed." );
|
||||
@@ -41,10 +48,26 @@ void KICAD_CURL::Init()
|
||||
|
||||
void KICAD_CURL::Cleanup()
|
||||
{
|
||||
s_curlShuttingDown = true;
|
||||
|
||||
std::unique_lock lock( s_curlMutex );
|
||||
|
||||
curl_global_cleanup();
|
||||
}
|
||||
|
||||
|
||||
std::shared_mutex& KICAD_CURL::Mutex()
|
||||
{
|
||||
return s_curlMutex;
|
||||
}
|
||||
|
||||
|
||||
bool KICAD_CURL::IsShuttingDown()
|
||||
{
|
||||
return s_curlShuttingDown;
|
||||
}
|
||||
|
||||
|
||||
std::string GetKicadCurlVersion()
|
||||
{
|
||||
return KICAD_CURL::GetVersion();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2015 Mark Roszko <mark.roszko@gmail.com>
|
||||
* Copyright (C) 2015-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2015-2024 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
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <cstddef>
|
||||
#include <exception>
|
||||
#include <sstream>
|
||||
#include <shared_mutex>
|
||||
#include <wx/app.h>
|
||||
|
||||
#include <build_version.h>
|
||||
@@ -88,6 +89,9 @@ static size_t stream_write_callback( void* aContents, size_t aSize, size_t aNmem
|
||||
static int xferinfo( void* aProgress, curl_off_t aDLtotal, curl_off_t aDLnow, curl_off_t aULtotal,
|
||||
curl_off_t aULnow )
|
||||
{
|
||||
if( KICAD_CURL::IsShuttingDown() )
|
||||
return 1; // Should abort the operation
|
||||
|
||||
CURL_PROGRESS* progress = static_cast<CURL_PROGRESS*>( aProgress );
|
||||
curl_off_t curtime = 0;
|
||||
|
||||
@@ -190,6 +194,12 @@ KICAD_CURL_EASY::~KICAD_CURL_EASY()
|
||||
|
||||
int KICAD_CURL_EASY::Perform()
|
||||
{
|
||||
std::shared_lock lock( KICAD_CURL::Mutex(), std::try_to_lock );
|
||||
|
||||
// If can't lock, we should be in the process of tearing down.
|
||||
if( !lock )
|
||||
return CURLE_ABORTED_BY_CALLBACK;
|
||||
|
||||
if( m_headers )
|
||||
curl_easy_setopt( m_CURL, CURLOPT_HTTPHEADER, m_headers );
|
||||
|
||||
|
||||
+14
-1
@@ -57,7 +57,6 @@ KIWAY_PLAYER::KIWAY_PLAYER( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType
|
||||
|
||||
KIWAY_PLAYER::~KIWAY_PLAYER() throw()
|
||||
{
|
||||
|
||||
// socket server must be destructed before we complete
|
||||
// destructing the frame or else we could crash
|
||||
// as the socket server holds a reference to this frame
|
||||
@@ -69,6 +68,20 @@ KIWAY_PLAYER::~KIWAY_PLAYER() throw()
|
||||
delete m_socketServer;
|
||||
m_socketServer = nullptr;
|
||||
}
|
||||
|
||||
// remove active sockets as well
|
||||
for( wxSocketBase* socket : m_sockets )
|
||||
{
|
||||
if( !socket )
|
||||
continue;
|
||||
|
||||
// ensure any event handling stops
|
||||
socket->Notify( false );
|
||||
|
||||
delete socket;
|
||||
}
|
||||
|
||||
m_sockets.clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <wx/debug.h>
|
||||
#include <wx/filename.h>
|
||||
#include <set>
|
||||
#include <common.h>
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
#include "lib_table_grid.h"
|
||||
|
||||
|
||||
LIB_TABLE_GRID_TRICKS::LIB_TABLE_GRID_TRICKS( WX_GRID* aGrid ) : GRID_TRICKS( aGrid )
|
||||
LIB_TABLE_GRID_TRICKS::LIB_TABLE_GRID_TRICKS( WX_GRID* aGrid ) :
|
||||
GRID_TRICKS( aGrid )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -65,11 +66,14 @@ void LIB_TABLE_GRID_TRICKS::showPopupMenu( wxMenu& menu, wxGridEvent& aEvent )
|
||||
if( showDeactivate )
|
||||
menu.Append( LIB_TABLE_GRID_TRICKS_DEACTIVATE_SELECTED, _( "Deactivate selected" ) );
|
||||
|
||||
if( showSetVisible )
|
||||
menu.Append( LIB_TABLE_GRID_TRICKS_SET_VISIBLE, _( "Set visible flag" ) );
|
||||
if( supportsVisibilityColumn() )
|
||||
{
|
||||
if( showSetVisible )
|
||||
menu.Append( LIB_TABLE_GRID_TRICKS_SET_VISIBLE, _( "Set visible flag" ) );
|
||||
|
||||
if( showUnsetVisible )
|
||||
menu.Append( LIB_TABLE_GRID_TRICKS_UNSET_VISIBLE, _( "Unset visible flag" ) );
|
||||
if( showUnsetVisible )
|
||||
menu.Append( LIB_TABLE_GRID_TRICKS_UNSET_VISIBLE, _( "Unset visible flag" ) );
|
||||
}
|
||||
|
||||
bool showSettings = false;
|
||||
|
||||
|
||||
@@ -416,7 +416,7 @@ wxDataViewColumn* LIB_TREE_MODEL_ADAPTER::doAddColumn( const wxString& aHeader,
|
||||
|
||||
wxDataViewColumn* col = new wxDataViewColumn(
|
||||
translatedHeader, new LIB_TREE_RENDERER(), index, m_colWidths[aHeader], wxALIGN_NOT,
|
||||
wxDATAVIEW_CELL_INERT | wxDATAVIEW_COL_RESIZABLE | wxDATAVIEW_COL_SORTABLE );
|
||||
wxDATAVIEW_CELL_INERT | static_cast<int>( wxDATAVIEW_COL_RESIZABLE ) );
|
||||
m_widget->AppendColumn( col );
|
||||
|
||||
col->SetMinWidth( headerMinWidth.x );
|
||||
|
||||
@@ -178,6 +178,7 @@ public:
|
||||
m_contentSizer->Add( m_noNotificationsText, 1, wxALL | wxEXPAND, 5 );
|
||||
|
||||
Bind( wxEVT_KILL_FOCUS, &NOTIFICATIONS_LIST::onFocusLoss, this );
|
||||
m_scrolledWindow->Bind( wxEVT_KILL_FOCUS, &NOTIFICATIONS_LIST::onFocusLoss, this );
|
||||
|
||||
SetSizer( bSizer1 );
|
||||
Layout();
|
||||
|
||||
+4
-5
@@ -153,6 +153,9 @@ PGM_BASE::~PGM_BASE()
|
||||
}
|
||||
|
||||
delete[] m_argvUtf8;
|
||||
|
||||
delete m_locale;
|
||||
m_locale = nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -164,10 +167,6 @@ void PGM_BASE::Destroy()
|
||||
sentry_close();
|
||||
#endif
|
||||
|
||||
// unlike a normal destructor, this is designed to be called more than once safely:
|
||||
delete m_locale;
|
||||
m_locale = nullptr;
|
||||
|
||||
m_pgm_checker.reset();
|
||||
}
|
||||
|
||||
@@ -990,7 +989,7 @@ void PGM_BASE::HandleAssert( const wxString& aFile, int aLine, const wxString& a
|
||||
{
|
||||
static std::set<SENTRY_ASSERT_CACHE_KEY> assertCache;
|
||||
|
||||
SENTRY_ASSERT_CACHE_KEY key = { aFile, aLine, aFunc, aCond, aMsg };
|
||||
SENTRY_ASSERT_CACHE_KEY key = { aFile, aLine, aFunc, aCond };
|
||||
|
||||
if( assertCache.find( key ) == assertCache.end() )
|
||||
{
|
||||
|
||||
@@ -851,7 +851,7 @@ void SVG_PLOTTER::Text( const VECTOR2I& aPos,
|
||||
|
||||
fprintf( m_outputFile,
|
||||
"textLength=\"%.*f\" font-size=\"%.*f\" lengthAdjust=\"spacingAndGlyphs\"\n"
|
||||
"text-anchor=\"%s\" opacity=\"0\">%s</text>\n",
|
||||
"text-anchor=\"%s\" opacity=\"0\" stroke-opacity=\"0\">%s</text>\n",
|
||||
m_precision, sz_dev.x, m_precision, sz_dev.y, hjust, TO_UTF8( XmlEsc( aText ) ) );
|
||||
|
||||
if( !aOrient.IsZero() )
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2020 KiCad Developers, see AUTHORS.TXT for contributors.
|
||||
* Copyright (C) 2024 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
|
||||
@@ -55,9 +55,12 @@ RENDER_SETTINGS::~RENDER_SETTINGS()
|
||||
|
||||
|
||||
#if 0
|
||||
constexpr double correction = 0.8; // Looks best visually
|
||||
constexpr double correction = 0.8; // Looks best visually
|
||||
#else
|
||||
constexpr double correction = 1.0; // Matches ISO 128-2
|
||||
constexpr double correction = 1.0; // Matches ISO 128-2, but can creates issues on GTK and MSW:
|
||||
// "dots" are not always visible depending on the zoom level
|
||||
// because they create 0 lenght lines
|
||||
// So they will drawn as segments, even with correction = 1.0
|
||||
#endif
|
||||
|
||||
|
||||
@@ -69,7 +72,9 @@ double RENDER_SETTINGS::GetDashLength( int aLineWidth ) const
|
||||
|
||||
double RENDER_SETTINGS::GetDotLength( int aLineWidth ) const
|
||||
{
|
||||
return ( 1.0 - correction ) * aLineWidth;
|
||||
// The minimal length scale is arbitrary set to 0.2 after trials
|
||||
// 0 lenght can create drawing issues
|
||||
return std::max( ( 1.0 - correction ), 0.2 ) * aLineWidth;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -160,6 +160,9 @@ APP_SETTINGS_BASE::APP_SETTINGS_BASE( const std::string& aFilename, int aSchemaV
|
||||
m_params.emplace_back( new PARAM<int>( "system.last_imperial_units",
|
||||
&m_System.last_imperial_units, static_cast<int>( EDA_UNITS::MILS ) ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "system.show_import_issues",
|
||||
&m_System.show_import_issues, true ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<wxString>( "appearance.color_theme",
|
||||
&m_ColorTheme, COLOR_SETTINGS::COLOR_BUILTIN_DEFAULT ) );
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ const wxString COLOR_SETTINGS::COLOR_BUILTIN_CLASSIC = "_builtin_classic";
|
||||
|
||||
|
||||
COLOR_SETTINGS::COLOR_SETTINGS( const wxString& aFilename, bool aAbsolutePath ) :
|
||||
JSON_SETTINGS( std::move( aFilename ), SETTINGS_LOC::COLORS, colorsSchemaVersion ),
|
||||
JSON_SETTINGS( aFilename, SETTINGS_LOC::COLORS, colorsSchemaVersion ),
|
||||
m_overrideSchItemColors( false )
|
||||
{
|
||||
if( aAbsolutePath )
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2004-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2004-2023, 2024 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
|
||||
@@ -42,7 +42,7 @@
|
||||
* platforms. This is the list of illegal file name characters for Windows which includes
|
||||
* the illegal file name characters for Linux and OSX.
|
||||
*/
|
||||
static const char illegalFileNameChars[] = "\\/:\"<>|";
|
||||
static const char illegalFileNameChars[] = "\\/:\"<>|*?";
|
||||
|
||||
|
||||
wxString ConvertToNewOverbarNotation( const wxString& aOldStr )
|
||||
@@ -591,7 +591,7 @@ wxString RemoveHTMLTags( const wxString& aInput )
|
||||
|
||||
wxString LinkifyHTML( wxString aStr )
|
||||
{
|
||||
wxRegEx regex( wxS( "\\b(https?|ftp|file)://([-\\w+&@#/%?=~|!:,.;]*[^.<>\\s\u00b6])" ),
|
||||
wxRegEx regex( wxS( "\\b(https?|ftp|file)://([-\\w+&@#/%?=~|!:,.;]*[^.,:;<>\\s\u00b6])" ),
|
||||
wxRE_ICASE );
|
||||
|
||||
regex.ReplaceAll( &aStr, "<a href=\"\\0\">\\0</a>" );
|
||||
@@ -907,11 +907,12 @@ bool ApplyModifier( double& value, const wxString& aString )
|
||||
}
|
||||
|
||||
if( units.length()
|
||||
&& !units.CmpNoCase( wxT( "F" ) )
|
||||
&& !units.CmpNoCase( wxT( "hz" ) )
|
||||
&& !units.CmpNoCase( wxT( "W" ) )
|
||||
&& !units.CmpNoCase( wxT( "V" ) )
|
||||
&& !units.CmpNoCase( wxT( "H" ) ) )
|
||||
&& !units.IsSameAs( wxT( "F" ), false )
|
||||
&& !units.IsSameAs( wxT( "hz" ), false )
|
||||
&& !units.IsSameAs( wxT( "W" ), false )
|
||||
&& !units.IsSameAs( wxT( "V" ), false )
|
||||
&& !units.IsSameAs( wxT( "A" ), false )
|
||||
&& !units.IsSameAs( wxT( "H" ), false ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -212,6 +212,21 @@ ACTION_TOOLBAR::ACTION_TOOLBAR( EDA_BASE_FRAME* parent, wxWindowID id, const wxP
|
||||
|
||||
ACTION_TOOLBAR::~ACTION_TOOLBAR()
|
||||
{
|
||||
Disconnect( wxEVT_COMMAND_TOOL_CLICKED, wxAuiToolBarEventHandler( ACTION_TOOLBAR::onToolEvent ),
|
||||
nullptr, this );
|
||||
Disconnect( wxEVT_AUITOOLBAR_RIGHT_CLICK,
|
||||
wxAuiToolBarEventHandler( ACTION_TOOLBAR::onToolRightClick ), nullptr, this );
|
||||
Disconnect( wxEVT_AUITOOLBAR_BEGIN_DRAG, wxAuiToolBarEventHandler( ACTION_TOOLBAR::onItemDrag ),
|
||||
nullptr, this );
|
||||
Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( ACTION_TOOLBAR::onMouseClick ), nullptr,
|
||||
this );
|
||||
Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( ACTION_TOOLBAR::onMouseClick ), nullptr, this );
|
||||
Disconnect( m_paletteTimer->GetId(), wxEVT_TIMER,
|
||||
wxTimerEventHandler( ACTION_TOOLBAR::onTimerDone ), nullptr, this );
|
||||
|
||||
Unbind( wxEVT_SYS_COLOUR_CHANGED,
|
||||
wxSysColourChangedEventHandler( ACTION_TOOLBAR::onThemeChanged ), this );
|
||||
|
||||
delete m_paletteTimer;
|
||||
|
||||
// Clear all the maps keeping track of our items on the toolbar
|
||||
|
||||
@@ -130,7 +130,7 @@ VECTOR2I SELECTION::GetCenter() const
|
||||
}
|
||||
|
||||
|
||||
BOX2I SELECTION::GetBoundingBox() const
|
||||
BOX2I SELECTION::GetBoundingBox( bool aOnlyVisible ) const
|
||||
{
|
||||
BOX2I bbox;
|
||||
|
||||
|
||||
@@ -455,8 +455,11 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
|
||||
|
||||
if( isMouseClick( type ) )
|
||||
{
|
||||
if( m_toolMgr->GetToolHolder() && m_toolMgr->GetToolHolder()->GetToolCanvas() )
|
||||
if( m_toolMgr->GetToolHolder() && m_toolMgr->GetToolHolder()->GetToolCanvas() &&
|
||||
!m_toolMgr->GetToolHolder()->GetToolCanvas()->HasFocus() )
|
||||
{
|
||||
m_toolMgr->GetToolHolder()->GetToolCanvas()->SetFocus();
|
||||
}
|
||||
}
|
||||
|
||||
// Mouse handling
|
||||
|
||||
@@ -362,7 +362,11 @@ bool TOOL_MANAGER::doRunAction( const TOOL_ACTION& aAction, bool aNow, const std
|
||||
|
||||
while( synchronousControl == STS_RUNNING )
|
||||
{
|
||||
wxYield();
|
||||
wxYield(); // Needed to honor mouse (and other) events during editing
|
||||
wxMilliSleep( 1 ); // Needed to avoid 100% use of one cpu core.
|
||||
// The sleeping time must be must be small to avoid
|
||||
// noticeable lag in mouse and editing events
|
||||
// (1 to 5 ms is a good value)
|
||||
}
|
||||
|
||||
retVal = synchronousControl != STS_CANCELLED;
|
||||
|
||||
@@ -39,35 +39,6 @@
|
||||
#include <wx/log.h>
|
||||
#include <wx/combo.h>
|
||||
|
||||
GRID_CELL_TEXT_EDITOR::GRID_CELL_TEXT_EDITOR() : wxGridCellTextEditor()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void GRID_CELL_TEXT_EDITOR::SetValidator( const wxValidator& validator )
|
||||
{
|
||||
// keep our own copy because wxGridCellTextEditor's is annoyingly private
|
||||
m_validator.reset( static_cast<wxValidator*>( validator.Clone() ) );
|
||||
|
||||
wxGridCellTextEditor::SetValidator( *m_validator );
|
||||
}
|
||||
|
||||
|
||||
void GRID_CELL_TEXT_EDITOR::StartingKey( wxKeyEvent& event )
|
||||
{
|
||||
if( m_validator )
|
||||
{
|
||||
m_validator.get()->SetWindow( Text() );
|
||||
m_validator.get()->ProcessEvent( event );
|
||||
}
|
||||
|
||||
if( event.GetSkipped() )
|
||||
{
|
||||
wxGridCellTextEditor::StartingKey( event );
|
||||
event.Skip( false );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
FOOTPRINT_NAME_VALIDATOR::FOOTPRINT_NAME_VALIDATOR( wxString* aValue ) :
|
||||
wxTextValidator( wxFILTER_EXCLUDE_CHAR_LIST, aValue )
|
||||
|
||||
+25
-25
@@ -399,35 +399,19 @@ void VIEW::SetRequired( int aLayerId, int aRequiredId, bool aRequired )
|
||||
}
|
||||
|
||||
|
||||
// stupid C++... python lambda would do this in one line
|
||||
template <class CONTAINER>
|
||||
struct QUERY_VISITOR
|
||||
{
|
||||
typedef typename CONTAINER::value_type item_type;
|
||||
|
||||
QUERY_VISITOR( CONTAINER& aCont, int aLayer ) :
|
||||
m_cont( aCont ), m_layer( aLayer )
|
||||
{
|
||||
}
|
||||
|
||||
bool operator()( VIEW_ITEM* aItem )
|
||||
{
|
||||
if( aItem->viewPrivData()->GetFlags() & VISIBLE )
|
||||
m_cont.push_back( VIEW::LAYER_ITEM_PAIR( aItem, m_layer ) );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
CONTAINER& m_cont;
|
||||
int m_layer;
|
||||
};
|
||||
|
||||
|
||||
int VIEW::Query( const BOX2I& aRect, std::vector<LAYER_ITEM_PAIR>& aResult ) const
|
||||
{
|
||||
if( m_orderedLayers.empty() )
|
||||
return 0;
|
||||
|
||||
int layer = UNDEFINED_LAYER;
|
||||
auto visitor =
|
||||
[&]( VIEW_ITEM* item ) -> bool
|
||||
{
|
||||
aResult.push_back( VIEW::LAYER_ITEM_PAIR( item, layer ) );
|
||||
return true;
|
||||
};
|
||||
|
||||
std::vector<VIEW_LAYER*>::const_reverse_iterator i;
|
||||
|
||||
// execute queries in reverse direction, so that items that are on the top of
|
||||
@@ -438,7 +422,7 @@ int VIEW::Query( const BOX2I& aRect, std::vector<LAYER_ITEM_PAIR>& aResult ) con
|
||||
if( ( *i )->displayOnly || !( *i )->visible )
|
||||
continue;
|
||||
|
||||
QUERY_VISITOR<std::vector<LAYER_ITEM_PAIR> > visitor( aResult, ( *i )->id );
|
||||
layer = ( *i )->id;
|
||||
( *i )->items->Query( aRect, visitor );
|
||||
}
|
||||
|
||||
@@ -446,6 +430,22 @@ int VIEW::Query( const BOX2I& aRect, std::vector<LAYER_ITEM_PAIR>& aResult ) con
|
||||
}
|
||||
|
||||
|
||||
void VIEW::Query( const BOX2I& aRect, const std::function<bool( VIEW_ITEM* )>& aFunc ) const
|
||||
{
|
||||
if( m_orderedLayers.empty() )
|
||||
return;
|
||||
|
||||
for( const auto& i : m_orderedLayers )
|
||||
{
|
||||
// ignore layers that do not contain actual items (i.e. the selection box, menus, floats)
|
||||
if( i->displayOnly || !i->visible )
|
||||
continue;
|
||||
|
||||
i->items->Query( aRect, aFunc );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
VECTOR2D VIEW::ToWorld( const VECTOR2D& aCoord, bool aAbsolute ) const
|
||||
{
|
||||
const MATRIX3x3D& matrix = m_gal->GetScreenWorldMatrix();
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include <wx/log.h>
|
||||
|
||||
#ifdef __WXMSW__
|
||||
#define USE_MOUSE_CAPTURE
|
||||
#define USE_MOUSE_CAPTURE
|
||||
#endif
|
||||
|
||||
using namespace KIGFX;
|
||||
@@ -694,7 +694,11 @@ void WX_VIEW_CONTROLS::CaptureCursor( bool aEnabled )
|
||||
// Note: for some reason, m_parentPanel->HasCapture() can be false even if CaptureMouse()
|
||||
// was called (i.e. mouse was captured, so when need to test m_MouseCapturedLost to be
|
||||
// sure a wxEVT_MOUSE_CAPTURE_LOST event was fired before. Otherwise wxMSW complains
|
||||
if( aEnabled && !m_parentPanel->HasCapture() && m_parentPanel->m_MouseCapturedLost )
|
||||
// The IsModalDialogFocused is checked because it's possible to start a capture
|
||||
// due to event ordering while a modal dialog was just opened, the mouse capture steels focus
|
||||
// from the modal and causes odd behavior
|
||||
if( aEnabled && !m_parentPanel->HasCapture() && m_parentPanel->m_MouseCapturedLost
|
||||
&& !KIUI::IsModalDialogFocused() )
|
||||
{
|
||||
m_parentPanel->CaptureMouse();
|
||||
|
||||
|
||||
@@ -92,6 +92,13 @@ void BITMAP_BUTTON::setupEvents()
|
||||
|
||||
BITMAP_BUTTON::~BITMAP_BUTTON()
|
||||
{
|
||||
Unbind( wxEVT_PAINT, &BITMAP_BUTTON::OnPaint, this );
|
||||
Unbind( wxEVT_LEFT_UP, &BITMAP_BUTTON::OnLeftButtonUp, this );
|
||||
Unbind( wxEVT_LEFT_DOWN, &BITMAP_BUTTON::OnLeftButtonDown, this );
|
||||
Unbind( wxEVT_LEAVE_WINDOW, &BITMAP_BUTTON::OnMouseLeave, this );
|
||||
Unbind( wxEVT_ENTER_WINDOW, &BITMAP_BUTTON::OnMouseEnter, this );
|
||||
Unbind( wxEVT_KILL_FOCUS, &BITMAP_BUTTON::OnKillFocus, this );
|
||||
Unbind( wxEVT_SET_FOCUS, &BITMAP_BUTTON::OnSetFocus, this );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2021 CERN
|
||||
* Copyright (C) 2018-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2018-2024 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
|
||||
@@ -60,20 +60,9 @@ wxString GRID_CELL_TEXT_BUTTON::GetValue() const
|
||||
void GRID_CELL_TEXT_BUTTON::SetSize( const wxRect& aRect )
|
||||
{
|
||||
wxRect rect( aRect );
|
||||
WX_GRID::CellEditorTransformSizeRect( rect );
|
||||
|
||||
#if defined( __WXMAC__ )
|
||||
rect.Inflate( 2 ); // ignore FOCUS_RING
|
||||
#elif defined( __WXGTK__ )
|
||||
rect.Inflate( -3 ); // The -3 is a very sad hack here. Some GTK themes overrun the
|
||||
// default -1, preventing display. Unfortunately, we don't appear to
|
||||
// have a good method of finding the current margin needed.
|
||||
// Some GTK resize events seem to update the cell size but not all and
|
||||
// not consistently.
|
||||
#else
|
||||
rect.Inflate( -1 );
|
||||
#endif
|
||||
|
||||
Combo()->SetSize( rect, wxSIZE_ALLOW_MINUS_ONE );
|
||||
wxGridCellEditor::SetSize( rect );
|
||||
}
|
||||
|
||||
|
||||
@@ -213,13 +202,15 @@ protected:
|
||||
if( rawValue.IsEmpty() )
|
||||
rawValue = m_preselect;
|
||||
|
||||
wxString symbolId = escapeLibId( rawValue );
|
||||
KIWAY_PLAYER* frame = m_dlg->Kiway().Player( FRAME_SYMBOL_CHOOSER, true, m_dlg );
|
||||
wxString symbolId = escapeLibId( rawValue );
|
||||
|
||||
if( frame->ShowModal( &symbolId, m_dlg ) )
|
||||
SetValue( UnescapeString( symbolId ) );
|
||||
if( KIWAY_PLAYER* frame = m_dlg->Kiway().Player( FRAME_SYMBOL_CHOOSER, true, m_dlg ) )
|
||||
{
|
||||
if( frame->ShowModal( &symbolId, m_dlg ) )
|
||||
SetValue( UnescapeString( symbolId ) );
|
||||
|
||||
frame->Destroy();
|
||||
frame->Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
DIALOG_SHIM* m_dlg;
|
||||
@@ -231,6 +222,7 @@ void GRID_CELL_SYMBOL_ID_EDITOR::Create( wxWindow* aParent, wxWindowID aId,
|
||||
wxEvtHandler* aEventHandler )
|
||||
{
|
||||
m_control = new TEXT_BUTTON_SYMBOL_CHOOSER( aParent, m_dlg, m_preselect );
|
||||
WX_GRID::CellEditorSetMargins( Combo() );
|
||||
|
||||
wxGridCellEditor::Create( aParent, aId, aEventHandler );
|
||||
}
|
||||
@@ -242,11 +234,12 @@ public:
|
||||
TEXT_BUTTON_FP_CHOOSER( wxWindow* aParent, DIALOG_SHIM* aParentDlg,
|
||||
const wxString& aSymbolNetlist, const wxString& aPreselect ) :
|
||||
wxComboCtrl( aParent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
|
||||
wxTE_PROCESS_ENTER ),
|
||||
wxTE_PROCESS_ENTER | wxBORDER_NONE ),
|
||||
m_dlg( aParentDlg ),
|
||||
m_preselect( aPreselect ),
|
||||
m_symbolNetlist( aSymbolNetlist.ToStdString() )
|
||||
{
|
||||
m_buttonFpChooserLock = false;
|
||||
SetButtonBitmaps( KiBitmap( BITMAPS::small_library ) );
|
||||
|
||||
// win32 fix, avoids drawing the "native dropdown caret"
|
||||
@@ -261,30 +254,45 @@ protected:
|
||||
|
||||
void OnButtonClick() override
|
||||
{
|
||||
if( m_buttonFpChooserLock ) // The button to show the FP chooser is clicked, but
|
||||
// a previous click is currently in progress.
|
||||
return;
|
||||
|
||||
// Disable the button until we have finished processing it. Normally this is not an issue
|
||||
// but if the footprint chooser is loading for the first time, it can be slow enough that
|
||||
// multiple clicks will cause multiple instances of the footprint loader process to start
|
||||
m_buttonFpChooserLock = true;
|
||||
|
||||
// pick a footprint using the footprint picker.
|
||||
wxString fpid = GetValue();
|
||||
|
||||
if( fpid.IsEmpty() )
|
||||
fpid = m_preselect;
|
||||
|
||||
KIWAY_PLAYER* frame = m_dlg->Kiway().Player( FRAME_FOOTPRINT_CHOOSER, true, m_dlg );
|
||||
|
||||
if( !m_symbolNetlist.empty() )
|
||||
if( KIWAY_PLAYER* frame = m_dlg->Kiway().Player( FRAME_FOOTPRINT_CHOOSER, true, m_dlg ) )
|
||||
{
|
||||
KIWAY_EXPRESS event( FRAME_FOOTPRINT_CHOOSER, MAIL_SYMBOL_NETLIST, m_symbolNetlist );
|
||||
frame->KiwayMailIn( event );
|
||||
if( !m_symbolNetlist.empty() )
|
||||
{
|
||||
KIWAY_EXPRESS event( FRAME_FOOTPRINT_CHOOSER, MAIL_SYMBOL_NETLIST, m_symbolNetlist );
|
||||
frame->KiwayMailIn( event );
|
||||
}
|
||||
|
||||
if( frame->ShowModal( &fpid, m_dlg ) )
|
||||
SetValue( fpid );
|
||||
|
||||
frame->Destroy();
|
||||
}
|
||||
|
||||
if( frame->ShowModal( &fpid, m_dlg ) )
|
||||
SetValue( fpid );
|
||||
|
||||
frame->Destroy();
|
||||
m_buttonFpChooserLock = false;
|
||||
}
|
||||
|
||||
protected:
|
||||
DIALOG_SHIM* m_dlg;
|
||||
wxString m_preselect;
|
||||
|
||||
// Lock flag to lock the button to show the FP chooser
|
||||
// true when the button is busy, waiting all footprints loaded to
|
||||
// avoid running more than once the FP chooser
|
||||
bool m_buttonFpChooserLock;
|
||||
/*
|
||||
* Symbol netlist format:
|
||||
* pinNumber pinName <tab> pinNumber pinName...
|
||||
@@ -298,6 +306,7 @@ void GRID_CELL_FPID_EDITOR::Create( wxWindow* aParent, wxWindowID aId,
|
||||
wxEvtHandler* aEventHandler )
|
||||
{
|
||||
m_control = new TEXT_BUTTON_FP_CHOOSER( aParent, m_dlg, m_symbolNetlist, m_preselect );
|
||||
WX_GRID::CellEditorSetMargins( Combo() );
|
||||
|
||||
#if wxUSE_VALIDATORS
|
||||
// validate text in textctrl, if validator is set
|
||||
@@ -316,7 +325,7 @@ class TEXT_BUTTON_URL : public wxComboCtrl
|
||||
public:
|
||||
TEXT_BUTTON_URL( wxWindow* aParent, DIALOG_SHIM* aParentDlg, SEARCH_STACK* aSearchStack ) :
|
||||
wxComboCtrl( aParent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
|
||||
wxTE_PROCESS_ENTER ),
|
||||
wxTE_PROCESS_ENTER | wxBORDER_NONE ),
|
||||
m_dlg( aParentDlg ),
|
||||
m_searchStack( aSearchStack )
|
||||
{
|
||||
@@ -349,6 +358,7 @@ void GRID_CELL_URL_EDITOR::Create( wxWindow* aParent, wxWindowID aId,
|
||||
wxEvtHandler* aEventHandler )
|
||||
{
|
||||
m_control = new TEXT_BUTTON_URL( aParent, m_dlg, m_searchStack );
|
||||
WX_GRID::CellEditorSetMargins( Combo() );
|
||||
|
||||
#if wxUSE_VALIDATORS
|
||||
// validate text in textctrl, if validator is set
|
||||
@@ -370,7 +380,7 @@ public:
|
||||
bool aNormalize = false,
|
||||
const wxString& aNormalizeBasePath = wxEmptyString ) :
|
||||
wxComboCtrl( aParent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
|
||||
wxTE_PROCESS_ENTER ),
|
||||
wxTE_PROCESS_ENTER | wxBORDER_NONE ),
|
||||
m_dlg( aParentDlg ),
|
||||
m_grid( aGrid ),
|
||||
m_currentDir( aCurrentDir ),
|
||||
@@ -390,7 +400,7 @@ public:
|
||||
bool aNormalize = false,
|
||||
const wxString& aNormalizeBasePath = wxEmptyString ) :
|
||||
wxComboCtrl( aParent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
|
||||
wxTE_PROCESS_ENTER ),
|
||||
wxTE_PROCESS_ENTER | wxBORDER_NONE ),
|
||||
m_dlg( aParentDlg ),
|
||||
m_grid( aGrid ),
|
||||
m_currentDir( aCurrentDir ),
|
||||
@@ -506,6 +516,8 @@ void GRID_CELL_PATH_EDITOR::Create( wxWindow* aParent, wxWindowID aId,
|
||||
m_control = new TEXT_BUTTON_FILE_BROWSER( aParent, m_dlg, m_grid, m_currentDir, m_fileFilter,
|
||||
m_normalize, m_normalizeBasePath );
|
||||
|
||||
WX_GRID::CellEditorSetMargins( Combo() );
|
||||
|
||||
#if wxUSE_VALIDATORS
|
||||
// validate text in textctrl, if validator is set
|
||||
if ( m_validator )
|
||||
|
||||
@@ -21,9 +21,56 @@
|
||||
#include <string_utils.h>
|
||||
#include <wx/stc/stc.h>
|
||||
#include <widgets/grid_text_helpers.h>
|
||||
#include <widgets/wx_grid.h>
|
||||
#include <scintilla_tricks.h>
|
||||
|
||||
|
||||
//-------- GRID_CELL_TEXT_EDITOR ------------------------------------------------------
|
||||
//
|
||||
|
||||
GRID_CELL_TEXT_EDITOR::GRID_CELL_TEXT_EDITOR() : wxGridCellTextEditor()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void GRID_CELL_TEXT_EDITOR::SetValidator( const wxValidator& validator )
|
||||
{
|
||||
// keep our own copy because wxGridCellTextEditor's is annoyingly private
|
||||
m_validator.reset( static_cast<wxValidator*>( validator.Clone() ) );
|
||||
|
||||
wxGridCellTextEditor::SetValidator( *m_validator );
|
||||
}
|
||||
|
||||
|
||||
void GRID_CELL_TEXT_EDITOR::StartingKey( wxKeyEvent& event )
|
||||
{
|
||||
if( m_validator )
|
||||
{
|
||||
m_validator.get()->SetWindow( Text() );
|
||||
m_validator.get()->ProcessEvent( event );
|
||||
}
|
||||
|
||||
if( event.GetSkipped() )
|
||||
{
|
||||
wxGridCellTextEditor::StartingKey( event );
|
||||
event.Skip( false );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GRID_CELL_TEXT_EDITOR::SetSize( const wxRect& aRect )
|
||||
{
|
||||
wxRect rect( aRect );
|
||||
WX_GRID::CellEditorTransformSizeRect( rect );
|
||||
|
||||
#if defined( __WXMSW__ )
|
||||
rect.Offset( 0, 1 );
|
||||
#endif
|
||||
|
||||
wxGridCellEditor::SetSize( rect );
|
||||
}
|
||||
|
||||
|
||||
//-------- GRID_CELL_ESCAPED_TEXT_RENDERER ------------------------------------------------------
|
||||
//
|
||||
|
||||
@@ -69,9 +116,25 @@ GRID_CELL_STC_EDITOR::GRID_CELL_STC_EDITOR( bool aIgnoreCase,
|
||||
{ }
|
||||
|
||||
|
||||
void GRID_CELL_STC_EDITOR::SetSize( const wxRect& aRect )
|
||||
{
|
||||
wxRect rect( aRect );
|
||||
WX_GRID::CellEditorTransformSizeRect( rect );
|
||||
|
||||
#if defined( __WXMSW__ )
|
||||
rect.Offset( -1, 1 );
|
||||
#elif defined( __WXGTK__ )
|
||||
rect.Offset( -1, 3 );
|
||||
#endif
|
||||
|
||||
wxGridCellEditor::SetSize( rect );
|
||||
}
|
||||
|
||||
|
||||
void GRID_CELL_STC_EDITOR::Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler )
|
||||
{
|
||||
m_control = new wxStyledTextCtrl( aParent );
|
||||
m_control = new wxStyledTextCtrl( aParent, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
||||
wxBORDER_NONE );
|
||||
|
||||
stc_ctrl()->SetTabIndents( false );
|
||||
stc_ctrl()->SetBackSpaceUnIndents( false );
|
||||
|
||||
@@ -107,6 +107,15 @@ KISTATUSBAR::KISTATUSBAR( int aNumberFields, wxWindow* parent, wxWindowID id ) :
|
||||
}
|
||||
|
||||
|
||||
KISTATUSBAR::~KISTATUSBAR()
|
||||
{
|
||||
m_notificationsButton->Unbind( wxEVT_BUTTON, &KISTATUSBAR::onNotificationsIconClick, this );
|
||||
Unbind( wxEVT_SIZE, &KISTATUSBAR::onSize, this );
|
||||
m_backgroundProgressBar->Unbind( wxEVT_LEFT_DOWN, &KISTATUSBAR::onBackgroundProgressClick,
|
||||
this );
|
||||
}
|
||||
|
||||
|
||||
void KISTATUSBAR::onNotificationsIconClick( wxCommandEvent& aEvent )
|
||||
{
|
||||
wxPoint pos = m_notificationsButton->GetScreenPosition();
|
||||
|
||||
@@ -725,18 +725,6 @@ void LIB_TREE::onIdle( wxIdleEvent& aEvent )
|
||||
|
||||
if( m_previewItem.IsOk() )
|
||||
{
|
||||
// Scroll checker
|
||||
if( m_tree_ctrl->GetItemRect( m_previewItem ) != m_previewItemRect )
|
||||
{
|
||||
hidePreview();
|
||||
|
||||
m_hoverPos = clientPos;
|
||||
m_hoverItem = item;
|
||||
m_hoverItemRect = m_tree_ctrl->GetItemRect( m_hoverItem );
|
||||
m_hoverTimer.StartOnce( HOVER_TIMER_MILLIS );
|
||||
return;
|
||||
}
|
||||
|
||||
if( item != m_previewItem )
|
||||
{
|
||||
#ifdef __WXGTK__
|
||||
|
||||
@@ -518,8 +518,10 @@ void mpFXY::Plot( wxDC& dc, mpWindow& w )
|
||||
ys.insert( w.y2p( py ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
else for( int sweep = 0; sweep < GetSweepCount(); ++sweep )
|
||||
{
|
||||
SetSweepWindow( sweep );
|
||||
|
||||
int count = 0;
|
||||
int x0 = 0; // X position of merged current vertical line
|
||||
int ymin0 = 0; // y min coord of merged current vertical line
|
||||
@@ -2456,18 +2458,20 @@ double mpScaleXLog::TransformFromPlot( double xplot ) const
|
||||
void mpFXYVector::Rewind()
|
||||
{
|
||||
m_index = 0;
|
||||
m_sweepWindow = std::numeric_limits<size_t>::max();
|
||||
}
|
||||
|
||||
|
||||
size_t mpFXYVector::GetCount() const
|
||||
void mpFXYVector::SetSweepWindow( int aSweepIdx )
|
||||
{
|
||||
return m_xs.size();
|
||||
m_index = aSweepIdx * m_sweepSize;
|
||||
m_sweepWindow = ( aSweepIdx + 1 ) * m_sweepSize;
|
||||
}
|
||||
|
||||
|
||||
bool mpFXYVector::GetNextXY( double& x, double& y )
|
||||
{
|
||||
if( m_index >= m_xs.size() )
|
||||
if( m_index >= m_xs.size() || m_index >= m_sweepWindow )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -2475,7 +2479,7 @@ bool mpFXYVector::GetNextXY( double& x, double& y )
|
||||
{
|
||||
x = m_xs[m_index];
|
||||
y = m_ys[m_index++];
|
||||
return m_index <= m_xs.size();
|
||||
return m_index <= m_xs.size() && m_index <= m_sweepWindow;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -406,14 +406,19 @@ void PROPERTIES_PANEL::onShow( wxShowEvent& aEvent )
|
||||
{
|
||||
if( aEvent.IsShown() )
|
||||
UpdateData();
|
||||
|
||||
aEvent.Skip();
|
||||
}
|
||||
|
||||
|
||||
void PROPERTIES_PANEL::onCharHook( wxKeyEvent& aEvent )
|
||||
{
|
||||
if( aEvent.GetKeyCode() == WXK_TAB && !aEvent.ShiftDown() )
|
||||
if( aEvent.GetKeyCode() == WXK_TAB && !aEvent.ShiftDown() && m_grid->IsAnyModified() )
|
||||
{
|
||||
m_grid->CommitChangesFromEditor();
|
||||
|
||||
// Pass the tab key on so the default property grid tab behavior is honored.
|
||||
aEvent.Skip();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -87,8 +87,8 @@ protected:
|
||||
virtual wxPGProperty* createPGProperty( const PROPERTY_BASE* aProperty ) const = 0;
|
||||
|
||||
// Event handlers
|
||||
virtual void valueChanging( wxPropertyGridEvent& aEvent ) {}
|
||||
virtual void valueChanged( wxPropertyGridEvent& aEvent ) {}
|
||||
virtual void valueChanging( wxPropertyGridEvent& aEvent ) { aEvent.Skip(); }
|
||||
virtual void valueChanged( wxPropertyGridEvent& aEvent ) { aEvent.Skip(); }
|
||||
void onCharHook( wxKeyEvent& aEvent );
|
||||
void onShow( wxShowEvent& aEvent );
|
||||
|
||||
|
||||
@@ -73,6 +73,15 @@ STD_BITMAP_BUTTON::STD_BITMAP_BUTTON( wxWindow* aParent, wxWindowID aId,
|
||||
|
||||
STD_BITMAP_BUTTON::~STD_BITMAP_BUTTON()
|
||||
{
|
||||
Unbind( wxEVT_PAINT, &STD_BITMAP_BUTTON::OnPaint, this );
|
||||
Unbind( wxEVT_LEFT_UP, &STD_BITMAP_BUTTON::OnLeftButtonUp, this );
|
||||
Unbind( wxEVT_LEFT_DOWN, &STD_BITMAP_BUTTON::OnLeftButtonDown, this );
|
||||
Unbind( wxEVT_KILL_FOCUS, &STD_BITMAP_BUTTON::OnKillFocus, this );
|
||||
Unbind( wxEVT_LEAVE_WINDOW, &STD_BITMAP_BUTTON::OnMouseLeave, this );
|
||||
Unbind( wxEVT_ENTER_WINDOW, &STD_BITMAP_BUTTON::OnMouseEnter, this );
|
||||
|
||||
Unbind( wxEVT_SYS_COLOUR_CHANGED,
|
||||
wxSysColourChangedEventHandler( STD_BITMAP_BUTTON::onThemeChanged ), this );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#include <wx/tokenzr.h>
|
||||
#include <wx/dc.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/event.h> // Needed for textentry.h on MSW
|
||||
#include <wx/textentry.h>
|
||||
|
||||
#include <widgets/wx_grid.h>
|
||||
#include <widgets/ui_common.h>
|
||||
@@ -34,6 +36,21 @@
|
||||
#define MIN_GRIDCELL_MARGIN FromDIP( 3 )
|
||||
|
||||
|
||||
void WX_GRID::CellEditorSetMargins( wxTextEntryBase* aEntry )
|
||||
{
|
||||
// This is consistent with wxGridCellTextEditor. But works differently across platforms or course.
|
||||
aEntry->SetMargins( 0, 0 );
|
||||
}
|
||||
|
||||
|
||||
void WX_GRID::CellEditorTransformSizeRect( wxRect& aRect )
|
||||
{
|
||||
#if defined( __WXMSW__ ) || defined( __WXGTK__ )
|
||||
aRect.Deflate( 2 );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
wxColour getBorderColour()
|
||||
{
|
||||
KIGFX::COLOR4D bg = wxSystemSettings::GetColour( wxSYS_COLOUR_FRAMEBK );
|
||||
|
||||
@@ -159,7 +159,10 @@ void WX_INFOBAR::ShowMessage( const wxString& aMessage, int aFlags )
|
||||
|
||||
m_updateLock = true;
|
||||
|
||||
wxInfoBarGeneric::ShowMessage( aMessage, aFlags );
|
||||
wxString msg = aMessage;
|
||||
msg.Trim();
|
||||
|
||||
wxInfoBarGeneric::ShowMessage( msg, aFlags );
|
||||
|
||||
if( m_auiManager )
|
||||
updateAuiLayout( true );
|
||||
|
||||
@@ -991,8 +991,19 @@ void CVPCB_MAINFRAME::BuildLibrariesList()
|
||||
COMMON_SETTINGS* cfg = Pgm().GetCommonSettings();
|
||||
PROJECT_FILE& project = Kiway().Prj().GetProjectFile();
|
||||
FP_LIB_TABLE* tbl = PROJECT_PCB::PcbFootprintLibs( &Prj() );
|
||||
std::set<wxString> pinnedMatches;
|
||||
std::set<wxString> otherMatches;
|
||||
|
||||
// Use same sorting algorithm as LIB_TREE_NODE::AssignIntrinsicRanks
|
||||
struct library_sort
|
||||
{
|
||||
bool operator()( const wxString& lhs, const wxString& rhs ) const
|
||||
{
|
||||
return StrNumCmp( lhs, rhs, true ) < 0;
|
||||
}
|
||||
};
|
||||
|
||||
std::set<wxString, library_sort> pinnedMatches;
|
||||
std::set<wxString, library_sort> otherMatches;
|
||||
|
||||
m_librariesListBox->ClearList();
|
||||
|
||||
auto process =
|
||||
|
||||
@@ -176,11 +176,11 @@ int CVPCB_CONTROL::ShowFootprintViewer( const TOOL_EVENT& aEvent )
|
||||
|
||||
fpframe = (DISPLAY_FOOTPRINTS_FRAME*) m_frame->Kiway().Player( FRAME_CVPCB_DISPLAY, true,
|
||||
m_frame );
|
||||
|
||||
// If Kiway() cannot create the eeschema frame, it shows a error message, and
|
||||
// frame is null
|
||||
if( !fpframe )
|
||||
{
|
||||
wxMessageBox( _( "Unable to create the footprint viewer frame" ) );
|
||||
return 0;
|
||||
}
|
||||
|
||||
fpframe->Show( true );
|
||||
}
|
||||
|
||||
@@ -397,6 +397,7 @@ set( EESCHEMA_SRCS
|
||||
symbol_tree_model_adapter.cpp
|
||||
symbol_tree_synchronizing_adapter.cpp
|
||||
symbol_viewer_frame.cpp
|
||||
symb_transforms_utils.cpp
|
||||
toolbars_sch_editor.cpp
|
||||
toolbars_symbol_viewer.cpp
|
||||
|
||||
|
||||
@@ -154,15 +154,15 @@ wxString BOM_GENERATOR_HANDLER::readHeader( const wxString& aEndSection )
|
||||
const wxString header( wxS( "@package" ) );
|
||||
|
||||
// Extract substring between @package and endsection
|
||||
int strstart = data.Find( header );
|
||||
size_t strstart = data.find( header );
|
||||
|
||||
if( strstart == wxNOT_FOUND )
|
||||
if( strstart == wxString::npos )
|
||||
return wxEmptyString;
|
||||
|
||||
strstart += header.Length();
|
||||
int strend = data.find( aEndSection, strstart );
|
||||
size_t strend = data.find( aEndSection, strstart );
|
||||
|
||||
if( strend == wxNOT_FOUND )
|
||||
if( strend == wxString::npos )
|
||||
return wxEmptyString;
|
||||
|
||||
// Remove empty line if any
|
||||
@@ -179,15 +179,15 @@ wxString BOM_GENERATOR_HANDLER::getOutputExtension( const wxString& aHeader )
|
||||
// looks for output argument of the form `"%O.extension"`
|
||||
const wxString outputarg( wxS( "\"%O" ) );
|
||||
|
||||
int strstart = aHeader.Find( outputarg );
|
||||
size_t strstart = aHeader.find( outputarg );
|
||||
|
||||
if( strstart == wxNOT_FOUND )
|
||||
if( strstart == wxString::npos )
|
||||
return wxEmptyString;
|
||||
|
||||
strstart += outputarg.Length();
|
||||
int strend = aHeader.find( wxS( "\"" ), strstart );
|
||||
size_t strend = aHeader.find( wxS( "\"" ), strstart );
|
||||
|
||||
if( strend == wxNOT_FOUND )
|
||||
if( strend == wxString::npos )
|
||||
return wxEmptyString;
|
||||
|
||||
return aHeader.SubString( strstart, strend - 1 );
|
||||
|
||||
+109
-12
@@ -720,6 +720,20 @@ void CONNECTION_GRAPH::Recalculate( const SCH_SHEET_LIST& aSheetList, bool aUnco
|
||||
item->GetTypeDesc() );
|
||||
items.push_back( item );
|
||||
dirty_items.insert( item );
|
||||
|
||||
// Add any symbol dirty pins to the dirty_items list
|
||||
if( item->Type() == SCH_SYMBOL_T )
|
||||
{
|
||||
SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( item );
|
||||
|
||||
for( SCH_PIN* pin : symbol->GetPins( &sheet ) )
|
||||
{
|
||||
if( pin->IsConnectivityDirty() )
|
||||
{
|
||||
dirty_items.insert( pin );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// If the symbol isn't dirty, look at the pins
|
||||
// TODO: remove symbols from connectivity graph and only use pins
|
||||
@@ -736,6 +750,19 @@ void CONNECTION_GRAPH::Recalculate( const SCH_SHEET_LIST& aSheetList, bool aUnco
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( item->Type() == SCH_SHEET_T )
|
||||
{
|
||||
SCH_SHEET* sheet = static_cast<SCH_SHEET*>( item );
|
||||
|
||||
for( SCH_SHEET_PIN* pin : sheet->GetPins() )
|
||||
{
|
||||
if( pin->IsConnectivityDirty() )
|
||||
{
|
||||
items.push_back( pin );
|
||||
dirty_items.insert( pin );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure the hierarchy info stored in the SCH_SCREEN (such as symbol units) reflects
|
||||
// the current SCH_SHEET_PATH
|
||||
@@ -890,6 +917,9 @@ std::set<std::pair<SCH_SHEET_PATH, SCH_ITEM*>> CONNECTION_GRAPH::ExtractAffected
|
||||
|
||||
removeSubgraphs( subgraphs );
|
||||
|
||||
for( const auto& [path, item] : retvals )
|
||||
alg::delete_matching( m_items, item );
|
||||
|
||||
return retvals;
|
||||
}
|
||||
|
||||
@@ -2304,9 +2334,16 @@ void CONNECTION_GRAPH::buildConnectionGraph( std::function<void( SCH_ITEM* )>* a
|
||||
|
||||
std::shared_ptr<NET_SETTINGS>& netSettings = m_schematic->Prj().GetProjectFile().m_NetSettings;
|
||||
std::map<wxString, wxString> oldAssignments = netSettings->m_NetClassLabelAssignments;
|
||||
std::set<wxString> affectedNetclassNetAssignments;
|
||||
|
||||
netSettings->m_NetClassLabelAssignments.clear();
|
||||
|
||||
// Used to track where netclasses are assigned to a net from a bus netclass
|
||||
// definition. Without this tracking, depending on the order of testing for
|
||||
// netclasses, an already-assigned netclass on a bus member can be deleted
|
||||
// if an explicitly labelled member net does not have a netclass assigned.
|
||||
std::unordered_set<wxString> netclassAssignedFromBus;
|
||||
|
||||
auto dirtySubgraphs =
|
||||
[&]( const std::vector<CONNECTION_SUBGRAPH*>& subgraphs )
|
||||
{
|
||||
@@ -2345,31 +2382,88 @@ void CONNECTION_GRAPH::buildConnectionGraph( std::function<void( SCH_ITEM* )>* a
|
||||
}
|
||||
}
|
||||
|
||||
if( netclass.IsEmpty() )
|
||||
return;
|
||||
|
||||
if( !driverSubgraph )
|
||||
driverSubgraph = subgraphs.front();
|
||||
|
||||
const wxString netname = driverSubgraph->GetNetName();
|
||||
|
||||
// Handle netclass assignments on buses
|
||||
if( driverSubgraph->m_driver_connection->IsBus() )
|
||||
{
|
||||
for( const auto& member : driverSubgraph->m_driver_connection->Members() )
|
||||
auto processBusMember = [&, this]( const SCH_CONNECTION* member )
|
||||
{
|
||||
netSettings->m_NetClassLabelAssignments[ member->Name() ] = netclass;
|
||||
if( !netclass.IsEmpty() )
|
||||
{
|
||||
netSettings->m_NetClassLabelAssignments[member->Name()] = netclass;
|
||||
netclassAssignedFromBus.insert( member->Name() );
|
||||
}
|
||||
|
||||
auto ii = m_net_name_to_subgraphs_map.find( member->Name() );
|
||||
|
||||
if( ii != m_net_name_to_subgraphs_map.end() )
|
||||
dirtySubgraphs( ii->second );
|
||||
if( oldAssignments.count( member->Name() ) )
|
||||
{
|
||||
if( oldAssignments[member->Name()] != netclass )
|
||||
{
|
||||
affectedNetclassNetAssignments.insert( member->Name() );
|
||||
|
||||
if( ii != m_net_name_to_subgraphs_map.end() )
|
||||
dirtySubgraphs( ii->second );
|
||||
}
|
||||
}
|
||||
else if( !netclass.IsEmpty() )
|
||||
{
|
||||
affectedNetclassNetAssignments.insert( member->Name() );
|
||||
|
||||
if( ii != m_net_name_to_subgraphs_map.end() )
|
||||
dirtySubgraphs( ii->second );
|
||||
}
|
||||
};
|
||||
|
||||
for( const std::shared_ptr<SCH_CONNECTION>& member :
|
||||
driverSubgraph->m_driver_connection->Members() )
|
||||
{
|
||||
// Check if this member itself is a bus (which can be the case
|
||||
// for vector buses as members of a bus, see
|
||||
// https://gitlab.com/kicad/code/kicad/-/issues/16545
|
||||
if( member->IsBus() )
|
||||
{
|
||||
for( const std::shared_ptr<SCH_CONNECTION>& nestedMember :
|
||||
member->Members() )
|
||||
{
|
||||
processBusMember( nestedMember.get() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
processBusMember( member.get() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
netSettings->m_NetClassLabelAssignments[ netname ] = netclass;
|
||||
// Handle netclass assignments on nets / overarching bus definitions.
|
||||
// Note: currently a netclass definition on a bus will override any
|
||||
// on a net. This will be resolved with multiple netclasses.
|
||||
if( !netclassAssignedFromBus.count( netname ) )
|
||||
{
|
||||
if( !netclass.IsEmpty() )
|
||||
{
|
||||
netSettings->m_NetClassLabelAssignments[netname] = netclass;
|
||||
}
|
||||
|
||||
if( oldAssignments[ netname ] != netclass )
|
||||
dirtySubgraphs( subgraphs );
|
||||
if( oldAssignments.count( netname ) )
|
||||
{
|
||||
if( oldAssignments[netname] != netclass )
|
||||
{
|
||||
affectedNetclassNetAssignments.insert( netname );
|
||||
dirtySubgraphs( subgraphs );
|
||||
}
|
||||
}
|
||||
else if( !netclass.IsEmpty() )
|
||||
{
|
||||
affectedNetclassNetAssignments.insert( netname );
|
||||
dirtySubgraphs( subgraphs );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
for( const auto& [ netname, subgraphs ] : m_net_name_to_subgraphs_map )
|
||||
@@ -2379,8 +2473,11 @@ void CONNECTION_GRAPH::buildConnectionGraph( std::function<void( SCH_ITEM* )>* a
|
||||
{
|
||||
for( auto& [ netname, netclass ] : oldAssignments )
|
||||
{
|
||||
if( netSettings->m_NetClassLabelAssignments.count( netname ) )
|
||||
if( netSettings->m_NetClassLabelAssignments.count( netname )
|
||||
|| affectedNetclassNetAssignments.count( netname ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
netSettings->m_NetClassLabelAssignments[ netname ] = netclass;
|
||||
}
|
||||
@@ -2988,7 +3085,7 @@ CONNECTION_SUBGRAPH* CONNECTION_GRAPH::FindFirstSubgraphByName( const wxString&
|
||||
}
|
||||
|
||||
|
||||
CONNECTION_SUBGRAPH* CONNECTION_GRAPH::GetSubgraphForItem( SCH_ITEM* aItem )
|
||||
CONNECTION_SUBGRAPH* CONNECTION_GRAPH::GetSubgraphForItem( SCH_ITEM* aItem ) const
|
||||
{
|
||||
auto it = m_item_to_subgraph_map.find( aItem );
|
||||
CONNECTION_SUBGRAPH* ret = it != m_item_to_subgraph_map.end() ? it->second : nullptr;
|
||||
|
||||
@@ -428,7 +428,7 @@ public:
|
||||
*/
|
||||
CONNECTION_SUBGRAPH* FindFirstSubgraphByName( const wxString& aNetName );
|
||||
|
||||
CONNECTION_SUBGRAPH* GetSubgraphForItem( SCH_ITEM* aItem );
|
||||
CONNECTION_SUBGRAPH* GetSubgraphForItem( SCH_ITEM* aItem ) const;
|
||||
|
||||
const std::vector<CONNECTION_SUBGRAPH*> GetAllSubgraphs( const wxString& aNetName ) const;
|
||||
|
||||
|
||||
@@ -907,7 +907,7 @@ void SCH_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail )
|
||||
KIID uuid( payload );
|
||||
SCH_SHEET_PATH path;
|
||||
|
||||
if( SCH_ITEM* item = m_schematic->GetSheets().GetItem( uuid, &path ) )
|
||||
if( SCH_ITEM* item = m_schematic->GetItem( uuid, &path ) )
|
||||
{
|
||||
if( item->Type() == SCH_SHEET_T )
|
||||
payload = static_cast<SCH_SHEET*>( item )->GetShownName( false );
|
||||
|
||||
@@ -248,15 +248,16 @@ void DIALOG_CHANGE_SYMBOLS::launchMatchIdSymbolBrowser( wxCommandEvent& aEvent )
|
||||
{
|
||||
wxString newName = getLibIdValue( m_specifiedId );
|
||||
|
||||
KIWAY_PLAYER* frame = Kiway().Player( FRAME_SYMBOL_CHOOSER, true, this );
|
||||
|
||||
if( frame->ShowModal( &newName, this ) )
|
||||
if( KIWAY_PLAYER* frame = Kiway().Player( FRAME_SYMBOL_CHOOSER, true, this ) )
|
||||
{
|
||||
m_specifiedId->SetValue( UnescapeString( newName ) );
|
||||
updateFieldsList();
|
||||
}
|
||||
if( frame->ShowModal( &newName, this ) )
|
||||
{
|
||||
m_specifiedId->SetValue( UnescapeString( newName ) );
|
||||
updateFieldsList();
|
||||
}
|
||||
|
||||
frame->Destroy();
|
||||
frame->Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -264,15 +265,16 @@ void DIALOG_CHANGE_SYMBOLS::launchNewIdSymbolBrowser( wxCommandEvent& aEvent )
|
||||
{
|
||||
wxString newName = getLibIdValue( m_newId );
|
||||
|
||||
KIWAY_PLAYER* frame = Kiway().Player( FRAME_SYMBOL_CHOOSER, true, this );
|
||||
|
||||
if( frame->ShowModal( &newName, this ) )
|
||||
if( KIWAY_PLAYER* frame = Kiway().Player( FRAME_SYMBOL_CHOOSER, true, this ) )
|
||||
{
|
||||
m_newId->SetValue( UnescapeString( newName ) );
|
||||
updateFieldsList();
|
||||
}
|
||||
if( frame->ShowModal( &newName, this ) )
|
||||
{
|
||||
m_newId->SetValue( UnescapeString( newName ) );
|
||||
updateFieldsList();
|
||||
}
|
||||
|
||||
frame->Destroy();
|
||||
frame->Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -79,6 +79,7 @@ DIALOG_ERC::DIALOG_ERC( SCH_EDIT_FRAME* parent ) :
|
||||
m_currentSchematic = &parent->Schematic();
|
||||
|
||||
SetName( DIALOG_ERC_WINDOW_NAME ); // Set a window name to be able to find it
|
||||
KIPLATFORM::UI::SetFloatLevel( this );
|
||||
|
||||
EESCHEMA_SETTINGS* settings = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() );
|
||||
m_severities = settings->m_Appearance.erc_severities;
|
||||
@@ -466,6 +467,8 @@ void DIALOG_ERC::OnRunERCClick( wxCommandEvent& event )
|
||||
m_ercRun = true;
|
||||
redrawDrawPanel();
|
||||
updateDisplayedCounts();
|
||||
// set float level again, it can be lost due to window events during test run
|
||||
KIPLATFORM::UI::SetFloatLevel( this );
|
||||
}
|
||||
|
||||
|
||||
@@ -510,7 +513,7 @@ void DIALOG_ERC::OnERCItemSelected( wxDataViewEvent& aEvent )
|
||||
{
|
||||
const KIID& itemID = RC_TREE_MODEL::ToUUID( aEvent.GetItem() );
|
||||
SCH_SHEET_PATH sheet;
|
||||
SCH_ITEM* item = m_parent->Schematic().GetSheets().GetItem( itemID, &sheet );
|
||||
SCH_ITEM* item = m_parent->Schematic().GetItem( itemID, &sheet );
|
||||
|
||||
if( m_centerMarkerOnIdle )
|
||||
{
|
||||
|
||||
@@ -677,7 +677,7 @@ void DIALOG_SCH_FIELD_PROPERTIES::UpdateField( SCH_COMMIT* aCommit, SCH_FIELD* a
|
||||
int unit = symbol->GetUnit();
|
||||
LIB_ID libId = symbol->GetLibId();
|
||||
|
||||
for( SCH_SHEET_PATH& sheet : editFrame->Schematic().GetSheets() )
|
||||
for( SCH_SHEET_PATH& sheet : editFrame->Schematic().GetUnorderedSheets() )
|
||||
{
|
||||
SCH_SCREEN* screen = sheet.LastScreen();
|
||||
std::vector<SCH_SYMBOL*> otherUnits;
|
||||
|
||||
@@ -293,10 +293,11 @@ void DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem( SCH_COMMIT* aCommit,
|
||||
if( m_italic->Get3StateValue() != wxCHK_UNDETERMINED )
|
||||
eda_text->SetItalic( m_italic->GetValue() );
|
||||
|
||||
// Must come after SetTextSize()
|
||||
if( m_bold->Get3StateValue() != wxCHK_UNDETERMINED )
|
||||
eda_text->SetBold( m_bold->GetValue() );
|
||||
|
||||
// Must come after bold & italic
|
||||
// Must come after SetBold() & SetItalic()
|
||||
if( m_fontCtrl->GetStringSelection() != INDETERMINATE_ACTION )
|
||||
{
|
||||
eda_text->SetFont( m_fontCtrl->GetFontSelection( eda_text->IsBold(),
|
||||
|
||||
@@ -553,20 +553,8 @@ bool DIALOG_LABEL_PROPERTIES::TransferDataFromWindow()
|
||||
else if( m_currentLabel->GetTextWidth() != m_textSize.GetValue() )
|
||||
m_currentLabel->SetTextSize( VECTOR2I( m_textSize.GetValue(), m_textSize.GetValue() ) );
|
||||
|
||||
if( m_bold->IsChecked() != m_currentLabel->IsBold() )
|
||||
{
|
||||
if( m_bold->IsChecked() )
|
||||
{
|
||||
m_currentLabel->SetBold( true );
|
||||
m_currentLabel->SetTextThickness( GetPenSizeForBold( m_currentLabel->GetTextWidth() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_currentLabel->SetBold( false );
|
||||
m_currentLabel->SetTextThickness( 0 ); // Use default pen width
|
||||
}
|
||||
}
|
||||
|
||||
// Must come after SetTextSize()
|
||||
m_currentLabel->SetBold( m_bold->IsChecked() );
|
||||
m_currentLabel->SetItalic( m_italic->IsChecked() );
|
||||
|
||||
m_currentLabel->SetTextColor( m_textColorSwatch->GetSwatchColor() );
|
||||
|
||||
@@ -262,8 +262,9 @@ bool DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow()
|
||||
else
|
||||
m_graphicText->SetBodyStyle( 0 );
|
||||
|
||||
m_graphicText->SetItalic( m_italic->IsChecked() );
|
||||
// Must come after SetTextSize()
|
||||
m_graphicText->SetBold( m_bold->IsChecked() );
|
||||
m_graphicText->SetItalic( m_italic->IsChecked() );
|
||||
m_graphicText->SetTextColor( m_textColorSwatch->GetSwatchColor() );
|
||||
|
||||
if( m_hAlignLeft->IsChecked() )
|
||||
|
||||
@@ -279,21 +279,10 @@ bool DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataFromWindow()
|
||||
m_italic->IsChecked() ) );
|
||||
}
|
||||
|
||||
if( m_bold->IsChecked() != m_currentText->IsBold() )
|
||||
{
|
||||
if( m_bold->IsChecked() )
|
||||
{
|
||||
m_currentText->SetBold( true );
|
||||
m_currentText->SetTextThickness( GetPenSizeForBold( m_currentText->GetTextWidth() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_currentText->SetBold( false );
|
||||
m_currentText->SetTextThickness( 0 ); // Use default pen width
|
||||
}
|
||||
}
|
||||
|
||||
// Must come after SetTextSize()
|
||||
m_currentText->SetBold( m_italic->IsChecked() );
|
||||
m_currentText->SetItalic( m_italic->IsChecked() );
|
||||
|
||||
m_currentText->SetTextColor( m_textColorSwatch->GetSwatchColor() );
|
||||
|
||||
if( m_hAlignRight->IsChecked() )
|
||||
|
||||
@@ -147,26 +147,14 @@ bool DIALOG_SHEET_PIN_PROPERTIES::TransferDataFromWindow()
|
||||
m_italic->IsChecked() ) );
|
||||
}
|
||||
|
||||
if( m_bold->IsChecked() != m_sheetPin->IsBold() )
|
||||
{
|
||||
if( m_bold->IsChecked() )
|
||||
{
|
||||
m_sheetPin->SetBold( true );
|
||||
m_sheetPin->SetTextThickness( GetPenSizeForBold( m_sheetPin->GetTextWidth() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_sheetPin->SetBold( false );
|
||||
m_sheetPin->SetTextThickness( 0 ); // Use default pen width
|
||||
}
|
||||
}
|
||||
|
||||
m_sheetPin->SetItalic( m_italic->IsChecked() );
|
||||
|
||||
// Currently, eeschema uses only the text width as text size,
|
||||
// and expects text width = text height
|
||||
m_sheetPin->SetTextSize( VECTOR2I( m_textSize.GetIntValue(), m_textSize.GetIntValue() ) );
|
||||
|
||||
// Must come after SetTextSize()
|
||||
m_sheetPin->SetBold( m_bold->IsChecked() );
|
||||
m_sheetPin->SetItalic( m_italic->IsChecked() );
|
||||
|
||||
m_sheetPin->SetTextColor( m_textColorSwatch->GetSwatchColor() );
|
||||
|
||||
if( m_input->GetValue() ) m_sheetPin->SetShape( LABEL_FLAG_SHAPE::L_INPUT );
|
||||
|
||||
@@ -501,7 +501,7 @@ bool DIALOG_SHEET_PROPERTIES::onSheetFilenameChanged( const wxString& aNewFilena
|
||||
|
||||
if( m_sheet->GetScreen() == nullptr ) // New just created sheet.
|
||||
{
|
||||
if( !m_frame->AllowCaseSensitiveFileNameClashes( newAbsoluteFilename ) )
|
||||
if( !m_frame->AllowCaseSensitiveFileNameClashes( m_sheet->GetFileName(), newAbsoluteFilename ) )
|
||||
return false;
|
||||
|
||||
if( useScreen || loadFromFile ) // Load from existing file.
|
||||
@@ -526,7 +526,7 @@ bool DIALOG_SHEET_PROPERTIES::onSheetFilenameChanged( const wxString& aNewFilena
|
||||
{
|
||||
isExistingSheet = true;
|
||||
|
||||
if( !m_frame->AllowCaseSensitiveFileNameClashes( newAbsoluteFilename ) )
|
||||
if( !m_frame->AllowCaseSensitiveFileNameClashes( m_sheet->GetFileName(), newAbsoluteFilename ) )
|
||||
return false;
|
||||
|
||||
// We are always using here a case insensitive comparison to avoid issues
|
||||
@@ -640,7 +640,7 @@ bool DIALOG_SHEET_PROPERTIES::onSheetFilenameChanged( const wxString& aNewFilena
|
||||
|
||||
SCH_SHEET_LIST sheetHierarchy( m_sheet ); // The hierarchy of the loaded file.
|
||||
|
||||
sheetHierarchy.AddNewSymbolInstances( currentSheet );
|
||||
sheetHierarchy.AddNewSymbolInstances( currentSheet, m_frame->Prj().GetProjectName() );
|
||||
sheetHierarchy.AddNewSheetInstances( currentSheet,
|
||||
fullHierarchy.GetLastVirtualPageNumber() );
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ DIALOG_SIM_FORMAT_VALUE::DIALOG_SIM_FORMAT_VALUE( wxWindow* aParent, SPICE_VALUE
|
||||
m_units = aFormat->Range.Right( 2 );
|
||||
SetTitle( wxString::Format( GetTitle(), _( "Frequency" ) ) );
|
||||
}
|
||||
else if( aFormat->Range.EndsWith( wxS( "dBV" ) ) )
|
||||
else if( aFormat->Range.EndsWith( wxS( "dB" ) ) )
|
||||
{
|
||||
m_units = aFormat->Range.Right( 3 );
|
||||
SetTitle( wxString::Format( GetTitle(), _( "Gain" ) ) );
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include <sch_edit_frame.h>
|
||||
#include <sim/sim_model_l_mutual.h>
|
||||
#include <sim/spice_circuit_model.h>
|
||||
#include <wx/log.h>
|
||||
|
||||
using CATEGORY = SIM_MODEL::PARAM::CATEGORY;
|
||||
|
||||
@@ -77,8 +78,7 @@ DIALOG_SIM_MODEL<T_symbol, T_field>::DIALOG_SIM_MODEL( wxWindow* aParent, EDA_BA
|
||||
m_scintillaTricksSubckt( nullptr ),
|
||||
m_firstCategory( nullptr ),
|
||||
m_prevParamGridSelection( nullptr ),
|
||||
m_lastParamGridWidth( 0 ),
|
||||
m_inKillFocus( false )
|
||||
m_lastParamGridWidth( 0 )
|
||||
{
|
||||
m_browseButton->SetBitmap( KiBitmapBundle( BITMAPS::small_folder ) );
|
||||
|
||||
@@ -219,12 +219,14 @@ bool DIALOG_SIM_MODEL<T_symbol, T_field>::TransferDataToWindow()
|
||||
// The model is sourced from a library, optionally with instance overrides.
|
||||
m_rbLibraryModel->SetValue( true );
|
||||
|
||||
if( !loadLibrary( libraryFilename ) )
|
||||
if( !loadLibrary( libraryFilename, reporter ) )
|
||||
{
|
||||
if( reporter.HasMessage() )
|
||||
m_infoBar->ShowMessage( msg );
|
||||
|
||||
m_libraryPathText->ChangeValue( libraryFilename );
|
||||
m_curModelType = SIM_MODEL::ReadTypeFromFields( m_fields, reporter );
|
||||
|
||||
// load library will mangle the set reporter
|
||||
m_libraryModelsMgr.CreateModel( nullptr, m_sortedPartPins, m_fields, reporter );
|
||||
|
||||
m_modelNameChoice->Append( _( "<unknown>" ) );
|
||||
@@ -237,14 +239,15 @@ bool DIALOG_SIM_MODEL<T_symbol, T_field>::TransferDataToWindow()
|
||||
|
||||
if( modelIdx == wxNOT_FOUND )
|
||||
{
|
||||
DisplayErrorMessage( this, wxString::Format( _( "No model named '%s' in library." ),
|
||||
modelName ) );
|
||||
m_infoBar->ShowMessage( wxString::Format( _( "No model named '%s' in library." ),
|
||||
modelName ) );
|
||||
|
||||
// Default to first item in library
|
||||
m_modelNameChoice->SetSelection( 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_infoBar->Hide();
|
||||
m_modelNameChoice->SetSelection( modelIdx );
|
||||
}
|
||||
|
||||
@@ -807,37 +810,28 @@ void DIALOG_SIM_MODEL<T_symbol, T_field>::removeOrphanedPinAssignments( SIM_MODE
|
||||
|
||||
|
||||
template <typename T_symbol, typename T_field>
|
||||
bool DIALOG_SIM_MODEL<T_symbol, T_field>::loadLibrary( const wxString& aLibraryPath,
|
||||
bool aForceReload )
|
||||
bool DIALOG_SIM_MODEL<T_symbol, T_field>::loadLibrary( const wxString& aLibraryPath, REPORTER& aReporter,
|
||||
bool aForceReload )
|
||||
{
|
||||
if( m_prevLibrary == aLibraryPath && !aForceReload )
|
||||
return true;
|
||||
|
||||
wxString msg;
|
||||
WX_STRING_REPORTER reporter( &msg );
|
||||
|
||||
m_libraryModelsMgr.SetForceFullParse();
|
||||
m_libraryModelsMgr.SetLibrary( aLibraryPath, reporter );
|
||||
m_libraryModelsMgr.SetLibrary( aLibraryPath, aReporter );
|
||||
|
||||
if( reporter.HasMessage() )
|
||||
{
|
||||
DisplayErrorMessage( this, msg );
|
||||
if( aReporter.HasMessage() )
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string modelName = SIM_MODEL::GetFieldValue( &m_fields, SIM_LIBRARY::NAME_FIELD );
|
||||
|
||||
for( const auto& [baseModelName, baseModel] : library()->GetModels() )
|
||||
{
|
||||
if( baseModelName == modelName )
|
||||
m_libraryModelsMgr.CreateModel( &baseModel, m_sortedPartPins, m_fields, reporter );
|
||||
m_libraryModelsMgr.CreateModel( &baseModel, m_sortedPartPins, m_fields, aReporter );
|
||||
else
|
||||
m_libraryModelsMgr.CreateModel( &baseModel, m_sortedPartPins, reporter );
|
||||
m_libraryModelsMgr.CreateModel( &baseModel, m_sortedPartPins, aReporter );
|
||||
}
|
||||
|
||||
if( reporter.HasMessage() )
|
||||
DisplayErrorMessage( this, msg );
|
||||
|
||||
m_rbLibraryModel->SetValue( true );
|
||||
m_libraryPathText->ChangeValue( aLibraryPath );
|
||||
|
||||
@@ -1088,16 +1082,16 @@ SIM_MODEL& DIALOG_SIM_MODEL<T_symbol, T_field>::curModel() const
|
||||
{
|
||||
int sel = m_modelNameChoice->GetSelection();
|
||||
|
||||
if( sel >= 0 && sel < (int) m_libraryModelsMgr.GetModels().size() )
|
||||
if( sel >= 0 && sel < static_cast<int>( m_libraryModelsMgr.GetModels().size() ) )
|
||||
return m_libraryModelsMgr.GetModels().at( sel ).get();
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (int) m_curModelType < (int) m_builtinModelsMgr.GetModels().size() )
|
||||
return m_builtinModelsMgr.GetModels().at( (int) m_curModelType );
|
||||
if( static_cast<int>( m_curModelType ) < static_cast<int>( m_builtinModelsMgr.GetModels().size() ) )
|
||||
return m_builtinModelsMgr.GetModels().at( static_cast<int>( m_curModelType ) );
|
||||
}
|
||||
|
||||
return m_builtinModelsMgr.GetModels().at( (int) SIM_MODEL::TYPE::NONE );
|
||||
return m_builtinModelsMgr.GetModels().at( static_cast<int>( SIM_MODEL::TYPE::NONE ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -1174,49 +1168,47 @@ void DIALOG_SIM_MODEL<T_symbol, T_field>::onRadioButton( wxCommandEvent& aEvent
|
||||
}
|
||||
|
||||
|
||||
|
||||
template <typename T_symbol, typename T_field>
|
||||
void DIALOG_SIM_MODEL<T_symbol, T_field>::onLibrarayPathText( wxCommandEvent& aEvent )
|
||||
void DIALOG_SIM_MODEL<T_symbol, T_field>::onLibraryPathText( wxCommandEvent& aEvent )
|
||||
{
|
||||
m_rbLibraryModel->SetValue( true );
|
||||
updateWidgets();
|
||||
}
|
||||
|
||||
|
||||
template <typename T_symbol, typename T_field>
|
||||
void DIALOG_SIM_MODEL<T_symbol, T_field>::onLibraryPathTextEnter( wxCommandEvent& aEvent )
|
||||
{
|
||||
if( m_rbLibraryModel->GetValue() )
|
||||
{
|
||||
wxString path = m_libraryPathText->GetValue();
|
||||
m_rbLibraryModel->SetValue( true );
|
||||
|
||||
if( !path.IsEmpty() )
|
||||
{
|
||||
try
|
||||
{
|
||||
loadLibrary( path );
|
||||
updateWidgets();
|
||||
}
|
||||
catch( const IO_ERROR& )
|
||||
{
|
||||
// TODO: Add an infobar to report the error?
|
||||
}
|
||||
}
|
||||
}
|
||||
wxString msg;
|
||||
WX_STRING_REPORTER reporter( &msg );
|
||||
wxString path = m_libraryPathText->GetValue();
|
||||
|
||||
if( loadLibrary( path, reporter, true ) )
|
||||
m_infoBar->Hide();
|
||||
else if( reporter.HasMessage() )
|
||||
m_infoBar->ShowMessage( msg );
|
||||
|
||||
updateWidgets();
|
||||
}
|
||||
|
||||
|
||||
template <typename T_symbol, typename T_field>
|
||||
void DIALOG_SIM_MODEL<T_symbol, T_field>::onLibraryPathTextKillFocus( wxFocusEvent& aEvent )
|
||||
{
|
||||
if( !m_inKillFocus )
|
||||
{
|
||||
m_inKillFocus = true;
|
||||
CallAfter(
|
||||
[this]()
|
||||
{
|
||||
// Disable logging -- otherwise we'll end up in an endless loop of show-log,
|
||||
// kill-focus, show-log, kill-focus, etc.
|
||||
wxLogNull doNotLog;
|
||||
|
||||
wxCommandEvent dummy;
|
||||
onLibraryPathTextEnter( dummy );
|
||||
wxCommandEvent dummy;
|
||||
onLibraryPathTextEnter( dummy );
|
||||
} );
|
||||
|
||||
m_inKillFocus = false;
|
||||
}
|
||||
aEvent.Skip(); // mandatory in wxFocusEvent events
|
||||
}
|
||||
|
||||
|
||||
@@ -1241,7 +1233,14 @@ void DIALOG_SIM_MODEL<T_symbol, T_field>::onBrowseButtonClick( wxCommandEvent& a
|
||||
if( fn.MakeRelativeTo( Prj().GetProjectPath() ) && !fn.GetFullPath().StartsWith( wxS( ".." ) ) )
|
||||
path = fn.GetFullPath();
|
||||
|
||||
loadLibrary( path, true );
|
||||
wxString msg;
|
||||
WX_STRING_REPORTER reporter( &msg );
|
||||
|
||||
if( loadLibrary( path, reporter, true ) )
|
||||
m_infoBar->Hide();
|
||||
else
|
||||
m_infoBar->ShowMessage( msg );
|
||||
|
||||
updateWidgets();
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,8 @@ private:
|
||||
|
||||
void removeOrphanedPinAssignments( SIM_MODEL* aModel );
|
||||
|
||||
bool loadLibrary( const wxString& aLibraryPath, bool aForceReload = false );
|
||||
bool loadLibrary( const wxString& aLibraryPath, REPORTER& aReporter,
|
||||
bool aForceReload = false );
|
||||
|
||||
void addParamPropertyIfRelevant( SIM_MODEL* aModel, int aParamIndex );
|
||||
wxPGProperty* newParamProperty( SIM_MODEL* aModel, int aParamIndex ) const;
|
||||
@@ -94,7 +95,7 @@ private:
|
||||
int getModelPinIndex( const wxString& aModelPinString ) const;
|
||||
|
||||
void onRadioButton( wxCommandEvent& aEvent ) override;
|
||||
void onLibrarayPathText( wxCommandEvent& aEvent ) override;
|
||||
void onLibraryPathText( wxCommandEvent& aEvent ) override;
|
||||
void onLibraryPathTextEnter( wxCommandEvent& aEvent ) override;
|
||||
void onLibraryPathTextKillFocus( wxFocusEvent& aEvent ) override;
|
||||
void onBrowseButtonClick( wxCommandEvent& aEvent ) override;
|
||||
@@ -140,8 +141,7 @@ private:
|
||||
wxPGProperty* m_firstCategory; // Used to add principal parameters to root.
|
||||
wxPGProperty* m_prevParamGridSelection;
|
||||
|
||||
int m_lastParamGridWidth;
|
||||
bool m_inKillFocus;
|
||||
int m_lastParamGridWidth;
|
||||
};
|
||||
|
||||
#endif /* DIALOG_SIM_MODEL_H */
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "widgets/std_bitmap_button.h"
|
||||
#include "widgets/wx_grid.h"
|
||||
#include "widgets/wx_infobar.h"
|
||||
|
||||
#include "dialog_sim_model_base.h"
|
||||
|
||||
@@ -19,6 +20,13 @@ DIALOG_SIM_MODEL_BASE::DIALOG_SIM_MODEL_BASE( wxWindow* parent, wxWindowID id, c
|
||||
wxBoxSizer* bSizer8;
|
||||
bSizer8 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_infoBar = new WX_INFOBAR( this );
|
||||
m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE );
|
||||
m_infoBar->SetEffectDuration( 500 );
|
||||
m_infoBar->Hide();
|
||||
|
||||
bSizer8->Add( m_infoBar, 0, wxEXPAND, 5 );
|
||||
|
||||
m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_modelPanel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizerPanel;
|
||||
@@ -330,7 +338,7 @@ DIALOG_SIM_MODEL_BASE::DIALOG_SIM_MODEL_BASE( wxWindow* parent, wxWindowID id, c
|
||||
m_rbLibraryModel->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onRadioButton ), NULL, this );
|
||||
m_pathLabel->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathLabelUpdate ), NULL, this );
|
||||
m_libraryPathText->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathTextKillFocus ), NULL, this );
|
||||
m_libraryPathText->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onLibrarayPathText ), NULL, this );
|
||||
m_libraryPathText->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathText ), NULL, this );
|
||||
m_libraryPathText->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathTextEnter ), NULL, this );
|
||||
m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onBrowseButtonClick ), NULL, this );
|
||||
m_browseButton->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onBrowseButtonUpdate ), NULL, this );
|
||||
@@ -367,7 +375,7 @@ DIALOG_SIM_MODEL_BASE::~DIALOG_SIM_MODEL_BASE()
|
||||
m_rbLibraryModel->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onRadioButton ), NULL, this );
|
||||
m_pathLabel->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathLabelUpdate ), NULL, this );
|
||||
m_libraryPathText->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathTextKillFocus ), NULL, this );
|
||||
m_libraryPathText->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onLibrarayPathText ), NULL, this );
|
||||
m_libraryPathText->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathText ), NULL, this );
|
||||
m_libraryPathText->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathTextEnter ), NULL, this );
|
||||
m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onBrowseButtonClick ), NULL, this );
|
||||
m_browseButton->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onBrowseButtonUpdate ), NULL, this );
|
||||
|
||||
@@ -63,10 +63,10 @@
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxNotebook" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxInfoBar" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
@@ -77,6 +77,67 @@
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="duration">500</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">1</property>
|
||||
<property name="hide_effect">wxSHOW_EFFECT_NONE</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_infoBar</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="show_effect">wxSHOW_EFFECT_NONE</property>
|
||||
<property name="size"></property>
|
||||
<property name="subclass">WX_INFOBAR; widgets/wx_infobar.h; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxNotebook" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmapsize"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
@@ -129,10 +190,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -199,10 +260,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -283,10 +344,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -358,10 +419,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -385,7 +446,7 @@
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength"></property>
|
||||
<property name="maxlength">0</property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
@@ -413,7 +474,7 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnKillFocus">onLibraryPathTextKillFocus</event>
|
||||
<event name="OnText">onLibrarayPathText</event>
|
||||
<event name="OnText">onLibraryPathText</event>
|
||||
<event name="OnTextEnter">onLibraryPathTextEnter</event>
|
||||
</object>
|
||||
</object>
|
||||
@@ -426,10 +487,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
@@ -507,10 +568,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -573,10 +634,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -655,10 +716,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -721,10 +782,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -794,10 +855,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -864,10 +925,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -930,10 +991,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1003,10 +1064,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1068,10 +1129,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1146,10 +1207,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1228,10 +1289,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1291,10 +1352,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1358,10 +1419,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1421,10 +1482,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1499,10 +1560,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmapsize"></property>
|
||||
@@ -1558,10 +1619,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1619,10 +1680,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1690,10 +1751,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1751,10 +1812,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="backspace_unindents">1</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
@@ -1834,10 +1895,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1914,10 +1975,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1975,10 +2036,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="autosize_cols">0</property>
|
||||
<property name="autosize_rows">0</property>
|
||||
<property name="best_size"></property>
|
||||
@@ -2066,10 +2127,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -2128,10 +2189,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="backspace_unindents">1</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
|
||||
@@ -12,14 +12,16 @@
|
||||
#include <wx/intl.h>
|
||||
class STD_BITMAP_BUTTON;
|
||||
class WX_GRID;
|
||||
class WX_INFOBAR;
|
||||
|
||||
#include "dialog_shim.h"
|
||||
#include <wx/string.h>
|
||||
#include <wx/radiobut.h>
|
||||
#include <wx/infobar.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/radiobut.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/bmpbuttn.h>
|
||||
@@ -52,6 +54,7 @@ class DIALOG_SIM_MODEL_BASE : public DIALOG_SHIM
|
||||
private:
|
||||
|
||||
protected:
|
||||
WX_INFOBAR* m_infoBar;
|
||||
wxNotebook* m_notebook;
|
||||
wxPanel* m_modelPanel;
|
||||
wxRadioButton* m_rbLibraryModel;
|
||||
@@ -91,7 +94,7 @@ class DIALOG_SIM_MODEL_BASE : public DIALOG_SHIM
|
||||
virtual void onRadioButton( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onLibraryPathLabelUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void onLibraryPathTextKillFocus( wxFocusEvent& event ) { event.Skip(); }
|
||||
virtual void onLibrarayPathText( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onLibraryPathText( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onLibraryPathTextEnter( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onBrowseButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onBrowseButtonUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
|
||||
@@ -109,14 +109,15 @@ protected:
|
||||
if( event.GetId() == MYID_SELECT_FOOTPRINT )
|
||||
{
|
||||
// pick a footprint using the footprint picker.
|
||||
wxString fpid = m_grid->GetCellValue( m_grid->GetGridCursorRow(),
|
||||
FOOTPRINT_FIELD );
|
||||
KIWAY_PLAYER* frame = m_dlg->Kiway().Player( FRAME_FOOTPRINT_CHOOSER, true, m_dlg );
|
||||
wxString fpid = m_grid->GetCellValue( m_grid->GetGridCursorRow(), FOOTPRINT_FIELD );
|
||||
|
||||
if( frame->ShowModal( &fpid, m_dlg ) )
|
||||
m_grid->SetCellValue( m_grid->GetGridCursorRow(), FOOTPRINT_FIELD, fpid );
|
||||
if( KIWAY_PLAYER* frame = m_dlg->Kiway().Player( FRAME_FOOTPRINT_CHOOSER, true, m_dlg ) )
|
||||
{
|
||||
if( frame->ShowModal( &fpid, m_dlg ) )
|
||||
m_grid->SetCellValue( m_grid->GetGridCursorRow(), FOOTPRINT_FIELD, fpid );
|
||||
|
||||
frame->Destroy();
|
||||
frame->Destroy();
|
||||
}
|
||||
}
|
||||
else if (event.GetId() == MYID_SHOW_DATASHEET )
|
||||
{
|
||||
@@ -305,7 +306,7 @@ DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE( SCH_EDIT_FRAME* parent )
|
||||
case SCOPE::SCOPE_SHEET_RECURSIVE: m_radioRecursive->SetValue( true ); break;
|
||||
}
|
||||
|
||||
m_outputFileName->SetValue( cfg->m_FieldEditorPanel.export_filename );
|
||||
m_outputFileName->SetValue( m_schSettings.m_BomExportFileName );
|
||||
|
||||
Center();
|
||||
|
||||
@@ -1338,12 +1339,13 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnClose( wxCloseEvent& aEvent )
|
||||
|
||||
// Save all our settings since we're really closing
|
||||
savePresetsToSchematic();
|
||||
m_schSettings.m_BomExportFileName = m_outputFileName->GetValue();
|
||||
|
||||
EESCHEMA_SETTINGS* cfg = m_parent->eeconfig();
|
||||
|
||||
cfg->m_FieldEditorPanel.width = GetSize().x;
|
||||
cfg->m_FieldEditorPanel.height = GetSize().y;
|
||||
cfg->m_FieldEditorPanel.page = m_nbPages->GetSelection();
|
||||
cfg->m_FieldEditorPanel.export_filename = m_outputFileName->GetValue();
|
||||
|
||||
if( m_radioHighlight->GetValue() )
|
||||
cfg->m_FieldEditorPanel.selection_mode = 0;
|
||||
|
||||
@@ -792,7 +792,7 @@ bool DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow()
|
||||
int unit = m_symbol->GetUnit();
|
||||
LIB_ID libId = m_symbol->GetLibId();
|
||||
|
||||
for( SCH_SHEET_PATH& sheet : GetParent()->Schematic().GetSheets() )
|
||||
for( SCH_SHEET_PATH& sheet : GetParent()->Schematic().GetUnorderedSheets() )
|
||||
{
|
||||
SCH_SCREEN* screen = sheet.LastScreen();
|
||||
std::vector<SCH_SYMBOL*> otherUnits;
|
||||
|
||||
@@ -150,7 +150,7 @@ DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES( SCH_EDIT_FRAME* aParent, SCH_ITE
|
||||
|
||||
m_separator5->SetIsSeparator();
|
||||
|
||||
SCH_SHEET_LIST sheetList = m_frame->Schematic().GetSheets();
|
||||
SCH_SHEET_LIST sheetList = m_frame->Schematic().GetUnorderedSheets();
|
||||
sheetList.SortByPageNumbers( false );
|
||||
|
||||
for( const SCH_SHEET_PATH& sheet : sheetList )
|
||||
@@ -471,21 +471,10 @@ bool DIALOG_TEXT_PROPERTIES::TransferDataFromWindow()
|
||||
m_italic->IsChecked() ) );
|
||||
}
|
||||
|
||||
if( m_bold->IsChecked() != m_currentText->IsBold() )
|
||||
{
|
||||
if( m_bold->IsChecked() )
|
||||
{
|
||||
m_currentText->SetBold( true );
|
||||
m_currentText->SetTextThickness( GetPenSizeForBold( m_currentText->GetTextWidth() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_currentText->SetBold( false );
|
||||
m_currentText->SetTextThickness( 0 ); // Use default pen width
|
||||
}
|
||||
}
|
||||
|
||||
// Must come after SetTextSize()
|
||||
m_currentText->SetBold( m_bold->IsChecked() );
|
||||
m_currentText->SetItalic( m_italic->IsChecked() );
|
||||
|
||||
m_currentText->SetTextColor( m_textColorSwatch->GetSwatchColor() );
|
||||
|
||||
if( m_hAlignRight->IsChecked() )
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <../sim/simulator_frame.h>
|
||||
#include <dialog_user_defined_signals.h>
|
||||
#include <string_utils.h>
|
||||
#include <validators.h>
|
||||
|
||||
|
||||
DIALOG_USER_DEFINED_SIGNALS::DIALOG_USER_DEFINED_SIGNALS( SIMULATOR_FRAME* aParent,
|
||||
@@ -86,12 +87,19 @@ void DIALOG_USER_DEFINED_SIGNALS::addGridRow( const wxString& aText, int aId )
|
||||
m_grid->SetCellValue( row, 1, wxString::Format( wxS( "%d" ), aId ) );
|
||||
|
||||
wxGridCellAttr* attr = new wxGridCellAttr;
|
||||
#if defined( __WXMSW__ )
|
||||
// For some obscure reason, a GRID_CELL_STC_EDITOR does not work on MSW:
|
||||
// It has a strange behavior when entering data, making it unusable.
|
||||
// (see https://gitlab.com/kicad/code/kicad/-/issues/15837)
|
||||
// So use a GRID_CELL_TEXT_EDITOR.
|
||||
attr->SetEditor( new GRID_CELL_TEXT_EDITOR() );
|
||||
#else
|
||||
attr->SetEditor( new GRID_CELL_STC_EDITOR( true,
|
||||
[this]( wxStyledTextEvent& aEvent, SCINTILLA_TRICKS* aScintillaTricks )
|
||||
{
|
||||
onScintillaCharAdded( aEvent, aScintillaTricks );
|
||||
} ) );
|
||||
|
||||
#endif
|
||||
m_grid->SetAttr( row, 0, attr );
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user