Compare commits
188 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 |
@@ -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:
|
||||
|
||||
@@ -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.4" )
|
||||
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" ) );
|
||||
|
||||
+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 )
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
+19
-2
@@ -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();
|
||||
@@ -918,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 ),
|
||||
@@ -949,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() );
|
||||
}
|
||||
|
||||
@@ -204,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();
|
||||
@@ -333,7 +344,10 @@ FONTCONFIG::FF_RESULT FONTCONFIG::FindFont( const wxString &aFontName, wxString
|
||||
{
|
||||
fontName.Replace( ':', ' ' );
|
||||
|
||||
if( s_reporter )
|
||||
// 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 ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -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 );
|
||||
|
||||
|
||||
@@ -199,16 +199,7 @@ LIB_TABLE_ROW* LIB_TABLE::findRow( const wxString& aNickName, bool aCheckIfEnabl
|
||||
|
||||
do
|
||||
{
|
||||
try
|
||||
{
|
||||
std::shared_lock<std::shared_mutex> lock( cur->m_mutex );
|
||||
}
|
||||
catch( std::system_error& e )
|
||||
{
|
||||
wxASSERT_MSG( false, wxString::Format( wxS( "Failed to lock lib table mutex: %s" ),
|
||||
e.what() ) );
|
||||
continue;
|
||||
}
|
||||
std::shared_lock<std::shared_mutex> lock( cur->m_mutex );
|
||||
|
||||
if( cur->m_rowsMap.count( aNickName ) )
|
||||
row = &*cur->m_rowsMap.at( aNickName );
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -233,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 );
|
||||
}
|
||||
@@ -244,7 +234,7 @@ 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() )
|
||||
@@ -316,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
|
||||
@@ -334,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 )
|
||||
{
|
||||
@@ -367,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
|
||||
@@ -388,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 ),
|
||||
@@ -408,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 ),
|
||||
@@ -524,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();
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -2338,6 +2338,12 @@ void CONNECTION_GRAPH::buildConnectionGraph( std::function<void( SCH_ITEM* )>* a
|
||||
|
||||
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 )
|
||||
{
|
||||
@@ -2381,40 +2387,83 @@ void CONNECTION_GRAPH::buildConnectionGraph( std::function<void( SCH_ITEM* )>* a
|
||||
|
||||
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 )
|
||||
{
|
||||
if( netclass.IsEmpty() )
|
||||
netSettings->m_NetClassLabelAssignments.erase( member->Name() );
|
||||
else
|
||||
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() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( netclass.IsEmpty() )
|
||||
netSettings->m_NetClassLabelAssignments.erase( netname );
|
||||
else
|
||||
netSettings->m_NetClassLabelAssignments[netname] = netclass;
|
||||
|
||||
if( oldAssignments.count( netname ) )
|
||||
// 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( oldAssignments[netname] != netclass )
|
||||
if( !netclass.IsEmpty() )
|
||||
{
|
||||
netSettings->m_NetClassLabelAssignments[netname] = netclass;
|
||||
}
|
||||
|
||||
if( oldAssignments.count( netname ) )
|
||||
{
|
||||
if( oldAssignments[netname] != netclass )
|
||||
{
|
||||
affectedNetclassNetAssignments.insert( netname );
|
||||
dirtySubgraphs( subgraphs );
|
||||
}
|
||||
}
|
||||
else if( !netclass.IsEmpty() )
|
||||
{
|
||||
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 )
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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(); }
|
||||
|
||||
@@ -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() )
|
||||
|
||||
@@ -449,6 +449,8 @@ int ERC_TESTER::TestMissingUnits()
|
||||
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( aErrorCode );
|
||||
ercItem->SetErrorMessage( msg );
|
||||
ercItem->SetItems( unit );
|
||||
ercItem->SetSheetSpecificPath( base_ref.GetSheetPath() );
|
||||
ercItem->SetItemsSheetPaths( base_ref.GetSheetPath() );
|
||||
|
||||
SCH_MARKER* marker = new SCH_MARKER( ercItem, unit->GetPosition() );
|
||||
base_ref.GetSheetPath().LastScreen()->Append( marker );
|
||||
|
||||
@@ -84,9 +84,12 @@ void FIELDS_EDITOR_GRID_DATA_MODEL::RenameColumn( int aCol, const wxString& newN
|
||||
{
|
||||
SCH_SYMBOL* symbol = m_symbolsList[i].GetSymbol();
|
||||
|
||||
auto node = m_dataStore[symbol->m_Uuid].extract( m_cols[aCol].m_fieldName );
|
||||
node.key() = newName;
|
||||
m_dataStore[symbol->m_Uuid].insert( std::move( node ) );
|
||||
// Careful; field may have already been renamed from another sheet instance
|
||||
if( auto node = m_dataStore[symbol->m_Uuid].extract( m_cols[aCol].m_fieldName ) )
|
||||
{
|
||||
node.key() = newName;
|
||||
m_dataStore[symbol->m_Uuid].insert( std::move( node ) );
|
||||
}
|
||||
}
|
||||
|
||||
m_cols[aCol].m_fieldName = newName;
|
||||
|
||||
@@ -131,7 +131,6 @@ FIELDS_GRID_TABLE<T>::FIELDS_GRID_TABLE( DIALOG_SHIM* aDialog, SCH_BASE_FRAME* a
|
||||
WX_GRID* aGrid, LIB_SYMBOL* aSymbol ) :
|
||||
m_frame( aFrame ),
|
||||
m_dialog( aDialog ),
|
||||
m_grid( aGrid ),
|
||||
m_parentType( SCH_SYMBOL_T ),
|
||||
m_mandatoryFieldCount( MANDATORY_FIELDS ),
|
||||
m_part( aSymbol ),
|
||||
@@ -152,7 +151,6 @@ FIELDS_GRID_TABLE<T>::FIELDS_GRID_TABLE( DIALOG_SHIM* aDialog, SCH_EDIT_FRAME* a
|
||||
WX_GRID* aGrid, SCH_SYMBOL* aSymbol ) :
|
||||
m_frame( aFrame ),
|
||||
m_dialog( aDialog ),
|
||||
m_grid( aGrid ),
|
||||
m_parentType( SCH_SYMBOL_T ),
|
||||
m_mandatoryFieldCount( MANDATORY_FIELDS ),
|
||||
m_part( aSymbol->GetLibSymbolRef().get() ),
|
||||
@@ -173,7 +171,6 @@ FIELDS_GRID_TABLE<T>::FIELDS_GRID_TABLE( DIALOG_SHIM* aDialog, SCH_EDIT_FRAME* a
|
||||
WX_GRID* aGrid, SCH_SHEET* aSheet ) :
|
||||
m_frame( aFrame ),
|
||||
m_dialog( aDialog ),
|
||||
m_grid( aGrid ),
|
||||
m_parentType( SCH_SHEET_T ),
|
||||
m_mandatoryFieldCount( SHEET_MANDATORY_FIELDS ),
|
||||
m_part( nullptr ),
|
||||
@@ -193,7 +190,6 @@ FIELDS_GRID_TABLE<T>::FIELDS_GRID_TABLE( DIALOG_SHIM* aDialog, SCH_EDIT_FRAME* a
|
||||
WX_GRID* aGrid, SCH_LABEL_BASE* aLabel ) :
|
||||
m_frame( aFrame ),
|
||||
m_dialog( aDialog ),
|
||||
m_grid( aGrid ),
|
||||
m_parentType( SCH_LABEL_LOCATE_ANY_T ),
|
||||
m_mandatoryFieldCount( aLabel->GetMandatoryFieldCount() ),
|
||||
m_part( nullptr ),
|
||||
|
||||
@@ -118,7 +118,6 @@ protected:
|
||||
private:
|
||||
SCH_BASE_FRAME* m_frame;
|
||||
DIALOG_SHIM* m_dialog;
|
||||
WX_GRID* m_grid;
|
||||
KICAD_T m_parentType;
|
||||
int m_mandatoryFieldCount;
|
||||
LIB_SYMBOL* m_part;
|
||||
|
||||
@@ -181,7 +181,8 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
||||
CreateScreens();
|
||||
}
|
||||
|
||||
SCH_IO_MGR::SCH_FILE_T schFileType = SCH_IO_MGR::GuessPluginTypeFromSchPath( fullFileName, KICTL_KICAD_ONLY );
|
||||
SCH_IO_MGR::SCH_FILE_T schFileType = SCH_IO_MGR::GuessPluginTypeFromSchPath( fullFileName,
|
||||
KICTL_KICAD_ONLY );
|
||||
|
||||
if( schFileType == SCH_IO_MGR::SCH_LEGACY )
|
||||
{
|
||||
@@ -492,13 +493,14 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
||||
|
||||
// Restore all of the loaded symbol and sheet instances from the root sheet.
|
||||
if( Schematic().RootScreen()->GetFileFormatVersionAtLoad() < 20221002 )
|
||||
sheetList.UpdateSymbolInstanceData( Schematic().RootScreen()->GetSymbolInstances());
|
||||
sheetList.UpdateSymbolInstanceData( Schematic().RootScreen()->GetSymbolInstances() );
|
||||
|
||||
if( Schematic().RootScreen()->GetFileFormatVersionAtLoad() < 20221110 )
|
||||
sheetList.UpdateSheetInstanceData( Schematic().RootScreen()->GetSheetInstances());
|
||||
|
||||
if( Schematic().RootScreen()->GetFileFormatVersionAtLoad() < 20230221 )
|
||||
for( SCH_SCREEN* screen = schematic.GetFirst(); screen; screen = schematic.GetNext() )
|
||||
for( SCH_SCREEN* screen = schematic.GetFirst(); screen;
|
||||
screen = schematic.GetNext() )
|
||||
screen->FixLegacyPowerSymbolMismatches();
|
||||
|
||||
for( SCH_SCREEN* screen = schematic.GetFirst(); screen; screen = schematic.GetNext() )
|
||||
@@ -511,8 +513,9 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
||||
}
|
||||
}
|
||||
|
||||
schematic.PruneOrphanedSymbolInstances( Prj().GetProjectName(), Schematic().GetSheets() );
|
||||
schematic.PruneOrphanedSheetInstances( Prj().GetProjectName(), Schematic().GetSheets() );
|
||||
schematic.PruneOrphanedSymbolInstances( Prj().GetProjectName(), sheetList );
|
||||
schematic.PruneOrphanedSheetInstances( Prj().GetProjectName(), sheetList );
|
||||
sheetList.CheckForMissingSymbolInstances( Prj().GetProjectName() );
|
||||
|
||||
Schematic().ConnectionGraph()->Reset();
|
||||
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
#include <gal/graphics_abstraction_layer.h>
|
||||
#include <gal/painter.h>
|
||||
#include <zoom_defines.h>
|
||||
#include <drawing_sheet/ds_proxy_view_item.h>
|
||||
#include <string_utils.h>
|
||||
|
||||
|
||||
SCH_PRINTOUT::SCH_PRINTOUT( SCH_EDIT_FRAME* aParent, const wxString& aTitle, bool aUseCairo ) :
|
||||
@@ -70,6 +72,7 @@ bool SCH_PRINTOUT::OnBeginDocument( int startPage, int endPage )
|
||||
bool SCH_PRINTOUT::OnPrintPage( int page )
|
||||
{
|
||||
SCH_SHEET_LIST sheetList = m_parent->Schematic().GetSheets();
|
||||
sheetList.SortByPageNumbers( false );
|
||||
|
||||
wxCHECK_MSG( page >= 1 && page <= (int)sheetList.size(), false,
|
||||
wxT( "Cannot print invalid page number." ) );
|
||||
@@ -81,17 +84,26 @@ bool SCH_PRINTOUT::OnPrintPage( int page )
|
||||
msg.Printf( _( "Print page %d" ), page );
|
||||
m_parent->SetMsgPanel( msg, wxEmptyString );
|
||||
|
||||
SCH_SCREEN* screen = m_parent->GetScreen();
|
||||
SCH_SHEET_PATH oldsheetpath = m_parent->GetCurrentSheet();
|
||||
|
||||
// Switch to the new current sheet
|
||||
m_parent->SetCurrentSheet( sheetList[ page - 1 ] );
|
||||
m_parent->GetCurrentSheet().UpdateAllScreenReferences();
|
||||
m_parent->SetSheetNumberAndCount();
|
||||
m_parent->RecomputeIntersheetRefs();
|
||||
screen = m_parent->GetCurrentSheet().LastScreen();
|
||||
SCH_SCREEN* screen = m_parent->GetCurrentSheet().LastScreen();
|
||||
// Ensure the displayed page number is updated:
|
||||
KIGFX::SCH_VIEW* sch_view = m_parent->GetCanvas()->GetView();
|
||||
sch_view->GetDrawingSheet()->SetPageNumber( TO_UTF8( screen->GetPageNumber() ) );
|
||||
|
||||
PrintPage( screen );
|
||||
|
||||
// Restore the initial current sheet
|
||||
m_parent->SetCurrentSheet( oldsheetpath );
|
||||
m_parent->GetCurrentSheet().UpdateAllScreenReferences();
|
||||
m_parent->SetSheetNumberAndCount();
|
||||
screen = m_parent->GetCurrentSheet().LastScreen();
|
||||
sch_view->GetDrawingSheet()->SetPageNumber( TO_UTF8( screen->GetPageNumber() ) );
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -102,6 +114,7 @@ int SCH_PRINTOUT::milsToIU( int aMils )
|
||||
return KiROUND( aMils * schIUScale.IU_PER_MILS );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* This is the real print function: print the active screen
|
||||
*/
|
||||
|
||||
@@ -28,7 +28,7 @@ class SCH_SCREEN;
|
||||
namespace KIGFX
|
||||
{
|
||||
class GAL;
|
||||
class VIEW;
|
||||
class SCH_VIEW;
|
||||
class PAINTER;
|
||||
};
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
private:
|
||||
SCH_EDIT_FRAME* m_parent;
|
||||
///< Source VIEW object (note that actual printing only refers to this object)
|
||||
const KIGFX::VIEW* m_view;
|
||||
const KIGFX::SCH_VIEW* m_view;
|
||||
bool m_useCairo;
|
||||
|
||||
int milsToIU( int aMils );
|
||||
|
||||
@@ -1487,9 +1487,11 @@ void SCH_IO_ALTIUM::ParseLabel( const std::map<wxString, wxString>& aProperties,
|
||||
if( m_altiumSheet && fontId > 0 && fontId <= m_altiumSheet->fonts.size() )
|
||||
{
|
||||
const ASCH_SHEET_FONT& font = m_altiumSheet->fonts.at( fontId - 1 );
|
||||
textItem->SetItalic( font.Italic );
|
||||
textItem->SetBold( font.Bold );
|
||||
textItem->SetTextSize( { font.Size / 2, font.Size / 2 } );
|
||||
|
||||
// Must come after SetTextSize()
|
||||
textItem->SetBold( font.Bold );
|
||||
textItem->SetItalic( font.Italic );
|
||||
}
|
||||
|
||||
textItem->SetFlags(IS_NEW );
|
||||
@@ -1541,9 +1543,11 @@ void SCH_IO_ALTIUM::ParseLabel( const std::map<wxString, wxString>& aProperties,
|
||||
if( m_altiumSheet && fontId > 0 && fontId <= m_altiumSheet->fonts.size() )
|
||||
{
|
||||
const ASCH_SHEET_FONT& font = m_altiumSheet->fonts.at( fontId - 1 );
|
||||
textItem->SetItalic( font.Italic );
|
||||
textItem->SetBold( font.Bold );
|
||||
textItem->SetTextSize( { font.Size / 2, font.Size / 2 } );
|
||||
|
||||
// Must come after SetTextSize()
|
||||
textItem->SetBold( font.Bold );
|
||||
textItem->SetItalic( font.Italic );
|
||||
}
|
||||
else if( fontId > 0 && fontId <= aFontSizes.size() )
|
||||
{
|
||||
@@ -1621,11 +1625,12 @@ void SCH_IO_ALTIUM::AddTextBox( const ASCH_TEXT_FRAME *aElem )
|
||||
if( m_altiumSheet && fontId > 0 && fontId <= m_altiumSheet->fonts.size() )
|
||||
{
|
||||
const ASCH_SHEET_FONT& font = m_altiumSheet->fonts.at( fontId - 1 );
|
||||
textBox->SetItalic( font.Italic );
|
||||
textBox->SetBold( font.Bold );
|
||||
textBox->SetTextSize( { font.Size / 2, font.Size / 2 } );
|
||||
|
||||
//textBox->SetFont( //how to set font, we have a font mane here: ( font.fontname );
|
||||
// Must come after SetTextSize()
|
||||
textBox->SetBold( font.Bold );
|
||||
textBox->SetItalic( font.Italic );
|
||||
//textBox->SetFont( //how to set font, we have a font name here: ( font.fontname );
|
||||
}
|
||||
|
||||
textBox->SetFlags( IS_NEW );
|
||||
@@ -3422,10 +3427,12 @@ void SCH_IO_ALTIUM::ParseHarnessPort( const ASCH_PORT& aElem )
|
||||
if( m_altiumSheet && fontId > 0 && fontId <= m_altiumSheet->fonts.size() )
|
||||
{
|
||||
const ASCH_SHEET_FONT& font = m_altiumSheet->fonts.at( fontId - 1 );
|
||||
textBox->SetItalic( font.Italic );
|
||||
textBox->SetBold( font.Bold );
|
||||
textBox->SetTextSize( { font.Size / 2, font.Size / 2 } );
|
||||
//textBox->SetFont( //how to set font, we have a font mane here: ( font.fontname );
|
||||
|
||||
// Must come after SetTextSize()
|
||||
textBox->SetBold( font.Bold );
|
||||
textBox->SetItalic( font.Italic );
|
||||
//textBox->SetFont( //how to set font, we have a font name here: ( font.fontname );
|
||||
}
|
||||
|
||||
textBox->SetFlags( IS_NEW );
|
||||
|
||||
@@ -2992,6 +2992,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::applyTextCodeIfExists( EDA_TEXT* aKiCa
|
||||
aKiCadTextItem->SetTextThickness( getKiCadLength( textCode.LineWidth ) );
|
||||
#endif
|
||||
|
||||
// Must come after SetTextSize()
|
||||
aKiCadTextItem->SetBold( textCode.Font.Modifier1 == FONT_BOLD );
|
||||
aKiCadTextItem->SetItalic( textCode.Font.Italic );
|
||||
}
|
||||
|
||||
@@ -2773,14 +2773,9 @@ void SCH_IO_EAGLE::loadTextAttributes( EDA_TEXT* aText, const ETEXT& aAttribs )
|
||||
{
|
||||
aText->SetTextSize( aAttribs.ConvertSize() );
|
||||
|
||||
if( aAttribs.ratio )
|
||||
{
|
||||
if( aAttribs.ratio.CGet() > 12 )
|
||||
{
|
||||
aText->SetBold( true );
|
||||
aText->SetTextThickness( GetPenSizeForBold( aText->GetTextWidth() ) );
|
||||
}
|
||||
}
|
||||
// Must come after SetTextSize()
|
||||
if( aAttribs.ratio && aAttribs.ratio.CGet() > 12 )
|
||||
aText->SetBold( true );
|
||||
|
||||
int align = aAttribs.align ? *aAttribs.align : ETEXT::BOTTOM_LEFT;
|
||||
int degrees = aAttribs.rot ? aAttribs.rot->degrees : 0;
|
||||
@@ -2796,7 +2791,11 @@ void SCH_IO_EAGLE::loadFieldAttributes( LIB_FIELD* aField, const LIB_TEXT* aText
|
||||
aField->SetTextPos( aText->GetPosition() );
|
||||
aField->SetTextSize( aText->GetTextSize() );
|
||||
aField->SetTextAngle( aText->GetTextAngle() );
|
||||
|
||||
// Must come after SetTextSize()
|
||||
aField->SetBold( aText->IsBold() );
|
||||
aField->SetItalic( false );
|
||||
|
||||
aField->SetVertJustify( aText->GetVertJustify() );
|
||||
aField->SetHorizJustify( aText->GetHorizJustify() );
|
||||
}
|
||||
|
||||
@@ -144,8 +144,14 @@ static LIB_SYMBOL* loadSymbol( nlohmann::json project, const wxString& aLibraryP
|
||||
|| libFname.GetExt() == wxS( "zip" ) )
|
||||
{
|
||||
std::map<wxString, EASYEDAPRO::PRJ_SYMBOL> prjSymbols = project.at( "symbols" );
|
||||
std::map<wxString, EASYEDAPRO::PRJ_FOOTPRINT> prjFootprints = project.at( "footprints" );
|
||||
std::map<wxString, EASYEDAPRO::PRJ_DEVICE> prjDevices = project.at( "devices" );
|
||||
std::map<wxString, EASYEDAPRO::PRJ_FOOTPRINT> prjFootprints;
|
||||
std::map<wxString, EASYEDAPRO::PRJ_DEVICE> prjDevices;
|
||||
|
||||
if( project.contains( "footprints" ) )
|
||||
prjFootprints = project.at( "footprints" );
|
||||
|
||||
if( project.contains( "devices" ) )
|
||||
prjDevices = project.at( "devices" );
|
||||
|
||||
auto prjSymIt = std::find_if( prjSymbols.begin(), prjSymbols.end(),
|
||||
[&]( const auto& pair )
|
||||
|
||||
@@ -1086,7 +1086,7 @@ SCH_TEXT* SCH_IO_KICAD_LEGACY::loadText( LINE_READER& aReader )
|
||||
penWidth = parseInt( aReader, line, &line );
|
||||
}
|
||||
|
||||
text->SetBold( penWidth != 0 );
|
||||
text->SetBoldFlag( penWidth != 0 );
|
||||
text->SetTextThickness( penWidth != 0 ? GetPenSizeForBold( size ) : 0 );
|
||||
|
||||
// Read the text string for the text.
|
||||
@@ -1097,9 +1097,9 @@ SCH_TEXT* SCH_IO_KICAD_LEGACY::loadText( LINE_READER& aReader )
|
||||
|
||||
for( ; ; )
|
||||
{
|
||||
int i = val.find( wxT( "\\n" ) );
|
||||
size_t i = val.find( wxT( "\\n" ) );
|
||||
|
||||
if( i == wxNOT_FOUND )
|
||||
if( i == wxString::npos )
|
||||
break;
|
||||
|
||||
val.erase( i, 2 );
|
||||
@@ -1369,7 +1369,7 @@ SCH_SYMBOL* SCH_IO_KICAD_LEGACY::loadSymbol( LINE_READER& aReader )
|
||||
|
||||
if( textAttrs[2] == 'B' )
|
||||
{
|
||||
field.SetBold( true );
|
||||
field.SetBoldFlag( true );
|
||||
}
|
||||
else if( textAttrs[2] != 'N' )
|
||||
{
|
||||
|
||||
@@ -652,7 +652,7 @@ void SCH_IO_KICAD_LEGACY_LIB_CACHE::loadField( std::unique_ptr<LIB_SYMBOL>& aSym
|
||||
SCH_PARSE_ERROR( "invalid field text italic parameter", aReader, line );
|
||||
|
||||
if ( attr_2 == 'B' ) // Bold
|
||||
field->SetBold( true );
|
||||
field->SetBoldFlag( true );
|
||||
else if( attr_2 != 'N' ) // No bold is default, check for error.
|
||||
SCH_PARSE_ERROR( "invalid field text bold parameter", aReader, line );
|
||||
}
|
||||
@@ -1020,7 +1020,7 @@ LIB_TEXT* SCH_IO_KICAD_LEGACY_LIB_CACHE::loadText( std::unique_ptr<LIB_SYMBOL>&
|
||||
SCH_PARSE_ERROR( "invalid text stype, expected 'Normal' or 'Italic'", aReader, line );
|
||||
|
||||
if( parseInt( aReader, line, &line ) > 0 )
|
||||
text->SetBold( true );
|
||||
text->SetBoldFlag( true );
|
||||
|
||||
// Some old libaries version > 2.0 do not have these options for text justification:
|
||||
if( !is_eol( *line ) )
|
||||
|
||||
@@ -737,7 +737,7 @@ void SCH_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT( EDA_TEXT* aText, bool aConvertOve
|
||||
case T_bold:
|
||||
{
|
||||
bool bold = parseMaybeAbsentBool( true );
|
||||
aText->SetBold( bold );
|
||||
aText->SetBoldFlag( bold );
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-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
|
||||
@@ -23,6 +23,7 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <refdes_utils.h>
|
||||
#include <sch_screen.h>
|
||||
#include <sch_item.h>
|
||||
#include <sch_marker.h>
|
||||
@@ -630,6 +631,33 @@ void SCH_SHEET_PATH::RemoveSymbolInstances( const SCH_SHEET_PATH& aPrefixSheetPa
|
||||
}
|
||||
|
||||
|
||||
void SCH_SHEET_PATH::CheckForMissingSymbolInstances( const wxString& aProjectName )
|
||||
{
|
||||
wxCHECK( !aProjectName.IsEmpty() && LastScreen(), /* void */ );
|
||||
|
||||
for( SCH_ITEM* item : LastScreen()->Items().OfType( SCH_SYMBOL_T ) )
|
||||
{
|
||||
SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( item );
|
||||
|
||||
wxCHECK2( symbol, continue );
|
||||
|
||||
SCH_SYMBOL_INSTANCE symbolInstance;
|
||||
|
||||
if( !symbol->GetInstance( symbolInstance, Path() ) )
|
||||
{
|
||||
wxLogTrace( traceSchSheetPaths, "Adding missing symbol \"%s\" instance data for "
|
||||
"sheet path '%s'.",
|
||||
symbol->m_Uuid.AsString(), PathHumanReadable( false ) );
|
||||
|
||||
symbolInstance.m_Reference = UTIL::GetRefDesUnannotated( symbol->GetPrefix() );
|
||||
symbolInstance.m_ProjectName = aProjectName;
|
||||
symbolInstance.m_Path = Path();
|
||||
symbol->AddHierarchicalReference( symbolInstance );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SCH_SHEET_PATH::MakeFilePathRelativeToParentSheet()
|
||||
{
|
||||
wxCHECK( m_sheets.size() > 1, /* void */ );
|
||||
@@ -1338,6 +1366,13 @@ void SCH_SHEET_LIST::AddNewSheetInstances( const SCH_SHEET_PATH& aPrefixSheetPat
|
||||
}
|
||||
|
||||
|
||||
void SCH_SHEET_LIST::CheckForMissingSymbolInstances( const wxString& aProjectName )
|
||||
{
|
||||
for( SCH_SHEET_PATH& sheetPath : *this )
|
||||
sheetPath.CheckForMissingSymbolInstances( aProjectName );
|
||||
}
|
||||
|
||||
|
||||
int SCH_SHEET_LIST::GetLastVirtualPageNumber() const
|
||||
{
|
||||
int lastVirtualPageNumber = 1;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-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
|
||||
@@ -408,6 +408,8 @@ public:
|
||||
|
||||
void RemoveSymbolInstances( const SCH_SHEET_PATH& aPrefixSheetPath );
|
||||
|
||||
void CheckForMissingSymbolInstances( const wxString& aProjectName );
|
||||
|
||||
bool operator==( const SCH_SHEET_PATH& d1 ) const;
|
||||
|
||||
bool operator!=( const SCH_SHEET_PATH& d1 ) const { return !( *this == d1 ) ; }
|
||||
@@ -690,6 +692,8 @@ public:
|
||||
|
||||
void RemoveSymbolInstances( const SCH_SHEET_PATH& aPrefixSheetPath );
|
||||
|
||||
void CheckForMissingSymbolInstances( const wxString& aProjectName );
|
||||
|
||||
bool HasPath( const KIID_PATH& aPath ) const;
|
||||
|
||||
bool ContainsSheet( const SCH_SHEET* aSheet ) const;
|
||||
|
||||
@@ -303,14 +303,13 @@ bool NGSPICE::LoadNetlist( const std::string& aNetlist )
|
||||
std::vector<char*> lines;
|
||||
std::stringstream ss( aNetlist );
|
||||
|
||||
m_netlist = "";
|
||||
m_netlist.erase();
|
||||
|
||||
while( !ss.eof() )
|
||||
for( std::string line; std::getline( ss, line ); )
|
||||
{
|
||||
char line[1024];
|
||||
ss.getline( line, sizeof( line ) );
|
||||
lines.push_back( strdup( line ) );
|
||||
m_netlist += std::string( line ) + std::string( "\n" );
|
||||
lines.push_back( strdup( line.data() ) );
|
||||
m_netlist += line;
|
||||
m_netlist += '\n';
|
||||
}
|
||||
|
||||
lines.push_back( nullptr ); // sentinel, as requested in ngSpice_Circ description
|
||||
|
||||
@@ -53,7 +53,8 @@ void SIM_LIB_MGR::Clear()
|
||||
}
|
||||
|
||||
|
||||
wxString SIM_LIB_MGR::ResolveLibraryPath( const wxString& aLibraryPath, const PROJECT* aProject )
|
||||
wxString SIM_LIB_MGR::ResolveLibraryPath( const wxString& aLibraryPath, const PROJECT* aProject,
|
||||
REPORTER& aReporter )
|
||||
{
|
||||
wxString expandedPath = ExpandEnvVarSubstitutions( aLibraryPath, aProject );
|
||||
|
||||
@@ -80,20 +81,23 @@ wxString SIM_LIB_MGR::ResolveLibraryPath( const wxString& aLibraryPath, const PR
|
||||
|
||||
if( spiceLibDir.IsEmpty() || spiceLibFn.GetFullPath() == projectFn.GetFullPath() )
|
||||
{
|
||||
THROW_IO_ERROR( wxString::Format( _( "Simulation model library not found at '%s'" ),
|
||||
projectFn.GetFullPath() ) );
|
||||
aReporter.Report( wxString::Format( _( "Simulation model library not found at '%s'" ),
|
||||
projectFn.GetFullPath() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
THROW_IO_ERROR( wxString::Format( _( "Simulation model library not found at '%s' or '%s'" ),
|
||||
projectFn.GetFullPath(),
|
||||
spiceLibFn.GetFullPath() ) );
|
||||
aReporter.Report( wxString::Format( _( "Simulation model library not found at '%s' or '%s'" ),
|
||||
projectFn.GetFullPath(),
|
||||
spiceLibFn.GetFullPath() ) );
|
||||
}
|
||||
|
||||
return aLibraryPath;
|
||||
}
|
||||
|
||||
|
||||
wxString SIM_LIB_MGR::ResolveEmbeddedLibraryPath( const wxString& aLibPath,
|
||||
const wxString& aRelativeLib )
|
||||
const wxString& aRelativeLib,
|
||||
REPORTER& aReporter )
|
||||
{
|
||||
wxFileName testPath( aLibPath );
|
||||
wxString fullPath( aLibPath );
|
||||
@@ -102,12 +106,7 @@ wxString SIM_LIB_MGR::ResolveEmbeddedLibraryPath( const wxString& aLibPath,
|
||||
{
|
||||
wxString relLib( aRelativeLib );
|
||||
|
||||
try
|
||||
{
|
||||
relLib = ResolveLibraryPath( relLib, m_project );
|
||||
}
|
||||
catch( ... )
|
||||
{}
|
||||
relLib = ResolveLibraryPath( relLib, m_project, aReporter );
|
||||
|
||||
wxFileName fn( relLib );
|
||||
|
||||
@@ -115,17 +114,12 @@ wxString SIM_LIB_MGR::ResolveEmbeddedLibraryPath( const wxString& aLibPath,
|
||||
fullPath = testPath.GetFullPath();
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
wxFileName fn( fullPath );
|
||||
wxFileName fn( fullPath );
|
||||
|
||||
if( !fn.Exists() )
|
||||
fullPath = aLibPath;
|
||||
if( !fn.Exists() )
|
||||
fullPath = aLibPath;
|
||||
|
||||
fullPath = ResolveLibraryPath( fullPath, m_project );
|
||||
}
|
||||
catch( ... )
|
||||
{}
|
||||
fullPath = ResolveLibraryPath( fullPath, m_project, aReporter );
|
||||
|
||||
return fullPath;
|
||||
}
|
||||
@@ -133,23 +127,26 @@ wxString SIM_LIB_MGR::ResolveEmbeddedLibraryPath( const wxString& aLibPath,
|
||||
|
||||
void SIM_LIB_MGR::SetLibrary( const wxString& aLibraryPath, REPORTER& aReporter )
|
||||
{
|
||||
try
|
||||
wxString path = ResolveLibraryPath( aLibraryPath, m_project, aReporter );
|
||||
|
||||
if( aReporter.HasMessage() )
|
||||
return;
|
||||
|
||||
if( !wxFileName::Exists( path ) )
|
||||
{
|
||||
wxString path = ResolveLibraryPath( aLibraryPath, m_project );
|
||||
|
||||
std::function<wxString(const wxString&, const wxString&)> f2 =
|
||||
std::bind( &SIM_LIB_MGR::ResolveEmbeddedLibraryPath, this, _1, _2 );
|
||||
|
||||
std::unique_ptr<SIM_LIBRARY> library = SIM_LIBRARY::Create( path, m_forceFullParse,
|
||||
aReporter, &f2 );
|
||||
|
||||
Clear();
|
||||
m_libraries[path] = std::move( library );
|
||||
}
|
||||
catch( const IO_ERROR& e )
|
||||
{
|
||||
aReporter.Report( e.What() );
|
||||
aReporter.Report( wxString::Format( _( "Simulation model library not found at '%s'" ),
|
||||
path ) );
|
||||
return;
|
||||
}
|
||||
|
||||
std::unique_ptr<SIM_LIBRARY> library = SIM_LIBRARY::Create( path, m_forceFullParse, aReporter,
|
||||
[&]( const wxString& libPath, const wxString& relativeLib ) -> wxString
|
||||
{
|
||||
return ResolveEmbeddedLibraryPath( libPath, relativeLib, aReporter );
|
||||
} );
|
||||
|
||||
Clear();
|
||||
m_libraries[path] = std::move( library );
|
||||
}
|
||||
|
||||
|
||||
@@ -299,37 +296,24 @@ SIM_LIBRARY::MODEL SIM_LIB_MGR::CreateModel( const wxString& aLibraryPath,
|
||||
const std::vector<LIB_PIN*>& aPins,
|
||||
REPORTER& aReporter )
|
||||
{
|
||||
wxString path;
|
||||
wxString msg;
|
||||
SIM_LIBRARY* library = nullptr;
|
||||
SIM_MODEL* baseModel = nullptr;
|
||||
std::string modelName;
|
||||
wxString path = ResolveLibraryPath( aLibraryPath, m_project, aReporter );
|
||||
|
||||
try
|
||||
auto it = m_libraries.find( path );
|
||||
|
||||
if( it == m_libraries.end() )
|
||||
{
|
||||
path = ResolveLibraryPath( aLibraryPath, m_project );
|
||||
|
||||
auto it = m_libraries.find( path );
|
||||
|
||||
if( it == m_libraries.end() )
|
||||
{
|
||||
std::function<wxString( const wxString&, const wxString& )> f2 =
|
||||
std::bind( &SIM_LIB_MGR::ResolveEmbeddedLibraryPath, this, _1, _2 );
|
||||
|
||||
it = m_libraries.emplace( path, SIM_LIBRARY::Create( path, m_forceFullParse,
|
||||
aReporter, &f2 ) ).first;
|
||||
}
|
||||
|
||||
library = &*it->second;
|
||||
it = m_libraries.emplace( path, SIM_LIBRARY::Create( path, m_forceFullParse, aReporter,
|
||||
[&]( const wxString& libPath, const wxString& relativeLib ) -> wxString
|
||||
{
|
||||
return ResolveEmbeddedLibraryPath( libPath, relativeLib, aReporter );
|
||||
} ) ).first;
|
||||
}
|
||||
catch( const IO_ERROR& e )
|
||||
{
|
||||
msg.Printf( _( "Error loading simulation model library '%s': %s" ),
|
||||
path,
|
||||
e.What() );
|
||||
|
||||
aReporter.Report( msg, RPT_SEVERITY_ERROR );
|
||||
}
|
||||
library = &*it->second;
|
||||
|
||||
if( aBaseModelName == "" )
|
||||
{
|
||||
|
||||
@@ -79,8 +79,10 @@ public:
|
||||
std::map<wxString, std::reference_wrapper<const SIM_LIBRARY>> GetLibraries() const;
|
||||
std::vector<std::reference_wrapper<SIM_MODEL>> GetModels() const;
|
||||
|
||||
static wxString ResolveLibraryPath( const wxString& aLibraryPath, const PROJECT* aProject );
|
||||
wxString ResolveEmbeddedLibraryPath( const wxString& aLibPath, const wxString& aRelativeLib );
|
||||
static wxString ResolveLibraryPath( const wxString& aLibraryPath, const PROJECT* aProject,
|
||||
REPORTER& aReporter );
|
||||
wxString ResolveEmbeddedLibraryPath( const wxString& aLibPath, const wxString& aRelativeLib,
|
||||
REPORTER& aReporter );
|
||||
|
||||
private:
|
||||
const PROJECT* m_project;
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
std::unique_ptr<SIM_LIBRARY>
|
||||
SIM_LIBRARY::Create( const wxString& aFilePath, bool aForceFullParse, REPORTER& aReporter,
|
||||
std::function<wxString( const wxString&, const wxString& )>* aResolver )
|
||||
const std::function<wxString( const wxString&, const wxString& )>& aResolver )
|
||||
{
|
||||
std::unique_ptr<SIM_LIBRARY> library;
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
*/
|
||||
static std::unique_ptr<SIM_LIBRARY>
|
||||
Create( const wxString& aFilePath, bool aForceFullParse, REPORTER& aReporter,
|
||||
std::function<wxString( const wxString&, const wxString& )>* aResolver );
|
||||
const std::function<wxString( const wxString&, const wxString& )>& aResolver );
|
||||
|
||||
/**
|
||||
* Read library from a source file. Must be in the format appropriate to the subclass, e.g.
|
||||
@@ -77,7 +77,7 @@ protected:
|
||||
std::vector<std::string> m_modelNames;
|
||||
std::vector<std::unique_ptr<SIM_MODEL>> m_models;
|
||||
|
||||
std::function<wxString( const wxString&, const wxString& )>* m_pathResolver;
|
||||
std::function<wxString( const wxString&, const wxString& )> m_pathResolver;
|
||||
|
||||
std::string m_filePath;
|
||||
};
|
||||
|
||||
@@ -68,7 +68,12 @@ std::string SPICE_GENERATOR_KIBIS::IbisDevice( const SPICE_ITEM& aItem, const PR
|
||||
std::string ibisModelName = SIM_MODEL::GetFieldValue( &aItem.fields, SIM_LIBRARY_KIBIS::MODEL_FIELD );
|
||||
bool diffMode = SIM_MODEL::GetFieldValue( &aItem.fields, SIM_LIBRARY_KIBIS::DIFF_FIELD ) == "1";
|
||||
|
||||
wxString path = SIM_LIB_MGR::ResolveLibraryPath( ibisLibFilename, &aProject );
|
||||
wxString msg;
|
||||
WX_STRING_REPORTER reporter( &msg );
|
||||
wxString path = SIM_LIB_MGR::ResolveLibraryPath( ibisLibFilename, &aProject, reporter );
|
||||
|
||||
if( reporter.HasMessage() )
|
||||
THROW_IO_ERROR( msg );
|
||||
|
||||
KIBIS kibis( std::string( path.c_str() ) );
|
||||
kibis.m_cacheDir = std::string( aCacheDir.c_str() );
|
||||
|
||||
@@ -457,6 +457,8 @@ void SIMULATOR_FRAME::StartSimulation()
|
||||
|
||||
if( simulatorLock.owns_lock() )
|
||||
{
|
||||
m_simFinished = false;
|
||||
|
||||
m_ui->OnSimUpdate();
|
||||
m_simulator->Run();
|
||||
|
||||
|
||||
@@ -1214,6 +1214,7 @@ void SIMULATOR_FRAME_UI::onMeasurementsGridCellChanged( wxGridEvent& aEvent )
|
||||
if( col == COL_MEASUREMENT )
|
||||
{
|
||||
UpdateMeasurement( row );
|
||||
updateMeasurementsFromGrid();
|
||||
OnModify();
|
||||
}
|
||||
else
|
||||
@@ -1365,6 +1366,8 @@ void SIMULATOR_FRAME_UI::UpdateMeasurement( int aRow )
|
||||
|
||||
fmt.UpdateUnits( units );
|
||||
SetMeasureFormat( aRow, fmt );
|
||||
|
||||
updateMeasurementsFromGrid();
|
||||
}
|
||||
|
||||
if( m_simulatorFrame->SimFinished() )
|
||||
@@ -1493,9 +1496,9 @@ void SIMULATOR_FRAME_UI::AddMeasurement( const wxString& aCmd )
|
||||
}
|
||||
|
||||
m_measurementsGrid->SetCellValue( row, COL_MEASUREMENT, aCmd );
|
||||
SetMeasureFormat( row, { 2, wxS( "~V" ) } );
|
||||
|
||||
UpdateMeasurement( row );
|
||||
updateMeasurementsFromGrid();
|
||||
OnModify();
|
||||
|
||||
// Always leave at least one empty row for type-in:
|
||||
@@ -2397,7 +2400,7 @@ void SIMULATOR_FRAME_UI::updateMeasurementsFromGrid()
|
||||
|
||||
void SIMULATOR_FRAME_UI::onPlotChanging( wxAuiNotebookEvent& event )
|
||||
{
|
||||
updateMeasurementsFromGrid();
|
||||
m_measurementsGrid->ClearRows();
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
@@ -118,10 +118,7 @@ void SPICE_LIBRARY_PARSER::readFallbacks( const wxString& aFilePath, REPORTER& a
|
||||
}
|
||||
else if( token == wxS( ".inc" ) )
|
||||
{
|
||||
wxString lib = tokenizer.GetNextToken();
|
||||
|
||||
if( m_library.m_pathResolver )
|
||||
lib = ( *m_library.m_pathResolver )( lib, aFilePath );
|
||||
wxString lib = m_library.m_pathResolver( tokenizer.GetNextToken(), aFilePath );
|
||||
|
||||
parseFile( lib, aReporter );
|
||||
}
|
||||
@@ -170,13 +167,10 @@ void SPICE_LIBRARY_PARSER::parseFile( const wxString &aFilePath, REPORTER& aRepo
|
||||
}
|
||||
else if( node->is_type<SIM_LIBRARY_SPICE_PARSER::dotInclude>() )
|
||||
{
|
||||
wxString lib = node->children.at( 0 )->string();
|
||||
wxString lib = m_library.m_pathResolver( node->children.at( 0 )->string(), aFilePath );
|
||||
|
||||
try
|
||||
{
|
||||
if( m_library.m_pathResolver )
|
||||
lib = ( *m_library.m_pathResolver )( lib, aFilePath );
|
||||
|
||||
parseFile( lib, aReporter );
|
||||
}
|
||||
catch( const IO_ERROR& e )
|
||||
|
||||
@@ -40,10 +40,18 @@
|
||||
|
||||
void SPICE_VALUE_FORMAT::FromString( const wxString& aString )
|
||||
{
|
||||
long val;
|
||||
aString.Left( 1 ).ToLong( &val );
|
||||
Precision = (int) val;
|
||||
Range = aString.Right( aString.Length() - 1 );
|
||||
if( aString.IsEmpty() )
|
||||
{
|
||||
Precision = 3;
|
||||
Range = wxS( "~V" );
|
||||
}
|
||||
else
|
||||
{
|
||||
long val;
|
||||
aString.Left( 1 ).ToLong( &val );
|
||||
Precision = (int) val;
|
||||
Range = aString.Right( aString.Length() - 1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <tool/tool_manager.h>
|
||||
#include <tools/ee_actions.h>
|
||||
#include <tools/ee_selection_tool.h>
|
||||
#include <tools/symbol_editor_drawing_tools.h>
|
||||
|
||||
|
||||
void SYMBOL_EDIT_FRAME::PushSymbolToUndoList( const wxString& aDescription, LIB_SYMBOL* aSymbolCopy,
|
||||
@@ -37,6 +38,8 @@ void SYMBOL_EDIT_FRAME::PushSymbolToUndoList( const wxString& aDescription, LIB_
|
||||
if( !aSymbolCopy )
|
||||
return;
|
||||
|
||||
auto* drawingTool = GetToolManager()->GetTool<SYMBOL_EDITOR_DRAWING_TOOLS>();
|
||||
|
||||
PICKED_ITEMS_LIST* lastcmd = new PICKED_ITEMS_LIST();
|
||||
|
||||
// Clear current flags (which can be temporary set by a current edit command).
|
||||
@@ -45,6 +48,7 @@ void SYMBOL_EDIT_FRAME::PushSymbolToUndoList( const wxString& aDescription, LIB_
|
||||
aSymbolCopy->SetFlags( UR_TRANSIENT );
|
||||
|
||||
ITEM_PICKER wrapper( GetScreen(), aSymbolCopy, aUndoType );
|
||||
wrapper.SetGroupId( drawingTool->GetLastPin() );
|
||||
lastcmd->PushItem( wrapper );
|
||||
lastcmd->SetDescription( aDescription );
|
||||
PushCommandToUndoList( lastcmd );
|
||||
@@ -67,6 +71,8 @@ void SYMBOL_EDIT_FRAME::GetSymbolFromRedoList()
|
||||
if( GetRedoCommandCount() <= 0 )
|
||||
return;
|
||||
|
||||
auto* drawingTool = GetToolManager()->GetTool<SYMBOL_EDITOR_DRAWING_TOOLS>();
|
||||
|
||||
// Load the last redo entry
|
||||
PICKED_ITEMS_LIST* redoCommand = PopCommandFromRedoList();
|
||||
ITEM_PICKER redoWrapper = redoCommand->PopItem();
|
||||
@@ -75,6 +81,7 @@ void SYMBOL_EDIT_FRAME::GetSymbolFromRedoList()
|
||||
delete redoCommand;
|
||||
|
||||
LIB_SYMBOL* symbol = (LIB_SYMBOL*) redoWrapper.GetItem();
|
||||
KIID lastPin = redoWrapper.GetGroupId();
|
||||
UNDO_REDO undoRedoType = redoWrapper.GetStatus();
|
||||
wxCHECK( symbol, /* void */ );
|
||||
symbol->ClearFlags( UR_TRANSIENT );
|
||||
@@ -85,6 +92,7 @@ void SYMBOL_EDIT_FRAME::GetSymbolFromRedoList()
|
||||
|
||||
oldSymbol->SetFlags( UR_TRANSIENT );
|
||||
ITEM_PICKER undoWrapper( GetScreen(), oldSymbol, undoRedoType );
|
||||
undoWrapper.SetGroupId( drawingTool->GetLastPin() );
|
||||
undoCommand->SetDescription( description );
|
||||
undoCommand->PushItem( undoWrapper );
|
||||
PushCommandToUndoList( undoCommand );
|
||||
@@ -94,6 +102,7 @@ void SYMBOL_EDIT_FRAME::GetSymbolFromRedoList()
|
||||
// <previous symbol> is now put in undo list and is owned by this list
|
||||
// Just set the current symbol to the symbol which come from the redo list
|
||||
m_symbol = symbol;
|
||||
drawingTool->SetLastPin( lastPin );
|
||||
|
||||
if( undoRedoType == UNDO_REDO::LIB_RENAME )
|
||||
{
|
||||
@@ -118,6 +127,8 @@ void SYMBOL_EDIT_FRAME::GetSymbolFromUndoList()
|
||||
if( GetUndoCommandCount() <= 0 )
|
||||
return;
|
||||
|
||||
auto* drawingTool = GetToolManager()->GetTool<SYMBOL_EDITOR_DRAWING_TOOLS>();
|
||||
|
||||
// Load the last undo entry
|
||||
PICKED_ITEMS_LIST* undoCommand = PopCommandFromUndoList();
|
||||
wxString description = undoCommand->GetDescription();
|
||||
@@ -126,6 +137,7 @@ void SYMBOL_EDIT_FRAME::GetSymbolFromUndoList()
|
||||
delete undoCommand;
|
||||
|
||||
LIB_SYMBOL* symbol = (LIB_SYMBOL*) undoWrapper.GetItem();
|
||||
KIID lastPin = undoWrapper.GetGroupId();
|
||||
UNDO_REDO undoRedoType = undoWrapper.GetStatus();
|
||||
wxCHECK( symbol, /* void */ );
|
||||
symbol->ClearFlags( UR_TRANSIENT );
|
||||
@@ -136,6 +148,7 @@ void SYMBOL_EDIT_FRAME::GetSymbolFromUndoList()
|
||||
|
||||
oldSymbol->SetFlags( UR_TRANSIENT );
|
||||
ITEM_PICKER redoWrapper( GetScreen(), oldSymbol, undoRedoType );
|
||||
redoWrapper.SetGroupId( drawingTool->GetLastPin() );
|
||||
redoCommand->PushItem( redoWrapper );
|
||||
redoCommand->SetDescription( description );
|
||||
PushCommandToRedoList( redoCommand );
|
||||
@@ -145,6 +158,7 @@ void SYMBOL_EDIT_FRAME::GetSymbolFromUndoList()
|
||||
// <previous symbol> is now put in redo list and is owned by this list.
|
||||
// Just set the current symbol to the symbol which come from the undo list
|
||||
m_symbol = symbol;
|
||||
drawingTool->SetLastPin( lastPin );
|
||||
|
||||
if( undoRedoType == UNDO_REDO::LIB_RENAME )
|
||||
{
|
||||
|
||||
@@ -480,7 +480,11 @@ bool SYMBOL_LIBRARY_MANAGER::UpdateSymbol( LIB_SYMBOL* aSymbol, const wxString&
|
||||
|
||||
wxCHECK( bufferedSymbol, false );
|
||||
|
||||
// If we are coming from a different library, the library ID needs to be preserved
|
||||
auto libId = bufferedSymbol->GetLibId();
|
||||
*bufferedSymbol = *aSymbol;
|
||||
bufferedSymbol->SetLibId( libId );
|
||||
|
||||
symbolBuf->GetScreen()->SetContentModified();
|
||||
}
|
||||
else // New symbol
|
||||
|
||||
@@ -1248,8 +1248,11 @@ SCH_TEXT* SCH_DRAWING_TOOLS::createNewText( const VECTOR2I& aPosition, int aType
|
||||
|
||||
textItem->SetParent( schematic );
|
||||
|
||||
textItem->SetTextSize( VECTOR2I( settings.m_DefaultTextSize, settings.m_DefaultTextSize ) );
|
||||
|
||||
if( aType != LAYER_NETCLASS_REFS )
|
||||
{
|
||||
// Must be after SetTextSize()
|
||||
textItem->SetBold( m_lastTextBold );
|
||||
textItem->SetItalic( m_lastTextItalic );
|
||||
}
|
||||
@@ -1265,7 +1268,6 @@ SCH_TEXT* SCH_DRAWING_TOOLS::createNewText( const VECTOR2I& aPosition, int aType
|
||||
textItem->SetTextAngle( m_lastTextAngle );
|
||||
}
|
||||
|
||||
textItem->SetTextSize( VECTOR2I( settings.m_DefaultTextSize, settings.m_DefaultTextSize ) );
|
||||
textItem->SetFlags( IS_NEW | IS_MOVING );
|
||||
|
||||
if( !labelItem )
|
||||
@@ -1862,10 +1864,13 @@ int SCH_DRAWING_TOOLS::DrawShape( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
SCH_TEXTBOX* textbox = new SCH_TEXTBOX( 0, m_lastTextboxFillStyle );
|
||||
|
||||
textbox->SetBold( m_lastTextBold );
|
||||
textbox->SetItalic( m_lastTextItalic );
|
||||
textbox->SetTextSize( VECTOR2I( sch_settings.m_DefaultTextSize,
|
||||
sch_settings.m_DefaultTextSize ) );
|
||||
|
||||
// Must come after SetTextSize()
|
||||
textbox->SetBold( m_lastTextBold );
|
||||
textbox->SetItalic( m_lastTextItalic );
|
||||
|
||||
textbox->SetTextAngle( m_lastTextboxAngle );
|
||||
textbox->SetHorizJustify( m_lastTextboxHJustify );
|
||||
textbox->SetVertJustify( m_lastTextboxVJustify );
|
||||
|
||||
@@ -2316,8 +2316,10 @@ int SCH_EDIT_TOOL::ChangeTextType( const TOOL_EVENT& aEvent )
|
||||
new_eda_text->SetFont( eda_text->GetFont() );
|
||||
new_eda_text->SetTextSize( eda_text->GetTextSize() );
|
||||
new_eda_text->SetTextThickness( eda_text->GetTextThickness() );
|
||||
new_eda_text->SetItalic( eda_text->IsItalic() );
|
||||
|
||||
// Must be after SetTextSize()
|
||||
new_eda_text->SetBold( eda_text->IsBold() );
|
||||
new_eda_text->SetItalic( eda_text->IsItalic() );
|
||||
|
||||
newtext->AutoplaceFields( m_frame->GetScreen(), false );
|
||||
|
||||
|
||||
@@ -1080,14 +1080,13 @@ int SCH_EDITOR_CONTROL::UpdateNetHighlighting( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
wxCHECK2( item, continue );
|
||||
|
||||
SCH_CONNECTION* connection = item->Connection();
|
||||
|
||||
wxCHECK2( connection, continue );
|
||||
|
||||
for( const std::shared_ptr<SCH_CONNECTION>& member : connection->AllMembers() )
|
||||
if( SCH_CONNECTION* connection = item->Connection() )
|
||||
{
|
||||
if( member )
|
||||
connNames.emplace( member->Name() );
|
||||
for( const std::shared_ptr<SCH_CONNECTION>& member : connection->AllMembers() )
|
||||
{
|
||||
if( member )
|
||||
connNames.emplace( member->Name() );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1106,50 +1105,44 @@ int SCH_EDITOR_CONTROL::UpdateNetHighlighting( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( item );
|
||||
|
||||
wxCHECK2( symbol, continue );
|
||||
|
||||
for( SCH_PIN* pin : symbol->GetPins() )
|
||||
{
|
||||
SCH_CONNECTION* pin_conn = pin->Connection();
|
||||
|
||||
wxCHECK2( pin_conn, continue );
|
||||
|
||||
if( !pin->IsBrightened() && connNames.count( pin_conn->Name() ) )
|
||||
if( SCH_CONNECTION* pin_conn = pin->Connection() )
|
||||
{
|
||||
pin->SetBrightened();
|
||||
redrawItem = symbol;
|
||||
}
|
||||
else if( pin->IsBrightened() && !connNames.count( pin_conn->Name() ) )
|
||||
{
|
||||
pin->ClearBrightened();
|
||||
redrawItem = symbol;
|
||||
if( !pin->IsBrightened() && connNames.count( pin_conn->Name() ) )
|
||||
{
|
||||
pin->SetBrightened();
|
||||
redrawItem = symbol;
|
||||
}
|
||||
else if( pin->IsBrightened() && !connNames.count( pin_conn->Name() ) )
|
||||
{
|
||||
pin->ClearBrightened();
|
||||
redrawItem = symbol;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( symbol->IsPower() )
|
||||
if( symbol->IsPower() && symbol->GetPins().size() )
|
||||
{
|
||||
wxCHECK2( symbol->GetPins().size(), continue );
|
||||
|
||||
SCH_CONNECTION* pinConn = symbol->GetPins()[0]->Connection();
|
||||
|
||||
wxCHECK2( pinConn, continue );
|
||||
|
||||
std::vector<SCH_FIELD>& fields = symbol->GetFields();
|
||||
|
||||
for( int id : { REFERENCE_FIELD, VALUE_FIELD } )
|
||||
if( SCH_CONNECTION* pinConn = symbol->GetPins()[0]->Connection() )
|
||||
{
|
||||
if( !fields[id].IsVisible() )
|
||||
continue;
|
||||
std::vector<SCH_FIELD>& fields = symbol->GetFields();
|
||||
|
||||
if( !fields[id].IsBrightened() && connNames.count( pinConn->Name() ) )
|
||||
for( int id : { REFERENCE_FIELD, VALUE_FIELD } )
|
||||
{
|
||||
fields[id].SetBrightened();
|
||||
redrawItem = symbol;
|
||||
}
|
||||
else if( fields[id].IsBrightened() && !connNames.count( pinConn->Name() ) )
|
||||
{
|
||||
fields[id].ClearBrightened();
|
||||
redrawItem = symbol;
|
||||
if( !fields[id].IsVisible() )
|
||||
continue;
|
||||
|
||||
if( !fields[id].IsBrightened() && connNames.count( pinConn->Name() ) )
|
||||
{
|
||||
fields[id].SetBrightened();
|
||||
redrawItem = symbol;
|
||||
}
|
||||
else if( fields[id].IsBrightened() && !connNames.count( pinConn->Name() ) )
|
||||
{
|
||||
fields[id].ClearBrightened();
|
||||
redrawItem = symbol;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1158,43 +1151,39 @@ int SCH_EDITOR_CONTROL::UpdateNetHighlighting( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
SCH_SHEET* sheet = static_cast<SCH_SHEET*>( item );
|
||||
|
||||
wxCHECK2( sheet, continue );
|
||||
|
||||
for( SCH_SHEET_PIN* pin : sheet->GetPins() )
|
||||
{
|
||||
wxCHECK2( pin, continue );
|
||||
|
||||
SCH_CONNECTION* pin_conn = pin->Connection();
|
||||
|
||||
wxCHECK2( pin_conn, continue );
|
||||
|
||||
if( !pin->IsBrightened() && connNames.count( pin_conn->Name() ) )
|
||||
if( SCH_CONNECTION* pin_conn = pin->Connection() )
|
||||
{
|
||||
pin->SetBrightened();
|
||||
redrawItem = sheet;
|
||||
}
|
||||
else if( pin->IsBrightened() && !connNames.count( pin_conn->Name() ) )
|
||||
{
|
||||
pin->ClearBrightened();
|
||||
redrawItem = sheet;
|
||||
if( !pin->IsBrightened() && connNames.count( pin_conn->Name() ) )
|
||||
{
|
||||
pin->SetBrightened();
|
||||
redrawItem = sheet;
|
||||
}
|
||||
else if( pin->IsBrightened() && !connNames.count( pin_conn->Name() ) )
|
||||
{
|
||||
pin->ClearBrightened();
|
||||
redrawItem = sheet;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SCH_CONNECTION* itemConn = item->Connection();
|
||||
|
||||
wxCHECK2( itemConn, continue );
|
||||
|
||||
if( !item->IsBrightened() && connNames.count( itemConn->Name() ) )
|
||||
if( SCH_CONNECTION* itemConn = item->Connection() )
|
||||
{
|
||||
item->SetBrightened();
|
||||
redrawItem = item;
|
||||
}
|
||||
else if( item->IsBrightened() && !connNames.count( itemConn->Name() ) )
|
||||
{
|
||||
item->ClearBrightened();
|
||||
redrawItem = item;
|
||||
if( !item->IsBrightened() && connNames.count( itemConn->Name() ) )
|
||||
{
|
||||
item->SetBrightened();
|
||||
redrawItem = item;
|
||||
}
|
||||
else if( item->IsBrightened() && !connNames.count( itemConn->Name() ) )
|
||||
{
|
||||
item->ClearBrightened();
|
||||
redrawItem = item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,8 @@
|
||||
#include <import_gfx/dialog_import_gfx_sch.h>
|
||||
#include "dialog_lib_textbox_properties.h"
|
||||
|
||||
static void* g_lastPinWeakPtr;
|
||||
|
||||
KIID SYMBOL_EDITOR_DRAWING_TOOLS::g_lastPin;
|
||||
|
||||
|
||||
SYMBOL_EDITOR_DRAWING_TOOLS::SYMBOL_EDITOR_DRAWING_TOOLS() :
|
||||
@@ -214,7 +215,10 @@ int SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent )
|
||||
case LIB_PIN_T:
|
||||
{
|
||||
item = pinTool->CreatePin( VECTOR2I( cursorPos.x, -cursorPos.y ), symbol );
|
||||
g_lastPinWeakPtr = item;
|
||||
|
||||
if( item )
|
||||
g_lastPin = item->m_Uuid;
|
||||
|
||||
break;
|
||||
}
|
||||
case LIB_TEXT_T:
|
||||
@@ -463,10 +467,13 @@ int SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape( const TOOL_EVENT& aEvent, std::opt
|
||||
{
|
||||
LIB_TEXTBOX* textbox = new LIB_TEXTBOX( symbol, lineWidth, m_lastFillStyle );
|
||||
|
||||
textbox->SetBold( m_lastTextBold );
|
||||
textbox->SetItalic( m_lastTextItalic );
|
||||
textbox->SetTextSize( VECTOR2I( schIUScale.MilsToIU( settings->m_Defaults.text_size ),
|
||||
schIUScale.MilsToIU( settings->m_Defaults.text_size ) ) );
|
||||
|
||||
// Must be after SetTextSize()
|
||||
textbox->SetBold( m_lastTextBold );
|
||||
textbox->SetItalic( m_lastTextItalic );
|
||||
|
||||
textbox->SetTextAngle( m_lastTextAngle );
|
||||
textbox->SetHorizJustify( m_lastTextJust );
|
||||
|
||||
@@ -830,12 +837,11 @@ int SYMBOL_EDITOR_DRAWING_TOOLS::RepeatDrawItem( const TOOL_EVENT& aEvent )
|
||||
if( !symbol )
|
||||
return 0;
|
||||
|
||||
// See if we have a pin matching our weak ptr
|
||||
std::vector<LIB_PIN*> pins = symbol->GetAllLibPins();
|
||||
|
||||
for( LIB_PIN* test : pins )
|
||||
{
|
||||
if( (void*) test == g_lastPinWeakPtr )
|
||||
if( test->m_Uuid == g_lastPin )
|
||||
{
|
||||
sourcePin = test;
|
||||
break;
|
||||
@@ -845,7 +851,9 @@ int SYMBOL_EDITOR_DRAWING_TOOLS::RepeatDrawItem( const TOOL_EVENT& aEvent )
|
||||
if( sourcePin )
|
||||
{
|
||||
LIB_PIN* pin = pinTool->RepeatPin( sourcePin );
|
||||
g_lastPinWeakPtr = pin;
|
||||
|
||||
if( pin )
|
||||
g_lastPin = pin->m_Uuid;
|
||||
|
||||
m_toolMgr->RunAction( EE_ACTIONS::clearSelection );
|
||||
|
||||
|
||||
@@ -65,6 +65,9 @@ public:
|
||||
void SetDrawSpecificUnit( bool aSpecific ) { m_drawSpecificUnit = aSpecific; }
|
||||
bool GetDrawSpecificUnit() const { return m_drawSpecificUnit; }
|
||||
|
||||
KIID GetLastPin() { return g_lastPin; }
|
||||
void SetLastPin( KIID aPin ) { g_lastPin = aPin; }
|
||||
|
||||
private:
|
||||
int doDrawShape( const TOOL_EVENT& aEvent, std::optional<SHAPE_T> aDrawingShape );
|
||||
|
||||
@@ -84,6 +87,9 @@ private:
|
||||
///< Re-entrancy guards
|
||||
bool m_inDrawShape;
|
||||
bool m_inTwoClickPlace;
|
||||
|
||||
private:
|
||||
static KIID g_lastPin;
|
||||
};
|
||||
|
||||
#endif /* SYMBOL_EDITOR_DRAWING_TOOLS_H */
|
||||
|
||||
@@ -409,6 +409,11 @@ int SYMBOL_EDITOR_PIN_TOOL::PushPinProperties( const TOOL_EVENT& aEvent )
|
||||
// Create a new pin based on the previous pin with an incremented pin number.
|
||||
LIB_PIN* SYMBOL_EDITOR_PIN_TOOL::RepeatPin( const LIB_PIN* aSourcePin )
|
||||
{
|
||||
SCH_COMMIT commit( m_frame );
|
||||
LIB_SYMBOL* symbol = m_frame->GetCurSymbol();
|
||||
|
||||
commit.Modify( symbol );
|
||||
|
||||
LIB_PIN* pin = (LIB_PIN*) aSourcePin->Duplicate();
|
||||
VECTOR2I step;
|
||||
|
||||
@@ -439,7 +444,10 @@ LIB_PIN* SYMBOL_EDITOR_PIN_TOOL::RepeatPin( const LIB_PIN* aSourcePin )
|
||||
pin->SetFlags( IS_LINKED );
|
||||
|
||||
if( PlacePin( pin ) )
|
||||
{
|
||||
commit.Push( _( "Repeat Pin" ) );
|
||||
return pin;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
+8
-5
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 1992-2023 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
|
||||
@@ -298,7 +298,7 @@ void fillArcGBRITEM( GERBER_DRAW_ITEM* aGbrItem, int Dcode_index, const VECTOR2I
|
||||
aGbrItem->SetLayerPolarity( aLayerNegative );
|
||||
}
|
||||
|
||||
|
||||
#include <wx/log.h>
|
||||
/**
|
||||
* Create an arc G code when found in polygon outlines.
|
||||
*
|
||||
@@ -368,9 +368,12 @@ static void fillArcPOLY( GERBER_DRAW_ITEM* aGbrItem, const VECTOR2I& aStart, con
|
||||
|
||||
EDA_ANGLE arc_angle = start_angle - end_angle;
|
||||
|
||||
// Approximate arc by 36 segments per 360 degree
|
||||
EDA_ANGLE increment_angle = ANGLE_360 / 36;
|
||||
int count = std::abs( arc_angle.AsDegrees() / increment_angle.AsDegrees() );
|
||||
// Approximate arc by segments with a approximation error = err_max
|
||||
// a max err = 5 microns looks good
|
||||
const int approx_err_max = gerbIUScale.mmToIU( 0.005 );
|
||||
int radius = VECTOR2I( aStart - rel_center ).EuclideanNorm();
|
||||
int count = GetArcToSegmentCount( radius, approx_err_max, arc_angle );
|
||||
EDA_ANGLE increment_angle = std::abs( arc_angle ) / count;
|
||||
|
||||
if( aGbrItem->m_ShapeAsPolygon.OutlineCount() == 0 )
|
||||
aGbrItem->m_ShapeAsPolygon.NewOutline();
|
||||
|
||||
@@ -127,8 +127,6 @@ private:
|
||||
*/
|
||||
void jobUpdated( std::shared_ptr<BACKGROUND_JOB> aJob );
|
||||
|
||||
BACKGROUND_JOB_LIST* m_jobListDialog;
|
||||
|
||||
/**
|
||||
* Holds a reference to all active background jobs
|
||||
* Access to this vector should be protected by locks since threads may Create or Remove at will
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2024 Jean-Pierre Charras.
|
||||
* 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 as published by the
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// These flags are used to control the data items that must be disabled when creating
|
||||
// mainly a netlist but also some other kicad files.
|
||||
// They allow skipping specified data in these files.
|
||||
|
||||
#define CTL_OMIT_EXTRA (1 << 0)
|
||||
#define CTL_OMIT_NETS (1 << 1)
|
||||
#define CTL_OMIT_PAD_NETS (1 << 1) ///< Omit pads net names (useless in library)
|
||||
#define CTL_OMIT_UUIDS (1 << 2) ///< Omit component unique ids (useless in library)
|
||||
#define CTL_OMIT_FP_UUID (1 << 3) ///< Don't prefix the footprint UUID to the sheet path.
|
||||
#define CTL_OMIT_PATH (1 << 4) ///< Omit component sheet time stamp (useless in library)
|
||||
#define CTL_OMIT_AT (1 << 5) ///< Omit position and rotation. (always saved
|
||||
///< with position 0,0 and rotation = 0 in library).
|
||||
|
||||
// If set, when calling EDA_TEXT::Format, disable writing the "hide" keyword in save file
|
||||
#define CTL_OMIT_HIDE (1 << 6) ///< Omit the hide attribute in .kicad_xxx files
|
||||
|
||||
#define CTL_OMIT_LIBNAME (1 << 7) ///< Omit lib alias when saving (used for
|
||||
///< board/not library).
|
||||
#define CTL_OMIT_FOOTPRINT_VERSION (1 << 8) ///< Omit the version string from the (footprint)
|
||||
///< sexpr group
|
||||
#define CTL_OMIT_FILTERS (1 << 9) ///< Omit the ki_fp_filters attribute in .kicad_xxx files
|
||||
#define CTL_OMIT_INITIAL_COMMENTS (1 << 10) ///< omit FOOTPRINT initial comments
|
||||
|
||||
#define CTL_OMIT_COLOR (1 << 11) ///< Omit the color attribute in .kicad_xxx files
|
||||
#define CTL_OMIT_HYPERLINK (1 << 12) ///< Omit the hyperlink attribute in .kicad_xxx files
|
||||
+2
-5
@@ -33,6 +33,7 @@
|
||||
#include <font/glyph.h>
|
||||
#include <font/text_attributes.h>
|
||||
|
||||
|
||||
class OUTPUTFORMATTER;
|
||||
class SHAPE_COMPOUND;
|
||||
class SHAPE_POLY_SET;
|
||||
@@ -60,11 +61,6 @@ namespace KIFONT
|
||||
using KIGFX::RENDER_SETTINGS;
|
||||
using KIGFX::COLOR4D;
|
||||
|
||||
// part of the kicad_plugin.h family of defines.
|
||||
// See kicad_plugin.h for the choice of the value
|
||||
// When set when calling EDA_TEXT::Format, disable writing the "hide" keyword in save file
|
||||
#define CTL_OMIT_HIDE (1 << 6)
|
||||
|
||||
|
||||
/**
|
||||
* This is the "default-of-the-default" hardcoded text size; individual application define their
|
||||
@@ -144,6 +140,7 @@ public:
|
||||
bool IsItalic() const { return m_attributes.m_Italic; }
|
||||
|
||||
void SetBold( bool aBold );
|
||||
void SetBoldFlag( bool aBold );
|
||||
bool IsBold() const { return m_attributes.m_Bold; }
|
||||
|
||||
virtual void SetVisible( bool aVisible );
|
||||
|
||||
@@ -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, 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
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <kicommon.h>
|
||||
#include <curl/curl.h>
|
||||
#include <string>
|
||||
#include <shared_mutex>
|
||||
|
||||
// CURL_EXTERN expands to dllimport on MinGW which causes gcc warnings. This really should
|
||||
// expand to nothing on MinGW.
|
||||
@@ -75,6 +76,17 @@ public:
|
||||
*/
|
||||
static void Cleanup();
|
||||
|
||||
/**
|
||||
* Returns the mutex for shared locking when performing curl operations.
|
||||
* Unique locking is performed when shutting down.
|
||||
*/
|
||||
static std::shared_mutex& Mutex();
|
||||
|
||||
/**
|
||||
* Returns true if all curl operations should terminate.
|
||||
*/
|
||||
static bool IsShuttingDown();
|
||||
|
||||
/**
|
||||
* Wrapper for curl_version(). Reports back a short string of loaded libraries.
|
||||
*
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <memory>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
|
||||
typedef void CURL;
|
||||
struct curl_slist;
|
||||
|
||||
@@ -50,23 +50,6 @@
|
||||
#define LABELUSERFIELD_V 200
|
||||
|
||||
|
||||
/**
|
||||
* This class works around a bug in wxGrid where the first keystroke doesn't get sent through
|
||||
* the validator if the editor wasn't already open.
|
||||
*/
|
||||
class GRID_CELL_TEXT_EDITOR : public wxGridCellTextEditor
|
||||
{
|
||||
public:
|
||||
GRID_CELL_TEXT_EDITOR();
|
||||
|
||||
virtual void SetValidator( const wxValidator& validator ) override;
|
||||
virtual void StartingKey( wxKeyEvent& event ) override;
|
||||
|
||||
protected:
|
||||
std::unique_ptr<wxValidator> m_validator;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* This class provides a custom wxValidator object for limiting the allowable characters when
|
||||
* defining footprint names. Since the introduction of the PRETTY footprint library format,
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#define KICAD_GRID_TEXT_HELPERS_H
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <wx/generic/gridctrl.h>
|
||||
|
||||
class wxGrid;
|
||||
@@ -29,6 +30,26 @@ class wxStyledTextCtrl;
|
||||
class wxStyledTextEvent;
|
||||
class SCINTILLA_TRICKS;
|
||||
|
||||
|
||||
/**
|
||||
* This class works around a bug in wxGrid where the first keystroke doesn't get sent through
|
||||
* the validator if the editor wasn't already open.
|
||||
*/
|
||||
class GRID_CELL_TEXT_EDITOR : public wxGridCellTextEditor
|
||||
{
|
||||
public:
|
||||
GRID_CELL_TEXT_EDITOR();
|
||||
|
||||
void SetSize( const wxRect& aRect ) override;
|
||||
|
||||
virtual void SetValidator( const wxValidator& validator ) override;
|
||||
virtual void StartingKey( wxKeyEvent& event ) override;
|
||||
|
||||
protected:
|
||||
std::unique_ptr<wxValidator> m_validator;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* A text renderer that can unescape text for display
|
||||
* This is useful where it's desired to keep the underlying storage escaped.
|
||||
@@ -51,6 +72,7 @@ public:
|
||||
GRID_CELL_STC_EDITOR( bool aIgnoreCase,
|
||||
std::function<void( wxStyledTextEvent&, SCINTILLA_TRICKS* )> aOnChar );
|
||||
|
||||
void SetSize( const wxRect& aRect ) override;
|
||||
void Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler ) override;
|
||||
|
||||
wxGridCellEditor* Clone() const override
|
||||
|
||||
@@ -44,7 +44,8 @@ class KISTATUSBAR : public wxStatusBar
|
||||
public:
|
||||
KISTATUSBAR( int aNumberFields, wxWindow* parent, wxWindowID id );
|
||||
|
||||
public:
|
||||
~KISTATUSBAR();
|
||||
|
||||
/**
|
||||
* Set the text in a field using wxELLIPSIZE_MIDDLE option to adjust the text size
|
||||
* to the field size (unfortunately, setting the wxStatusBar style to wxELLIPSIZE_MIDDLE
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
#include <units_provider.h>
|
||||
#include <libeval/numeric_evaluator.h>
|
||||
|
||||
class wxTextEntryBase;
|
||||
|
||||
|
||||
class WX_GRID : public wxGrid
|
||||
{
|
||||
@@ -150,6 +152,16 @@ public:
|
||||
DeleteRows( 0, GetNumberRows() );
|
||||
}
|
||||
|
||||
/**
|
||||
* A helper function to set OS-specific margins for text-based cell editors.
|
||||
*/
|
||||
static void CellEditorSetMargins( wxTextEntryBase* aEntry );
|
||||
|
||||
/**
|
||||
* A helper function to tweak sizes of text-based cell editors depending on OS.
|
||||
*/
|
||||
static void CellEditorTransformSizeRect( wxRect& aRect );
|
||||
|
||||
protected:
|
||||
/**
|
||||
* A re-implementation of wxGrid::DrawColLabel which left-aligns the first column and draws
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2022 Mark Roszko <mark.roszko@gmail.com>
|
||||
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-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 as published by the
|
||||
@@ -41,6 +41,7 @@
|
||||
#define ARG_MAP_FORMAT "--map-format"
|
||||
#define ARG_DRILL_ORIGIN "--drill-origin"
|
||||
|
||||
|
||||
CLI::PCB_EXPORT_DRILL_COMMAND::PCB_EXPORT_DRILL_COMMAND() : PCB_EXPORT_BASE_COMMAND( "drill",
|
||||
false, true )
|
||||
{
|
||||
@@ -109,7 +110,8 @@ int CLI::PCB_EXPORT_DRILL_COMMAND::doPerform( KIWAY& aKiway )
|
||||
|
||||
if( !drillJob->m_outputDir.IsEmpty() )
|
||||
{
|
||||
wxFileName fn( drillJob->m_outputDir );
|
||||
wxFileName fn( drillJob->m_outputDir, wxEmptyString );
|
||||
|
||||
if( !fn.IsDir() )
|
||||
{
|
||||
wxFprintf( stderr, _( "Output must be a directory\n" ) );
|
||||
@@ -175,6 +177,7 @@ int CLI::PCB_EXPORT_DRILL_COMMAND::doPerform( KIWAY& aKiway )
|
||||
|
||||
wxString drillFormat =
|
||||
From_UTF8( m_argParser.get<std::string>( ARG_EXCELLON_OVAL_FORMAT ).c_str() );
|
||||
|
||||
if( drillFormat == wxS( "route" ) )
|
||||
{
|
||||
drillJob->m_excellonOvalDrillRoute = true;
|
||||
|
||||
@@ -42,6 +42,13 @@ PANEL_KICAD_LAUNCHER::PANEL_KICAD_LAUNCHER( wxWindow* aParent ) :
|
||||
}
|
||||
|
||||
|
||||
PANEL_KICAD_LAUNCHER::~PANEL_KICAD_LAUNCHER()
|
||||
{
|
||||
Unbind( wxEVT_SYS_COLOUR_CHANGED,
|
||||
wxSysColourChangedEventHandler( PANEL_KICAD_LAUNCHER::onThemeChanged ), this );
|
||||
}
|
||||
|
||||
|
||||
void PANEL_KICAD_LAUNCHER::CreateLaunchers()
|
||||
{
|
||||
m_frame->SetPcmButton( nullptr );
|
||||
|
||||
@@ -30,7 +30,7 @@ class PANEL_KICAD_LAUNCHER : public PANEL_KICAD_LAUNCHER_BASE
|
||||
public:
|
||||
PANEL_KICAD_LAUNCHER( wxWindow* aParent );
|
||||
|
||||
virtual ~PANEL_KICAD_LAUNCHER() = default;
|
||||
~PANEL_KICAD_LAUNCHER();
|
||||
|
||||
void CreateLaunchers();
|
||||
|
||||
|
||||
@@ -260,6 +260,9 @@ KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& titl
|
||||
|
||||
KICAD_MANAGER_FRAME::~KICAD_MANAGER_FRAME()
|
||||
{
|
||||
Unbind( wxEVT_CHAR, &TOOL_DISPATCHER::DispatchWxEvent, m_toolDispatcher );
|
||||
Unbind( wxEVT_CHAR_HOOK, &TOOL_DISPATCHER::DispatchWxEvent, m_toolDispatcher );
|
||||
|
||||
Pgm().GetBackgroundJobMonitor().UnregisterStatusBar( (KISTATUSBAR*) GetStatusBar() );
|
||||
Pgm().GetNotificationsManager().UnregisterStatusBar( (KISTATUSBAR*) GetStatusBar() );
|
||||
|
||||
|
||||
+1
-1
@@ -242,7 +242,7 @@ void KICAD_MANAGER_FRAME::RecreateBaseHToolbar()
|
||||
else
|
||||
{
|
||||
m_mainToolBar = new ACTION_TOOLBAR( this, ID_H_TOOLBAR, wxDefaultPosition, wxDefaultSize,
|
||||
KICAD_AUI_TB_STYLE | wxAUI_TB_HORZ_LAYOUT );
|
||||
KICAD_AUI_TB_STYLE | wxAUI_TB_VERTICAL );
|
||||
m_mainToolBar->SetAuiManager( &m_auimgr );
|
||||
}
|
||||
|
||||
|
||||
@@ -210,6 +210,10 @@ PROJECT_TREE_PANE::PROJECT_TREE_PANE( KICAD_MANAGER_FRAME* parent ) :
|
||||
|
||||
PROJECT_TREE_PANE::~PROJECT_TREE_PANE()
|
||||
{
|
||||
Disconnect( wxEVT_FSWATCHER,
|
||||
wxFileSystemWatcherEventHandler( PROJECT_TREE_PANE::onFileSystemEvent ) );
|
||||
Unbind( wxEVT_SYS_COLOUR_CHANGED,
|
||||
wxSysColourChangedEventHandler( PROJECT_TREE_PANE::onThemeChanged ), this );
|
||||
shutdownFileWatcher();
|
||||
}
|
||||
|
||||
|
||||
@@ -1223,7 +1223,7 @@ const SHAPE_LINE_CHAIN SHAPE_LINE_CHAIN::Slice( int aStartIndex, int aEndIndex )
|
||||
const SHAPE_ARC& arcToSplit = Arc( arcToSplitIndex );
|
||||
|
||||
// Copy the points as arc points
|
||||
for( size_t i = aStartIndex; arcToSplitIndex == ArcIndex( i ); i++ )
|
||||
for( size_t i = aStartIndex; i < m_points.size() && arcToSplitIndex == ArcIndex( i ); i++ )
|
||||
{
|
||||
rv.m_points.push_back( m_points[i] );
|
||||
rv.m_shapes.push_back( { rv.m_arcs.size(), SHAPE_IS_PT } );
|
||||
@@ -1320,6 +1320,8 @@ const SHAPE_LINE_CHAIN SHAPE_LINE_CHAIN::Slice( int aStartIndex, int aEndIndex )
|
||||
|
||||
}
|
||||
|
||||
wxASSERT( rv.m_points.size() == rv.m_shapes.size() );
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
@@ -2196,6 +2198,14 @@ void SHAPE_LINE_CHAIN::Simplify( int aMaxError )
|
||||
new_shapes.push_back( m_shapes.back() );
|
||||
}
|
||||
|
||||
// If we are not closed, then the start and end points of the original line need to
|
||||
// be the start and end points of the new line.
|
||||
if( !m_closed && m_points.back() != new_points.back() )
|
||||
{
|
||||
new_points.push_back( m_points.back() );
|
||||
new_shapes.push_back( m_shapes.back() );
|
||||
}
|
||||
|
||||
m_points.clear();
|
||||
m_shapes.clear();
|
||||
m_points = new_points;
|
||||
|
||||
@@ -78,8 +78,8 @@ namespace SEXPR
|
||||
return str;
|
||||
}
|
||||
|
||||
std::unique_ptr<SEXPR> PARSER::parseString(
|
||||
const std::string& aString, std::string::const_iterator& it )
|
||||
std::unique_ptr<SEXPR> PARSER::parseString( const std::string& aString,
|
||||
std::string::const_iterator& it )
|
||||
{
|
||||
for( ; it != aString.end(); ++it )
|
||||
{
|
||||
@@ -101,7 +101,7 @@ namespace SEXPR
|
||||
if( *it == '\n' )
|
||||
m_lineNumber++;
|
||||
|
||||
if( whitespaceCharacters.find(*it) != std::string::npos )
|
||||
if( whitespaceCharacters.find( *it ) != std::string::npos )
|
||||
{
|
||||
std::advance( it, 1 );
|
||||
continue;
|
||||
|
||||
@@ -115,10 +115,12 @@ int PL_DRAWING_TOOLS::PlaceItem( const TOOL_EVENT& aEvent )
|
||||
setCursor();
|
||||
cursorPos = getViewControls()->GetCursorPosition( !evt->DisableGridSnapping() );
|
||||
|
||||
if( evt->IsCancelInteractive() )
|
||||
if( evt->IsCancelInteractive() || ( item && evt->IsAction( &ACTIONS::undo ) ) )
|
||||
{
|
||||
if( item )
|
||||
{
|
||||
cleanup();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_frame->PopTool( aEvent );
|
||||
@@ -143,7 +145,8 @@ int PL_DRAWING_TOOLS::PlaceItem( const TOOL_EVENT& aEvent )
|
||||
}
|
||||
else if( evt->IsClick( BUT_LEFT ) )
|
||||
{
|
||||
// First click creates...
|
||||
bool placeItem = true;
|
||||
|
||||
if( !item )
|
||||
{
|
||||
DS_DATA_ITEM* dataItem = m_frame->AddDrawingSheetItem( type );
|
||||
@@ -163,10 +166,14 @@ int PL_DRAWING_TOOLS::PlaceItem( const TOOL_EVENT& aEvent )
|
||||
|
||||
// update the cursor so it looks correct before another event
|
||||
setCursor();
|
||||
|
||||
// Text is a single-click-place; all others are first-click-creates,
|
||||
// second-click-places.
|
||||
placeItem = dataItem->GetType() == DS_DATA_ITEM::DS_TEXT;
|
||||
}
|
||||
}
|
||||
// ... and second click places:
|
||||
else
|
||||
|
||||
if( item && placeItem )
|
||||
{
|
||||
item->GetPeer()->MoveStartPointToIU( cursorPos );
|
||||
item->SetPosition( item->GetPeer()->GetStartPosIU( 0 ) );
|
||||
@@ -249,7 +256,7 @@ int PL_DRAWING_TOOLS::DrawShape( const TOOL_EVENT& aEvent )
|
||||
|
||||
VECTOR2I cursorPos = getViewControls()->GetCursorPosition( !evt->DisableGridSnapping() );
|
||||
|
||||
if( evt->IsCancelInteractive() || evt->IsActivate() )
|
||||
if( evt->IsCancelInteractive() || ( item && evt->IsAction( &ACTIONS::undo ) ) )
|
||||
{
|
||||
m_toolMgr->RunAction( PL_ACTIONS::clearSelection );
|
||||
|
||||
@@ -260,13 +267,26 @@ int PL_DRAWING_TOOLS::DrawShape( const TOOL_EVENT& aEvent )
|
||||
// Pop the undo stack and delete the item being placed
|
||||
m_frame->RollbackFromUndo();
|
||||
}
|
||||
else if( evt->IsCancelInteractive() )
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if( evt->IsActivate() )
|
||||
{
|
||||
if( item )
|
||||
{
|
||||
item = nullptr;
|
||||
|
||||
if( evt->IsActivate() && !evt->IsPointEditor() && !evt->IsMoveTool() )
|
||||
// Pop the undo stack and delete the item being placed
|
||||
m_frame->RollbackFromUndo();
|
||||
}
|
||||
|
||||
if( evt->IsPointEditor() || evt->IsMoveTool() )
|
||||
{
|
||||
// leave ourselves on the stack so we come back after the move
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if( evt->IsClick( BUT_LEFT ) )
|
||||
{
|
||||
|
||||
+13
-10
@@ -2208,18 +2208,21 @@ bool BOARD::GetBoardPolygonOutlines( SHAPE_POLY_SET& aOutlines,
|
||||
SHAPE_POLY_SET hole;
|
||||
pad->TransformHoleToPolygon( hole, 0, GetDesignSettings().m_MaxError, ERROR_INSIDE );
|
||||
|
||||
// Add this pad hole to the main outline
|
||||
// But we can have more than one main outline (i.e. more than one board), so
|
||||
// search the right main outline i.e. the outline that contains the pad hole
|
||||
SHAPE_LINE_CHAIN& pad_hole = hole.Outline( 0 );
|
||||
const VECTOR2I holePt = pad_hole.CPoint( 0 );
|
||||
|
||||
for( int jj = 0; jj < aOutlines.OutlineCount(); ++jj )
|
||||
if( hole.OutlineCount() > 0 ) // can be not the case for malformed NPTH holes
|
||||
{
|
||||
if( aOutlines.Outline( jj ).PointInside( holePt ) )
|
||||
// Add this pad hole to the main outline
|
||||
// But we can have more than one main outline (i.e. more than one board), so
|
||||
// search the right main outline i.e. the outline that contains the pad hole
|
||||
SHAPE_LINE_CHAIN& pad_hole = hole.Outline( 0 );
|
||||
const VECTOR2I holePt = pad_hole.CPoint( 0 );
|
||||
|
||||
for( int jj = 0; jj < aOutlines.OutlineCount(); ++jj )
|
||||
{
|
||||
aOutlines.AddHole( pad_hole, jj );
|
||||
break;
|
||||
if( aOutlines.Outline( jj ).PointInside( holePt ) )
|
||||
{
|
||||
aOutlines.AddHole( pad_hole, jj );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+24
-10
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2016 CERN
|
||||
* Copyright (C) 2020-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2020-2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -464,15 +464,6 @@ void BOARD_COMMIT::Push( const wxString& aMessage, int aCommitFlags )
|
||||
} );
|
||||
}
|
||||
|
||||
if( bulkAddedItems.size() > 0 )
|
||||
board->FinalizeBulkAdd( bulkAddedItems );
|
||||
|
||||
if( bulkRemovedItems.size() > 0 )
|
||||
board->FinalizeBulkRemove( bulkRemovedItems );
|
||||
|
||||
if( itemsChanged.size() > 0 )
|
||||
board->OnItemsChanged( itemsChanged );
|
||||
|
||||
if( m_isBoardEditor )
|
||||
{
|
||||
size_t num_changes = m_changes.size();
|
||||
@@ -501,8 +492,13 @@ void BOARD_COMMIT::Push( const wxString& aMessage, int aCommitFlags )
|
||||
}
|
||||
|
||||
if( !staleTeardropPadsAndVias.empty() || !staleTeardropTracks.empty() )
|
||||
{
|
||||
teardropMgr.UpdateTeardrops( *this, &staleTeardropPadsAndVias, &staleTeardropTracks );
|
||||
|
||||
// UpdateTeardrops() can modify the ratsnest data. So rebuild this ratsnest data
|
||||
connectivity->RecalculateRatsnest( this );
|
||||
}
|
||||
|
||||
// Log undo items for any connectivity or teardrop changes
|
||||
for( size_t i = num_changes; i < m_changes.size(); ++i )
|
||||
{
|
||||
@@ -535,6 +531,15 @@ void BOARD_COMMIT::Push( const wxString& aMessage, int aCommitFlags )
|
||||
}
|
||||
}
|
||||
|
||||
if( bulkAddedItems.size() > 0 )
|
||||
board->FinalizeBulkAdd( bulkAddedItems );
|
||||
|
||||
if( bulkRemovedItems.size() > 0 )
|
||||
board->FinalizeBulkRemove( bulkRemovedItems );
|
||||
|
||||
if( itemsChanged.size() > 0 )
|
||||
board->OnItemsChanged( itemsChanged );
|
||||
|
||||
if( frame )
|
||||
{
|
||||
if( !( aCommitFlags & SKIP_UNDO ) )
|
||||
@@ -563,6 +568,15 @@ void BOARD_COMMIT::Push( const wxString& aMessage, int aCommitFlags )
|
||||
frame->OnModify();
|
||||
else
|
||||
frame->Update3DView( true, frame->GetPcbNewSettings()->m_Display.m_Live3DRefresh );
|
||||
|
||||
// Ensure the message panel is updated after committing changes.
|
||||
// By default (i.e. if no event posted), display the updated board info
|
||||
if( !itemsDeselected && !autofillZones && !selectedModified )
|
||||
{
|
||||
std::vector<MSG_PANEL_ITEM> msg_list;
|
||||
board->GetMsgPanelInfo( frame, msg_list );
|
||||
frame->SetMsgPanel( msg_list );
|
||||
}
|
||||
}
|
||||
|
||||
clear();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user