Compare commits
396 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e8553dcdf7 | |||
| dc3012933a | |||
| 291ff615bc | |||
| 26d1080e52 | |||
| c1452a24d2 | |||
| 34c833966f | |||
| f0e1bc3562 | |||
| 6da9034322 | |||
| 6887e8cbe3 | |||
| 89ef5986e7 | |||
| 5572a72bb3 | |||
| b40e446149 | |||
| 757bfd7b32 | |||
| c5e1c3db62 | |||
| b25ff44ff7 | |||
| cad7a18fa0 | |||
| 1c3637cb33 | |||
| 3a5f84d1ec | |||
| 44f8df592b | |||
| 17e19f8652 | |||
| 34fe104431 | |||
| 2bdb155838 | |||
| 22ebade907 | |||
| 9d594214fe | |||
| 2c89717c0a | |||
| 7574a46a19 | |||
| e5c4d75ce1 | |||
| f038ee3083 | |||
| e1ab2a0836 | |||
| 9070d9ff22 | |||
| 606c19780d | |||
| 8fecebb209 | |||
| da8e1be1c8 | |||
| e14a3caf18 | |||
| 5afb3ad5cc | |||
| b29ca47f25 | |||
| 5d1737d654 | |||
| bdc371f057 | |||
| dc2dd20ec7 | |||
| 057174caa0 | |||
| 4b035d5b5c | |||
| b22948988f | |||
| 7a05d58b3e | |||
| 695ab290e6 | |||
| 54a373a7e2 | |||
| 637f331724 | |||
| 931a9697ca | |||
| 5ffc58844f | |||
| 3ea2c6f1ff | |||
| 2cba724659 | |||
| 254260a616 | |||
| 45b13d513b | |||
| ba86c3ac75 | |||
| 19d4c31fcc | |||
| 160f69d720 | |||
| 4fa42960e9 | |||
| 9c4ca6da14 | |||
| c113385016 | |||
| 68e37a93ec | |||
| 9b158e70f5 | |||
| ab536192c3 | |||
| bc87b0db60 | |||
| 981f82db93 | |||
| b6f5aeba1e | |||
| 4fa34677ea | |||
| c67346991f | |||
| 811de6a462 | |||
| cfe7992723 | |||
| 8c84f2ac23 | |||
| fb23d62b6b | |||
| 84f182ef03 | |||
| 987d151977 | |||
| c622da5fbf | |||
| 19f163b724 | |||
| 3fcf207443 | |||
| 4814f29fbd | |||
| 39f4ea5ffa | |||
| 5d08531ecb | |||
| 4a0fdfd2ab | |||
| c88aab3a4f | |||
| bf4aebff4d | |||
| 39627bfcfa | |||
| 55fafe3401 | |||
| dd870deec5 | |||
| 7ecf18ba80 | |||
| 68e4ccf196 | |||
| 0a28398944 | |||
| 27002f568b | |||
| 9b5840b7ee | |||
| 5a3f8b4235 | |||
| 7be78d50a4 | |||
| b1f861137e | |||
| 3e3a958d4f | |||
| cc5a3eb61f | |||
| eabf2f57aa | |||
| 1667b1312e | |||
| 1123a25f04 | |||
| ef757ffd28 | |||
| f63d018f1c | |||
| 83de056de9 | |||
| 015906d862 | |||
| c288c469fb | |||
| 7a8efc1d27 | |||
| aaaa8a8835 | |||
| 2891c580b1 | |||
| 97d75ae844 | |||
| 7ccc89196b | |||
| 7774145a8f | |||
| 0bf2d2ca32 | |||
| 6338a69f17 | |||
| 5f8ba6f9a1 | |||
| a53bbd92f5 | |||
| aa71423d5f | |||
| f3ae7afec2 | |||
| 29194761e5 | |||
| f56c05ac3e | |||
| 15256b379c | |||
| b4113decc5 | |||
| b249932888 | |||
| 6b6057b194 | |||
| b9623e9359 | |||
| 735b05ba30 | |||
| 62724f9cb6 | |||
| 2e4dd4bc3f | |||
| 87139ce571 | |||
| 582d2e7bdb | |||
| 5c89937870 | |||
| 412e244d48 | |||
| 0940565025 | |||
| c5b2e859c1 | |||
| e06a8131c5 | |||
| 16dee8608b | |||
| 396e531e7c | |||
| 24c234fd93 | |||
| fdbe35e20c | |||
| cc3e3ee34c | |||
| d0da1725ca | |||
| 7e115249af | |||
| 07e8edfcdf | |||
| cbb2c187bd | |||
| 011018b002 | |||
| d3a44607e6 | |||
| 1ad3532740 | |||
| 26caad8b35 | |||
| f1da2e90d7 | |||
| 59492bd947 | |||
| 7b96cc3d0c | |||
| df873158bc | |||
| f88e1aa279 | |||
| a02f12c68a | |||
| cc141e346d | |||
| f5954b0d7d | |||
| 6bb1e59e10 | |||
| ced6b1cbb7 | |||
| d1d7d0eb05 | |||
| e1e196f1b1 | |||
| b55d760cd5 | |||
| b0a0408528 | |||
| d238a149a6 | |||
| 57d2f7209a | |||
| 8d08992c24 | |||
| 9938e7f723 | |||
| 17ad578675 | |||
| 044dd59c5c | |||
| 6ef90cfa18 | |||
| 7abf4c2d91 | |||
| 896ff72019 | |||
| 9c2eeb54fc | |||
| 69f583660f | |||
| 6334c733e1 | |||
| a50144f889 | |||
| 1ed85d521d | |||
| 793790b359 | |||
| 154112d4cc | |||
| 97d8ddeb4f | |||
| 4809b00206 | |||
| 5bc1040a8b | |||
| f6c8dbe81e | |||
| 0280989920 | |||
| 0b762fb804 | |||
| b71eb1186f | |||
| c78273cb99 | |||
| 26b8978b3e | |||
| 618bbfda8d | |||
| ee573a1480 | |||
| 20efc3b6e6 | |||
| 8632e74c5c | |||
| 6f35fd7058 | |||
| 761bfcd291 | |||
| 7663928a66 | |||
| dd3c846f4a | |||
| 6877bc32bc | |||
| 64564825c7 | |||
| b1ec1011b6 | |||
| 80539790c3 | |||
| 981772887a | |||
| 896b80652f | |||
| 968cf4267a | |||
| f3567cda99 | |||
| df372baff8 | |||
| dec96e6a77 | |||
| 8a1de8c6f8 | |||
| 255975f5fd | |||
| aa608ca147 | |||
| 682b74f7d2 | |||
| d662b2c34b | |||
| 7740c66479 | |||
| 4d4f6a810c | |||
| d74dca3a7a | |||
| 6513ca9168 | |||
| 6782bb73bd | |||
| 9c35689b04 | |||
| 8aff7cad17 | |||
| c2c6cad525 | |||
| 9b17ec5d2d | |||
| e971f90adc | |||
| 06c61a4831 | |||
| 7977f0f745 | |||
| 38a2b8eba7 | |||
| 951f0065ed | |||
| 22c06c7ed8 | |||
| 4f086271aa | |||
| 297999cb43 | |||
| 91aec9ac7f | |||
| 9105b380c3 | |||
| a285f86240 | |||
| b2f8a43c24 | |||
| 8383165269 | |||
| bc8af77aba | |||
| 7d0e1670ee | |||
| 877f7daa2b | |||
| 4c563e5ef3 | |||
| d6d6075a60 | |||
| 49c528f3ef | |||
| ae1bccfb85 | |||
| c2c13a5226 | |||
| 5b2e0d113a | |||
| 7ee8f786f2 | |||
| bd14224b42 | |||
| ccfec170b0 | |||
| 9852b535e7 | |||
| 758ac90069 | |||
| 697ff382f8 | |||
| 6b6aa84158 | |||
| a0d219c2d1 | |||
| 8af1af7f76 | |||
| 991d5812e2 | |||
| b019ce4515 | |||
| 168a1b3e75 | |||
| e8a6e579e4 | |||
| f2b1422ed5 | |||
| 63f4d45665 | |||
| 96ab1e47c9 | |||
| 4d69d966ee | |||
| e9294bee9e | |||
| d2b052b12c | |||
| 34f0a97cca | |||
| ad5ca38cc2 | |||
| 58bd7f3b24 | |||
| 5b2b4832d4 | |||
| a3618cbfeb | |||
| 8c6edc0414 | |||
| 1308fd7c4a | |||
| b241e09914 | |||
| 0a29c0dea3 | |||
| 8832b22952 | |||
| 33b93a3824 | |||
| b589da63d8 | |||
| 48077d77c4 | |||
| a605c4b6ff | |||
| 092ce30b40 | |||
| 28eb6dab97 | |||
| fb82130530 | |||
| a3d218ffbc | |||
| 471f72a340 | |||
| 2abbc601a0 | |||
| 522f1c7bea | |||
| 828f32649f | |||
| b39b54a92e | |||
| 6a55a47276 | |||
| 648d463b32 | |||
| 489f345fb2 | |||
| e308d65108 | |||
| ee0be76fb4 | |||
| 813fce2d2d | |||
| e0a27b430a | |||
| 73b2180c06 | |||
| b3f53ac862 | |||
| 9b49fc5a0d | |||
| 03c71b22d5 | |||
| 7d79bebcc6 | |||
| 5c2300022b | |||
| 91b042990f | |||
| 265e2d61be | |||
| df3924421d | |||
| 4ee2a007eb | |||
| b19a47fa2a | |||
| 7f3ca3b889 | |||
| a3d64d604c | |||
| 006f0a95c1 | |||
| 6afd865259 | |||
| d319cd4b89 | |||
| 566fefafc5 | |||
| 66bd0f850a | |||
| 491bb6e57a | |||
| 4fe74a9870 | |||
| 8f03f7c367 | |||
| 7f690d596b | |||
| be4c2715ab | |||
| 02f8260e18 | |||
| a8871fdda4 | |||
| d552ce00aa | |||
| 37dd7c6df9 | |||
| a5cbcd4abe | |||
| 4ede6f61b2 | |||
| 994c1c971a | |||
| ebdfeb4c0a | |||
| e1ffd956e6 | |||
| 3f4dc01d97 | |||
| be192d5df0 | |||
| efc35dec74 | |||
| 096566e857 | |||
| 944ee4af7d | |||
| 245894e8eb | |||
| 74abb40e84 | |||
| 1eb2983efe | |||
| 63b3e0cc4f | |||
| a8b127019c | |||
| 4d0ca33b47 | |||
| e2c53df13b | |||
| 03dd6c7a8e | |||
| bdd5a752dc | |||
| 8dbdc3717c | |||
| f60b76696a | |||
| 695505fc71 | |||
| b34dbf58c5 | |||
| 1fb19c0d81 | |||
| d6162196ec | |||
| 3ea314cb9f | |||
| 9d51fabe9b | |||
| c6b483acb9 | |||
| 96370f6665 | |||
| ad7bd9b5f8 | |||
| 2a1ef2d09d | |||
| 9f9fa0dd8d | |||
| 6ecfa65c4c | |||
| 831d438852 | |||
| a9b5b1728a | |||
| d304a30155 | |||
| 02ca96df48 | |||
| 5ca3414707 | |||
| 76a68b1f8d | |||
| 41ebd3c560 | |||
| fbc75656f4 | |||
| b882defb28 | |||
| 7d7decafd4 | |||
| 8705bea9ab | |||
| 64da49f22e | |||
| 0c9554a325 | |||
| dc24d13fef | |||
| 78cbb8e994 | |||
| ddd0ccbefd | |||
| f5797d367f | |||
| 89dff6411b | |||
| 093da7f73a | |||
| 2215e8906f | |||
| d34df3e951 | |||
| 044a2305e3 | |||
| 05264424b3 | |||
| 3e59c40283 | |||
| 2a99464fc1 | |||
| 412da66cf6 | |||
| c6215b08ed | |||
| 769060c584 | |||
| 0b48a66cb0 | |||
| 836b3219c1 | |||
| 2c0010fbcb | |||
| c1ed2506f9 | |||
| 299495a0aa | |||
| 6f3b6e3ad8 | |||
| cb9d78b46c | |||
| 46b3dcba4f | |||
| 06150388d8 | |||
| b07de4f6af | |||
| 6dd5422137 | |||
| 546ca18662 | |||
| de0f6ecf68 | |||
| 995c1a179e | |||
| bee4856a7f | |||
| 9721559005 | |||
| 7a1ab44207 | |||
| d269513857 | |||
| b4928f20a6 | |||
| 05d2893ac1 | |||
| 7ea205222d | |||
| e853b593b1 |
@@ -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:
|
||||
|
||||
@@ -103,11 +103,6 @@ EDA_3D_MODEL_VIEWER::EDA_3D_MODEL_VIEWER( wxWindow* aParent, const int* aAttribL
|
||||
m_BiuTo3dUnits = 1.0;
|
||||
|
||||
m_glRC = nullptr;
|
||||
|
||||
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
|
||||
|
||||
const DPI_SCALING_COMMON dpi{ settings, this };
|
||||
SetScaleFactor( dpi.GetScaleFactor() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -812,9 +812,6 @@ void EDA_3D_VIEWER_FRAME::loadCommonSettings()
|
||||
|
||||
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
|
||||
|
||||
const DPI_SCALING_COMMON dpi{ settings, this };
|
||||
m_canvas->SetScaleFactor( dpi.GetScaleFactor() );
|
||||
|
||||
// TODO(JE) use all control options
|
||||
m_boardAdapter.m_MousewheelPanning = settings->m_Input.scroll_modifier_zoom != 0;
|
||||
}
|
||||
|
||||
@@ -210,9 +210,6 @@ void PANEL_PREVIEW_3D_MODEL::loadSettings()
|
||||
|
||||
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
|
||||
|
||||
const DPI_SCALING_COMMON dpi{ settings, this };
|
||||
m_previewPane->SetScaleFactor( dpi.GetScaleFactor() );
|
||||
|
||||
// TODO(JE) use all control options
|
||||
m_boardAdapter.m_MousewheelPanning = settings->m_Input.scroll_modifier_zoom != 0;
|
||||
|
||||
@@ -444,10 +441,15 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementScale( wxSpinEvent& event, double aSign
|
||||
else if( spinCtrl == m_spinZscale )
|
||||
textCtrl = zscale;
|
||||
|
||||
double step = SCALE_INCREMENT;
|
||||
|
||||
if( wxGetMouseState().ShiftDown( ) )
|
||||
step = SCALE_INCREMENT_FINE;
|
||||
|
||||
double curr_value = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, EDA_UNITS::UNSCALED,
|
||||
textCtrl->GetValue() );
|
||||
|
||||
curr_value += ( SCALE_INCREMENT * aSign );
|
||||
curr_value += ( step * aSign );
|
||||
curr_value = std::max( 1/MAX_SCALE, curr_value );
|
||||
curr_value = std::min( curr_value, MAX_SCALE );
|
||||
|
||||
@@ -465,10 +467,15 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementRotation( wxSpinEvent& aEvent, double aS
|
||||
else if( spinCtrl == m_spinZrot )
|
||||
textCtrl = zrot;
|
||||
|
||||
double step = ROTATION_INCREMENT;
|
||||
|
||||
if( wxGetMouseState().ShiftDown( ) )
|
||||
step = ROTATION_INCREMENT_FINE;
|
||||
|
||||
double curr_value = EDA_UNIT_UTILS::UI::DoubleValueFromString( unityScale, EDA_UNITS::DEGREES,
|
||||
textCtrl->GetValue() );
|
||||
|
||||
curr_value += ( ROTATION_INCREMENT * aSign );
|
||||
curr_value += ( step * aSign );
|
||||
curr_value = std::max( -MAX_ROTATION, curr_value );
|
||||
curr_value = std::min( curr_value, MAX_ROTATION );
|
||||
|
||||
@@ -488,16 +495,22 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementOffset( wxSpinEvent& event, double aSign
|
||||
textCtrl = zoff;
|
||||
|
||||
double step_mm = OFFSET_INCREMENT_MM;
|
||||
double curr_value_mm =
|
||||
EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, m_userUnits,
|
||||
textCtrl->GetValue() )
|
||||
/ pcbIUScale.IU_PER_MM;
|
||||
|
||||
if( wxGetMouseState().ShiftDown( ) )
|
||||
step_mm = OFFSET_INCREMENT_MM_FINE;
|
||||
|
||||
if( m_userUnits == EDA_UNITS::MILS || m_userUnits == EDA_UNITS::INCHES )
|
||||
{
|
||||
step_mm = 25.4*OFFSET_INCREMENT_MIL/1000;
|
||||
|
||||
if( wxGetMouseState().ShiftDown( ) )
|
||||
step_mm = 25.4*OFFSET_INCREMENT_MIL_FINE/1000;;
|
||||
}
|
||||
|
||||
double curr_value_mm = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, m_userUnits,
|
||||
textCtrl->GetValue() )
|
||||
/ pcbIUScale.IU_PER_MM;
|
||||
|
||||
curr_value_mm += ( step_mm * aSign );
|
||||
curr_value_mm = std::max( -MAX_OFFSET, curr_value_mm );
|
||||
curr_value_mm = std::min( curr_value_mm, MAX_OFFSET );
|
||||
@@ -533,10 +546,10 @@ void PANEL_PREVIEW_3D_MODEL::onMouseWheelRot( wxMouseEvent& event )
|
||||
{
|
||||
wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
|
||||
|
||||
double step = ROTATION_INCREMENT_WHEEL;
|
||||
double step = ROTATION_INCREMENT;
|
||||
|
||||
if( event.ShiftDown( ) )
|
||||
step = ROTATION_INCREMENT_WHEEL_FINE;
|
||||
step = ROTATION_INCREMENT_FINE;
|
||||
|
||||
if( event.GetWheelRotation() >= 0 )
|
||||
step = -step;
|
||||
|
||||
@@ -43,9 +43,8 @@
|
||||
#define SCALE_INCREMENT_FINE 0.02
|
||||
#define SCALE_INCREMENT 0.1
|
||||
|
||||
#define ROTATION_INCREMENT 90 // in degrees, for spin button command
|
||||
#define ROTATION_INCREMENT_WHEEL 90 // in degrees, for mouse wheel command
|
||||
#define ROTATION_INCREMENT_WHEEL_FINE 1 // in degrees, for mouse wheel command
|
||||
#define ROTATION_INCREMENT 90 // in degrees
|
||||
#define ROTATION_INCREMENT_FINE 1 // in degrees
|
||||
|
||||
#define OFFSET_INCREMENT_MM 0.5
|
||||
#define OFFSET_INCREMENT_MM_FINE 0.1
|
||||
|
||||
@@ -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.3" )
|
||||
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 )
|
||||
|
||||
@@ -627,7 +627,6 @@ bool DATABASE_CONNECTION::selectAllAndCache( const std::string& aTable, const st
|
||||
}
|
||||
}
|
||||
|
||||
m_cache->Put( aTable, cacheEntry );
|
||||
wxASSERT( result.count( aKey ) );
|
||||
std::string keyStr = std::any_cast<std::string>( result.at( aKey ) );
|
||||
cacheEntry[keyStr] = result;
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <pgm_base.h>
|
||||
#include <widgets/wx_grid.h>
|
||||
#include <widgets/grid_text_button_helpers.h>
|
||||
#include <widgets/grid_text_helpers.h>
|
||||
#include <widgets/std_bitmap_button.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@@ -49,7 +49,7 @@ DIALOG_CONFIGURE_PATHS_BASE::DIALOG_CONFIGURE_PATHS_BASE( wxWindow* parent, wxWi
|
||||
// Label Appearance
|
||||
|
||||
// Cell Defaults
|
||||
m_EnvVars->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
|
||||
m_EnvVars->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
|
||||
m_EnvVars->SetMinSize( wxSize( 604,170 ) );
|
||||
|
||||
sbEnvVars->Add( m_EnvVars, 1, wxALL|wxEXPAND, 5 );
|
||||
@@ -70,7 +70,7 @@ DIALOG_CONFIGURE_PATHS_BASE::DIALOG_CONFIGURE_PATHS_BASE( wxWindow* parent, wxWi
|
||||
sbEnvVars->Add( bSizerEnvVarBtns, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerMain->Add( sbEnvVars, 1, wxEXPAND|wxALL, 5 );
|
||||
bSizerMain->Add( sbEnvVars, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_sdbSizer = new wxStdDialogButtonSizer();
|
||||
m_sdbSizerOK = new wxButton( this, wxID_OK );
|
||||
|
||||
@@ -62,109 +62,23 @@
|
||||
<property name="name">bSizerMain</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxTOP</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxGrid" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="autosize_cols">0</property>
|
||||
<property name="autosize_rows">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="cell_bg"></property>
|
||||
<property name="cell_font"></property>
|
||||
<property name="cell_horiz_alignment">wxALIGN_LEFT</property>
|
||||
<property name="cell_text"></property>
|
||||
<property name="cell_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="col_label_horiz_alignment">wxALIGN_CENTER</property>
|
||||
<property name="col_label_size">wxGRID_AUTOSIZE</property>
|
||||
<property name="col_label_values">"Environment Variables" "Path" ""</property>
|
||||
<property name="col_label_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="cols">2</property>
|
||||
<property name="column_sizes">150,454</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_col_move">0</property>
|
||||
<property name="drag_col_size">1</property>
|
||||
<property name="drag_grid_size">0</property>
|
||||
<property name="drag_row_size">1</property>
|
||||
<property name="editing">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="grid_line_color"></property>
|
||||
<property name="grid_lines">1</property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label_bg"></property>
|
||||
<property name="label_font"></property>
|
||||
<property name="label_text"></property>
|
||||
<property name="margin_height">0</property>
|
||||
<property name="margin_width">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">604,170</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_EnvVars</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="row_label_horiz_alignment">wxALIGN_CENTER</property>
|
||||
<property name="row_label_size">0</property>
|
||||
<property name="row_label_values"></property>
|
||||
<property name="row_label_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="row_sizes"></property>
|
||||
<property name="rows">1</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="subclass">WX_GRID; widgets/wx_grid.h; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnSize">OnGridSize</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Environment Variables</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerEnvVarBtns</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="name">sbEnvVars</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="parent">1</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBitmapButton" expanded="1">
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxGrid" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
@@ -173,209 +87,251 @@
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="autosize_cols">0</property>
|
||||
<property name="autosize_rows">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="cell_bg"></property>
|
||||
<property name="cell_font"></property>
|
||||
<property name="cell_horiz_alignment">wxALIGN_LEFT</property>
|
||||
<property name="cell_text"></property>
|
||||
<property name="cell_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="col_label_horiz_alignment">wxALIGN_CENTER</property>
|
||||
<property name="col_label_size">wxGRID_AUTOSIZE</property>
|
||||
<property name="col_label_values">"Name" "Path"</property>
|
||||
<property name="col_label_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="cols">2</property>
|
||||
<property name="column_sizes">150,454</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_col_move">0</property>
|
||||
<property name="drag_col_size">1</property>
|
||||
<property name="drag_grid_size">0</property>
|
||||
<property name="drag_row_size">1</property>
|
||||
<property name="editing">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="focus"></property>
|
||||
<property name="font"></property>
|
||||
<property name="grid_line_color"></property>
|
||||
<property name="grid_lines">1</property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Add Environment Variable</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">0</property>
|
||||
<property name="label_bg"></property>
|
||||
<property name="label_font"></property>
|
||||
<property name="label_text"></property>
|
||||
<property name="margin_height">0</property>
|
||||
<property name="margin_width">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="minimum_size">604,170</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_btnAddEnvVar</property>
|
||||
<property name="name">m_EnvVars</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="row_label_horiz_alignment">wxALIGN_CENTER</property>
|
||||
<property name="row_label_size">0</property>
|
||||
<property name="row_label_values"></property>
|
||||
<property name="row_label_vert_alignment">wxALIGN_CENTER</property>
|
||||
<property name="row_sizes"></property>
|
||||
<property name="rows">1</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare</property>
|
||||
<property name="subclass">WX_GRID; widgets/wx_grid.h; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnAddEnvVar</event>
|
||||
<event name="OnSize">OnGridSize</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerEnvVarBtns</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBitmapButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="focus"></property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Add Environment Variable</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_btnAddEnvVar</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnAddEnvVar</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBitmapButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="focus"></property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Delete Environment Variable</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_btnDeleteEnvVar</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnRemoveEnvVar</event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBitmapButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="focus"></property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Delete Environment Variable</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_btnDeleteEnvVar</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnRemoveEnvVar</event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticLine" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticline1</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxLI_HORIZONTAL</property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
|
||||
@@ -43,6 +43,9 @@ void DIALOG_EDIT_LIBRARY_TABLES::InstallPanel( wxPanel* aPanel )
|
||||
auto mainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
SetSizer( mainSizer );
|
||||
|
||||
m_infoBar = new WX_INFOBAR( this );
|
||||
mainSizer->Add( m_infoBar, 0, wxEXPAND, 0 );
|
||||
|
||||
mainSizer->Add( m_contentPanel, 1, wxEXPAND|wxLEFT|wxTOP|wxRIGHT, 5 );
|
||||
m_contentPanel->SetMinSize( FromDIP( wxSize( 1000, 600 ) ) );
|
||||
|
||||
|
||||
@@ -442,14 +442,11 @@ bool PANEL_SETUP_NETCLASSES::TransferDataFromWindow()
|
||||
wxString netclass = m_assignmentGrid->GetCellValue( row, 1 );
|
||||
|
||||
m_netSettings->m_NetClassPatternAssignments.push_back(
|
||||
{
|
||||
std::make_unique<EDA_COMBINED_MATCHER>( pattern, CTX_NETCLASS ),
|
||||
netclass
|
||||
} );
|
||||
|
||||
m_netSettings->m_NetClassPatternAssignmentCache.clear();
|
||||
{ std::make_unique<EDA_COMBINED_MATCHER>( pattern, CTX_NETCLASS ), netclass } );
|
||||
}
|
||||
|
||||
m_netSettings->m_NetClassPatternAssignmentCache.clear();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <project.h>
|
||||
#include <grid_tricks.h>
|
||||
#include <widgets/std_bitmap_button.h>
|
||||
#include <widgets/grid_text_helpers.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
@@ -648,8 +648,21 @@ void EDA_DRAW_PANEL_GAL::onShowTimer( wxTimerEvent& aEvent )
|
||||
|
||||
void EDA_DRAW_PANEL_GAL::SetCurrentCursor( KICURSOR aCursor )
|
||||
{
|
||||
if( m_gal )
|
||||
m_gal->SetNativeCursorStyle( aCursor );
|
||||
if( !m_gal )
|
||||
return;
|
||||
|
||||
DPI_SCALING_COMMON dpi( nullptr, m_parent );
|
||||
|
||||
bool hidpi = false;
|
||||
|
||||
// Cursor scaling factor cannot be set for a wxCursor on GTK and OSX (at least before wx 3.3),
|
||||
// resulting in 4x rendered size on 2x window scale.
|
||||
// MSW renders the bitmap as-is, without scaling, so this works here.
|
||||
#ifdef __WXMSW__
|
||||
hidpi = dpi.GetContentScaleFactor() >= 2.0;
|
||||
#endif
|
||||
|
||||
m_gal->SetNativeCursorStyle( aCursor, hidpi );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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() );
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <string_utils.h>
|
||||
#include <macros.h>
|
||||
#include <cstdint>
|
||||
#include <reporter.h>
|
||||
|
||||
#ifdef __WIN32__
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
@@ -37,6 +38,8 @@ using namespace fontconfig;
|
||||
static FONTCONFIG* g_config = nullptr;
|
||||
static bool g_fcInitSuccess = false;
|
||||
|
||||
REPORTER* FONTCONFIG::s_reporter = nullptr;
|
||||
|
||||
/**
|
||||
* A simple wrapper to avoid exporing fontconfig in the header
|
||||
*/
|
||||
@@ -57,6 +60,12 @@ FONTCONFIG::FONTCONFIG()
|
||||
};
|
||||
|
||||
|
||||
void fontconfig::FONTCONFIG::SetReporter( REPORTER* aReporter )
|
||||
{
|
||||
s_reporter = aReporter;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This is simply a wrapper to call FcInit() with SEH for Windows
|
||||
* SEH on Windows can only be used in functions without objects that might be unwinded
|
||||
@@ -195,6 +204,17 @@ FONTCONFIG::FF_RESULT FONTCONFIG::FindFont( const wxString &aFontName, wxString
|
||||
if( !g_fcInitSuccess )
|
||||
return retval;
|
||||
|
||||
// If the original font name contains any of these, then it is bold, regardless
|
||||
// of whether we are looking for bold or not
|
||||
if( aFontName.Lower().Contains( wxS( "bold" ) ) // also catches ultrabold
|
||||
|| aFontName.Lower().Contains( wxS( "heavy" ) )
|
||||
|| aFontName.Lower().Contains( wxS( "black" ) ) // also catches extrablack
|
||||
|| aFontName.Lower().Contains( wxS( "thick" ) )
|
||||
|| aFontName.Lower().Contains( wxS( "dark" ) ) )
|
||||
{
|
||||
aBold = true;
|
||||
}
|
||||
|
||||
wxString qualifiedFontName = aFontName;
|
||||
|
||||
wxScopedCharBuffer const fcBuffer = qualifiedFontName.ToUTF8();
|
||||
@@ -317,12 +337,18 @@ FONTCONFIG::FF_RESULT FONTCONFIG::FindFont( const wxString &aFontName, wxString
|
||||
|
||||
if( retval == FF_RESULT::FF_ERROR )
|
||||
{
|
||||
wxLogWarning( _( "Error loading font '%s'." ), qualifiedFontName );
|
||||
if( s_reporter )
|
||||
s_reporter->Report( wxString::Format( _( "Error loading font '%s'." ), qualifiedFontName ) );
|
||||
}
|
||||
else if( retval == FF_RESULT::FF_SUBSTITUTE )
|
||||
{
|
||||
fontName.Replace( ':', ' ' );
|
||||
wxLogWarning( _( "Font '%s' not found; substituting '%s'." ), qualifiedFontName, fontName );
|
||||
|
||||
// If we missed a case but the matching found the original font name, then we are not substituting
|
||||
if( fontName.CmpNoCase( qualifiedFontName ) == 0 )
|
||||
retval = FF_RESULT::FF_OK;
|
||||
else if( s_reporter )
|
||||
s_reporter->Report( wxString::Format( _( "Font '%s' not found; substituting '%s'." ), qualifiedFontName, fontName ) );
|
||||
}
|
||||
|
||||
FcPatternDestroy( pat );
|
||||
|
||||
@@ -190,7 +190,7 @@ static double roundp( double x )
|
||||
|
||||
const VECTOR2D CAIRO_GAL_BASE::roundp( const VECTOR2D& v )
|
||||
{
|
||||
if( m_lineWidthIsOdd && m_isStrokeEnabled )
|
||||
if( m_lineWidthIsOdd )
|
||||
return VECTOR2D( ::roundp( v.x ), ::roundp( v.y ) );
|
||||
else
|
||||
return VECTOR2D( floor( v.x + 0.5 ), floor( v.y + 0.5 ) );
|
||||
@@ -352,13 +352,18 @@ void CAIRO_GAL_BASE::DrawArc( const VECTOR2D& aCenterPoint, double aRadius,
|
||||
|
||||
double r = xform( aRadius );
|
||||
|
||||
// N.B. This is backwards. We set this because we want to adjust the center
|
||||
// point that changes both endpoints. In the worst case, this is twice as far.
|
||||
// We cannot adjust radius or center based on the other because this causes the
|
||||
// whole arc to change position/size
|
||||
m_lineWidthIsOdd = !( static_cast<int>( aRadius ) % 2 );
|
||||
// Adjust center and radius slightly to better match the rounding of endpoints.
|
||||
VECTOR2D mid = roundp( xform( aCenterPoint ) );
|
||||
|
||||
auto mid = roundp( xform( aCenterPoint ) );
|
||||
VECTOR2D startPointS = VECTOR2D( r, 0.0 );
|
||||
VECTOR2D endPointS = VECTOR2D( r, 0.0 );
|
||||
RotatePoint( startPointS, -EDA_ANGLE( startAngle, RADIANS_T ) );
|
||||
RotatePoint( endPointS, -EDA_ANGLE( endAngle, RADIANS_T ) );
|
||||
|
||||
VECTOR2D refStart = roundp( xform( aCenterPoint ) + startPointS );
|
||||
VECTOR2D refEnd = roundp( xform( aCenterPoint ) + endPointS );
|
||||
|
||||
r = ( ( refStart - mid ).EuclideanNorm() + ( refEnd - mid ).EuclideanNorm() ) / 2.0;
|
||||
|
||||
cairo_set_line_width( m_currentContext, m_lineWidthInPixels );
|
||||
cairo_new_sub_path( m_currentContext );
|
||||
@@ -403,13 +408,7 @@ void CAIRO_GAL_BASE::DrawArcSegment( const VECTOR2D& aCenterPoint, double aRadiu
|
||||
|
||||
double r = xform( aRadius );
|
||||
|
||||
// N.B. This is backwards. We set this because we want to adjust the center
|
||||
// point that changes both endpoints. In the worst case, this is twice as far.
|
||||
// We cannot adjust radius or center based on the other because this causes the
|
||||
// whole arc to change position/size
|
||||
m_lineWidthIsOdd = !( static_cast<int>( aRadius ) % 2 );
|
||||
|
||||
VECTOR2D mid = roundp( xform( aCenterPoint ) );
|
||||
VECTOR2D mid = xform( aCenterPoint );
|
||||
double width = xform( aWidth / 2.0 );
|
||||
VECTOR2D startPointS = VECTOR2D( r, 0.0 );
|
||||
VECTOR2D endPointS = VECTOR2D( r, 0.0 );
|
||||
@@ -1672,13 +1671,16 @@ bool CAIRO_GAL::updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions )
|
||||
}
|
||||
|
||||
|
||||
bool CAIRO_GAL::SetNativeCursorStyle( KICURSOR aCursor )
|
||||
bool CAIRO_GAL::SetNativeCursorStyle( KICURSOR aCursor, bool aHiDPI )
|
||||
{
|
||||
// Store the current cursor type and get the wxCursor for it
|
||||
if( !GAL::SetNativeCursorStyle( aCursor ) )
|
||||
if( !GAL::SetNativeCursorStyle( aCursor, aHiDPI ) )
|
||||
return false;
|
||||
|
||||
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
|
||||
if( aHiDPI )
|
||||
m_currentwxCursor = CURSOR_STORE::GetHiDPICursor( m_currentNativeCursor );
|
||||
else
|
||||
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
|
||||
|
||||
// Update the cursor in the wx control
|
||||
wxWindow::SetCursor( m_currentwxCursor );
|
||||
|
||||
+259
-51
@@ -44,85 +44,76 @@
|
||||
#include <cursors/cursor-subtract.xpm>
|
||||
#include <cursors/cursor-text.xpm>
|
||||
#include <cursors/cursor-xor.xpm>
|
||||
#include <cursors/cursor-zoom.xpm>
|
||||
#include <cursors/cursor-zoom-in.xpm>
|
||||
#include <cursors/cursor-zoom-out.xpm>
|
||||
#include <cursors/cursor_tune.xpm>
|
||||
#include <cursors/voltage_probe.xpm>
|
||||
#include <cursors/current_probe.xpm>
|
||||
|
||||
// HiDPI cursor files
|
||||
#include <cursors/cursor-add64.xpm>
|
||||
#include <cursors/cursor-component64.xpm>
|
||||
#include <cursors/cursor-eraser64.xpm>
|
||||
#include <cursors/cursor-label-global64.xpm>
|
||||
#include <cursors/cursor-label-hier64.xpm>
|
||||
#include <cursors/cursor-label-net64.xpm>
|
||||
#include <cursors/cursor-line-bus64.xpm>
|
||||
#include <cursors/cursor-line-graphic64.xpm>
|
||||
#include <cursors/cursor-line-wire64.xpm>
|
||||
#include <cursors/cursor-line-wire-add64.xpm>
|
||||
#include <cursors/cursor-measure64.xpm>
|
||||
#include <cursors/cursor-pencil64.xpm>
|
||||
#include <cursors/cursor-select-lasso64.xpm>
|
||||
#include <cursors/cursor-select-window64.xpm>
|
||||
#include <cursors/cursor-subtract64.xpm>
|
||||
#include <cursors/cursor-text64.xpm>
|
||||
#include <cursors/cursor-xor64.xpm>
|
||||
#include <cursors/cursor-zoom-in64.xpm>
|
||||
#include <cursors/cursor-zoom-out64.xpm>
|
||||
#include <cursors/cursor_tune64.xpm>
|
||||
#include <cursors/voltage_probe64.xpm>
|
||||
#include <cursors/current_probe64.xpm>
|
||||
|
||||
|
||||
// Under MSW, the standard cursor is white on black. Elsewhere it is black on white
|
||||
#ifdef __WINDOWS__
|
||||
#include <cursors/cursor-place.xpm>
|
||||
#include <cursors/cursor-place64.xpm>
|
||||
#include <cursors/cursor-select-m.xpm>
|
||||
#include <cursors/cursor-select-m64.xpm>
|
||||
#else
|
||||
#include <cursors/cursor-place-black.xpm>
|
||||
#include <cursors/cursor-place-black64.xpm>
|
||||
#include <cursors/cursor-select-m-black.xpm>
|
||||
#include <cursors/cursor-select-m-black64.xpm>
|
||||
#endif
|
||||
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/debug.h>
|
||||
|
||||
|
||||
static const unsigned char voltage_probe[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00,
|
||||
0x00, 0x30, 0x06, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x0e, 0x08, 0x00, 0x80, 0x07, 0x08, 0x00,
|
||||
0xc0, 0x07, 0x18, 0x00, 0xe0, 0x07, 0x30, 0x00, 0xf0, 0x03, 0x60, 0x00, 0xf8, 0x01, 0x00, 0x00,
|
||||
0xfc, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0xc0,
|
||||
0x0f, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0xf0,
|
||||
0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
|
||||
static const unsigned char current_probe[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x60, 0x06, 0x00,
|
||||
0x00, 0x30, 0x0c, 0x00, 0x00, 0x1c, 0x08, 0x00, 0x00, 0x0f, 0x08, 0x00, 0x80, 0x0f, 0x18, 0x00,
|
||||
0xc0, 0x0f, 0x30, 0x80, 0xe1, 0x07, 0x60, 0x80, 0xf1, 0x03, 0x00, 0x80, 0xf9, 0x01, 0x00, 0x80,
|
||||
0xfd, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0xc0,
|
||||
0x0f, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0xc6, 0x01, 0x00, 0x00, 0x83,
|
||||
0x01, 0x00, 0x00, 0x83, 0x01, 0x00, 0x00, 0x83, 0x01, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xfc,
|
||||
0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00 };
|
||||
|
||||
static const unsigned char cursor_tune[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xc0, 0x0f, 0x00,
|
||||
0x00, 0xe0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00,
|
||||
0x00, 0xfe, 0x03, 0x00, 0x00, 0xff, 0x01, 0x00, 0x80, 0xff, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00,
|
||||
0xe0, 0x3f, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00,
|
||||
0xfc, 0x03, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0xea, 0x00, 0x00, 0x00,
|
||||
0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x50,
|
||||
0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0a,
|
||||
0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00 };
|
||||
|
||||
static const unsigned char cursor_tune_mask[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xc0, 0x0f,
|
||||
0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xfc, 0x07,
|
||||
0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0xff, 0x01, 0x00, 0x80, 0xff, 0x00, 0x00, 0xc0, 0x7f, 0x00,
|
||||
0x00, 0xe0, 0x3f, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00,
|
||||
0x00, 0xfc, 0x03, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xee, 0x00, 0x00,
|
||||
0x00, 0x07, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00,
|
||||
0x70, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
|
||||
0x0e, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00 };
|
||||
|
||||
|
||||
static const std::vector<CURSOR_STORE::CURSOR_DEF> standard_cursors = {
|
||||
{
|
||||
KICURSOR::VOLTAGE_PROBE,
|
||||
voltage_probe,
|
||||
voltage_probe,
|
||||
nullptr,
|
||||
nullptr,
|
||||
voltage_probe_xpm,
|
||||
{ 32, 32 },
|
||||
{ 1, 31 },
|
||||
},
|
||||
{
|
||||
KICURSOR::CURRENT_PROBE,
|
||||
current_probe,
|
||||
current_probe,
|
||||
nullptr,
|
||||
nullptr,
|
||||
current_probe_xpm,
|
||||
{ 32, 32 },
|
||||
{ 4, 27 },
|
||||
},
|
||||
{
|
||||
KICURSOR::TUNE,
|
||||
cursor_tune,
|
||||
cursor_tune_mask,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_tune_xpm,
|
||||
{ 32, 32 },
|
||||
{ 1, 30 },
|
||||
},
|
||||
@@ -198,7 +189,7 @@ static const std::vector<CURSOR_STORE::CURSOR_DEF> standard_cursors = {
|
||||
KICURSOR::ZOOM_IN,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_zoom_xpm,
|
||||
cursor_zoom_in_xpm,
|
||||
{ 32, 32 },
|
||||
{ 6, 6 },
|
||||
},
|
||||
@@ -305,6 +296,209 @@ static const std::vector<CURSOR_STORE::CURSOR_DEF> standard_cursors = {
|
||||
};
|
||||
|
||||
|
||||
static const std::vector<CURSOR_STORE::CURSOR_DEF> hidpi_cursors = {
|
||||
{
|
||||
KICURSOR::VOLTAGE_PROBE,
|
||||
nullptr,
|
||||
nullptr,
|
||||
voltage_probe64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 1, 62 },
|
||||
},
|
||||
{
|
||||
KICURSOR::CURRENT_PROBE,
|
||||
nullptr,
|
||||
nullptr,
|
||||
current_probe64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 8, 54 },
|
||||
},
|
||||
{
|
||||
KICURSOR::TUNE,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_tune64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 2, 60 },
|
||||
},
|
||||
{
|
||||
KICURSOR::PENCIL,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_pencil64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 8, 54 },
|
||||
},
|
||||
{
|
||||
KICURSOR::MOVING,
|
||||
nullptr,
|
||||
nullptr,
|
||||
#ifdef __WINDOWS__
|
||||
cursor_select_m64_xpm,
|
||||
#else
|
||||
cursor_select_m_black64_xpm,
|
||||
#endif
|
||||
{ 64, 64 },
|
||||
{ 2, 2 },
|
||||
},
|
||||
{
|
||||
KICURSOR::REMOVE,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_eraser64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 8, 8 },
|
||||
},
|
||||
{
|
||||
KICURSOR::TEXT,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_text64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::MEASURE,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_measure64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 8, 8 },
|
||||
},
|
||||
{
|
||||
KICURSOR::ADD,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_add64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::SUBTRACT,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_subtract64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::XOR,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_xor64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::ZOOM_IN,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_zoom_in64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 12, 12 },
|
||||
},
|
||||
{
|
||||
KICURSOR::ZOOM_OUT,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_zoom_out64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 12, 12 },
|
||||
},
|
||||
{
|
||||
KICURSOR::LABEL_NET,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_label_net64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::LABEL_GLOBAL,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_label_global64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::COMPONENT,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_component64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::SELECT_LASSO,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_select_lasso64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::SELECT_WINDOW,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_select_window64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 20 },
|
||||
},
|
||||
{
|
||||
KICURSOR::LINE_BUS,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_line_bus64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 10, 52 },
|
||||
},
|
||||
{
|
||||
KICURSOR::LINE_WIRE,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_line_wire64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 10, 52 },
|
||||
},
|
||||
{
|
||||
KICURSOR::LINE_WIRE_ADD,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_line_wire_add64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 10, 52 },
|
||||
},
|
||||
{
|
||||
KICURSOR::LINE_GRAPHIC,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_line_graphic64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 10, 52 },
|
||||
},
|
||||
{
|
||||
KICURSOR::LABEL_HIER,
|
||||
nullptr,
|
||||
nullptr,
|
||||
cursor_label_hier64_xpm,
|
||||
{ 64, 64 },
|
||||
{ 14, 14 },
|
||||
},
|
||||
{
|
||||
KICURSOR::PLACE,
|
||||
nullptr,
|
||||
nullptr,
|
||||
#ifdef __WINDOWS__
|
||||
cursor_place64_xpm,
|
||||
#else
|
||||
cursor_place_black64_xpm,
|
||||
#endif
|
||||
{ 64, 64 },
|
||||
{ 2, 2 },
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Construct a cursor for the given definition.
|
||||
*
|
||||
@@ -393,8 +587,8 @@ const wxCursor& CURSOR_STORE::Get( KICURSOR aIdKey ) const
|
||||
|
||||
const wxCursor CURSOR_STORE::GetCursor( KICURSOR aCursorType )
|
||||
{
|
||||
wxStockCursor stock =
|
||||
GetStockCursor( aCursorType );
|
||||
wxStockCursor stock = GetStockCursor( aCursorType );
|
||||
|
||||
if( stock != wxCURSOR_MAX )
|
||||
{
|
||||
return wxCursor( stock );
|
||||
@@ -405,6 +599,20 @@ const wxCursor CURSOR_STORE::GetCursor( KICURSOR aCursorType )
|
||||
}
|
||||
|
||||
|
||||
const wxCursor CURSOR_STORE::GetHiDPICursor( KICURSOR aCursorType )
|
||||
{
|
||||
wxStockCursor stock = GetStockCursor( aCursorType );
|
||||
|
||||
if( stock != wxCURSOR_MAX )
|
||||
{
|
||||
return wxCursor( stock );
|
||||
}
|
||||
|
||||
static CURSOR_STORE store( hidpi_cursors );
|
||||
return store.Get( aCursorType );
|
||||
}
|
||||
|
||||
|
||||
wxStockCursor CURSOR_STORE::GetStockCursor( KICURSOR aCursorType )
|
||||
{
|
||||
wxStockCursor stockCursor;
|
||||
|
||||
@@ -81,7 +81,7 @@ GAL::GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions ) :
|
||||
SetCursorEnabled( false );
|
||||
|
||||
// Initialize the native widget to an arrow cursor
|
||||
SetNativeCursorStyle( KICURSOR::ARROW );
|
||||
SetNativeCursorStyle( KICURSOR::ARROW, false );
|
||||
|
||||
// Initialize text properties
|
||||
ResetTextAttributes();
|
||||
@@ -277,7 +277,7 @@ void GAL::BitmapText( const wxString& aText, const VECTOR2I& aPosition, const ED
|
||||
}
|
||||
|
||||
|
||||
bool GAL::SetNativeCursorStyle( KICURSOR aCursor )
|
||||
bool GAL::SetNativeCursorStyle( KICURSOR aCursor, bool aHiDPI )
|
||||
{
|
||||
if( m_currentNativeCursor == aCursor )
|
||||
return false;
|
||||
|
||||
@@ -34,8 +34,7 @@ HIDPI_GL_CANVAS::HIDPI_GL_CANVAS( const KIGFX::VC_SETTINGS& aSettings, wxWindow*
|
||||
const wxPoint& aPos, const wxSize& aSize, long aStyle,
|
||||
const wxString& aName, const wxPalette& aPalette ) :
|
||||
wxGLCanvas( aParent, aId, aAttribList, aPos, aSize, aStyle, aName, aPalette ),
|
||||
m_settings( aSettings ),
|
||||
m_scale_factor( DPI_SCALING::GetDefaultScaleFactor() )
|
||||
m_settings( aSettings )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -64,13 +63,7 @@ wxPoint HIDPI_GL_CANVAS::GetNativePosition( const wxPoint& aPoint ) const
|
||||
}
|
||||
|
||||
|
||||
void HIDPI_GL_CANVAS::SetScaleFactor( double aNewScaleFactor )
|
||||
{
|
||||
m_scale_factor = aNewScaleFactor;
|
||||
}
|
||||
|
||||
|
||||
double HIDPI_GL_CANVAS::GetScaleFactor() const
|
||||
{
|
||||
return m_scale_factor;
|
||||
return GetContentScaleFactor();
|
||||
}
|
||||
@@ -255,7 +255,8 @@ GLuint GL_BITMAP_CACHE::cacheBitmap( const BITMAP_BASE* aBitmap )
|
||||
bmp.accessTime = currentTime;
|
||||
|
||||
#ifndef DISABLE_BITMAP_CACHE
|
||||
if( m_cacheLru.size() + 1 > m_cacheMaxElements || m_cacheSize + bmp.size > m_cacheMaxSize )
|
||||
if( ( m_cacheLru.size() + 1 > m_cacheMaxElements || m_cacheSize + bmp.size > m_cacheMaxSize )
|
||||
&& !m_cacheLru.empty() )
|
||||
{
|
||||
KIID toRemove( 0 );
|
||||
auto toRemoveLru = m_cacheLru.end();
|
||||
@@ -507,13 +508,6 @@ bool OPENGL_GAL::updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions )
|
||||
refresh = true;
|
||||
}
|
||||
|
||||
if( m_options.m_scaleFactor != GetScaleFactor() )
|
||||
{
|
||||
SetScaleFactor( m_options.m_scaleFactor );
|
||||
m_gridLineWidth = m_options.m_scaleFactor * ( m_options.m_gridLineWidth + 0.25 );
|
||||
refresh = true;
|
||||
}
|
||||
|
||||
if( super::updatedGalDisplayOptions( aOptions ) || refresh )
|
||||
{
|
||||
Refresh();
|
||||
@@ -2134,13 +2128,16 @@ void OPENGL_GAL::EndDiffLayer()
|
||||
}
|
||||
|
||||
|
||||
bool OPENGL_GAL::SetNativeCursorStyle( KICURSOR aCursor )
|
||||
bool OPENGL_GAL::SetNativeCursorStyle( KICURSOR aCursor, bool aHiDPI )
|
||||
{
|
||||
// Store the current cursor type and get the wxCursor for it
|
||||
if( !GAL::SetNativeCursorStyle( aCursor ) )
|
||||
if( !GAL::SetNativeCursorStyle( aCursor, aHiDPI ) )
|
||||
return false;
|
||||
|
||||
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
|
||||
if( aHiDPI )
|
||||
m_currentwxCursor = CURSOR_STORE::GetHiDPICursor( m_currentNativeCursor );
|
||||
else
|
||||
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
|
||||
|
||||
// Update the cursor in the wx control
|
||||
HIDPI_GL_CANVAS::SetCursor( m_currentwxCursor );
|
||||
|
||||
@@ -642,10 +642,6 @@ void DXF_IMPORT_PLUGIN::addEllipse( const DL_EllipseData& aData )
|
||||
if( startAngle > endAngle )
|
||||
endAngle += ANGLE_360;
|
||||
|
||||
// Angles are relative to major axis
|
||||
startAngle -= EDA_ANGLE( major );
|
||||
endAngle -= EDA_ANGLE( major );
|
||||
|
||||
if( aData.ratio == 1.0 )
|
||||
{
|
||||
double radius = major.EuclideanNorm();
|
||||
@@ -658,6 +654,10 @@ void DXF_IMPORT_PLUGIN::addEllipse( const DL_EllipseData& aData )
|
||||
}
|
||||
else
|
||||
{
|
||||
// Angles are relative to major axis
|
||||
startAngle -= EDA_ANGLE( major );
|
||||
endAngle -= EDA_ANGLE( major );
|
||||
|
||||
DL_ArcData arc( aData.cx, aData.cy, aData.cz, radius, startAngle.AsDegrees(),
|
||||
endAngle.AsDegrees() );
|
||||
addArc( arc );
|
||||
|
||||
@@ -140,7 +140,8 @@ EASYEDAPRO::ProjectToSelectorDialog( const nlohmann::json& aProject, bool aPcbOn
|
||||
}
|
||||
|
||||
|
||||
nlohmann::json EASYEDAPRO::ReadProjectOrDeviceFile( const wxString& aZipFileName )
|
||||
nlohmann::json EASYEDAPRO::FindJsonFile( const wxString& aZipFileName,
|
||||
const std::set<wxString>& aFileNames )
|
||||
{
|
||||
std::shared_ptr<wxZipEntry> entry;
|
||||
wxFFileInputStream in( aZipFileName );
|
||||
@@ -152,7 +153,7 @@ nlohmann::json EASYEDAPRO::ReadProjectOrDeviceFile( const wxString& aZipFileName
|
||||
|
||||
try
|
||||
{
|
||||
if( name == wxS( "project.json" ) || name == wxS( "device.json" ) )
|
||||
if( aFileNames.find( name ) != aFileNames.end() )
|
||||
{
|
||||
wxMemoryOutputStream memos;
|
||||
memos << zip;
|
||||
@@ -175,6 +176,20 @@ nlohmann::json EASYEDAPRO::ReadProjectOrDeviceFile( const wxString& aZipFileName
|
||||
}
|
||||
}
|
||||
|
||||
return nlohmann::json{};
|
||||
}
|
||||
|
||||
|
||||
nlohmann::json EASYEDAPRO::ReadProjectOrDeviceFile( const wxString& aZipFileName )
|
||||
{
|
||||
static const std::set<wxString> c_files = { wxS( "project.json" ), wxS( "device.json" ),
|
||||
wxS( "footprint.json" ), wxS( "symbol.json" ) };
|
||||
|
||||
nlohmann::json j = FindJsonFile( aZipFileName, c_files );
|
||||
|
||||
if( !j.is_null() )
|
||||
return j;
|
||||
|
||||
THROW_IO_ERROR( wxString::Format(
|
||||
_( "'%s' does not appear to be a valid EasyEDA (JLCEDA) Pro "
|
||||
"project or library file. Cannot find project.json or device.json." ),
|
||||
@@ -230,8 +245,17 @@ std::vector<nlohmann::json> EASYEDAPRO::ParseJsonLines( wxInputStream& aInput,
|
||||
{
|
||||
try
|
||||
{
|
||||
nlohmann::json js = nlohmann::json::parse( txt.ReadLine() );
|
||||
lines.emplace_back( js );
|
||||
wxString line = txt.ReadLine();
|
||||
|
||||
if( !line.IsEmpty() )
|
||||
{
|
||||
nlohmann::json js = nlohmann::json::parse( line );
|
||||
lines.emplace_back( js );
|
||||
}
|
||||
else
|
||||
{
|
||||
lines.emplace_back( nlohmann::json() );
|
||||
}
|
||||
}
|
||||
catch( nlohmann::json::exception& e )
|
||||
{
|
||||
@@ -244,3 +268,42 @@ std::vector<nlohmann::json> EASYEDAPRO::ParseJsonLines( wxInputStream& aInput,
|
||||
|
||||
return lines;
|
||||
}
|
||||
|
||||
|
||||
std::vector<std::vector<nlohmann::json>>
|
||||
EASYEDAPRO::ParseJsonLinesWithSeparation( wxInputStream& aInput, const wxString& aSource )
|
||||
{
|
||||
wxTextInputStream txt( aInput, wxS( " " ), wxConvUTF8 );
|
||||
|
||||
int currentLine = 1;
|
||||
|
||||
std::vector<std::vector<nlohmann::json>> lineBlocks;
|
||||
lineBlocks.emplace_back();
|
||||
|
||||
while( aInput.CanRead() )
|
||||
{
|
||||
try
|
||||
{
|
||||
wxString line = txt.ReadLine();
|
||||
|
||||
if( !line.IsEmpty() )
|
||||
{
|
||||
nlohmann::json js = nlohmann::json::parse( line );
|
||||
lineBlocks.back().emplace_back( js );
|
||||
}
|
||||
else
|
||||
{
|
||||
lineBlocks.emplace_back();
|
||||
}
|
||||
}
|
||||
catch( nlohmann::json::exception& e )
|
||||
{
|
||||
wxLogWarning( wxString::Format( _( "Cannot parse JSON line %d in '%s': %s" ),
|
||||
currentLine, aSource, e.what() ) );
|
||||
}
|
||||
|
||||
currentLine++;
|
||||
}
|
||||
|
||||
return lineBlocks;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#ifndef EASYEDAPRO_IMPORT_UTILS_H_
|
||||
#define EASYEDAPRO_IMPORT_UTILS_H_
|
||||
|
||||
#include <set>
|
||||
#include <wx/stream.h>
|
||||
#include <wx/string.h>
|
||||
#include <lib_id.h>
|
||||
@@ -46,6 +47,8 @@ std::vector<IMPORT_PROJECT_DESC> ProjectToSelectorDialog( const nlohmann::json&
|
||||
bool aPcbOnly = false,
|
||||
bool aSchOnly = false );
|
||||
|
||||
nlohmann::json FindJsonFile( const wxString& aZipFileName, const std::set<wxString>& aFileNames );
|
||||
|
||||
nlohmann::json ReadProjectOrDeviceFile( const wxString& aZipFileName );
|
||||
|
||||
void IterateZipFiles(
|
||||
@@ -54,6 +57,12 @@ void IterateZipFiles(
|
||||
|
||||
std::vector<nlohmann::json> ParseJsonLines( wxInputStream& aInput, const wxString& aSource );
|
||||
|
||||
/**
|
||||
* Multiple document types (e.g. footprint and PCB) can be put into a single file, separated by empty line.
|
||||
*/
|
||||
std::vector<std::vector<nlohmann::json>> ParseJsonLinesWithSeparation( wxInputStream& aInput,
|
||||
const wxString& aSource );
|
||||
|
||||
} // namespace EASYEDAPRO
|
||||
|
||||
|
||||
|
||||
@@ -36,7 +36,9 @@ void EASYEDAPRO::from_json( const nlohmann::json& j, EASYEDAPRO::SCH_ATTR& d )
|
||||
d.id = j.at( 1 ).get<wxString>();
|
||||
d.parentId = j.at( 2 ).get<wxString>();
|
||||
d.key = j.at( 3 ).get<wxString>();
|
||||
d.value = j.at( 4 ).get<wxString>();
|
||||
|
||||
if( j.at( 4 ).is_string() )
|
||||
d.value = j.at( 4 ).get<wxString>();
|
||||
|
||||
if( j.at( 5 ).is_number() )
|
||||
d.keyVisible = j.at( 5 ).get<int>();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2015 Mark Roszko <mark.roszko@gmail.com>
|
||||
* Copyright (C) 2016 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||
* Copyright (C) 2015-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2015-2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -27,11 +27,18 @@
|
||||
// conflicts for some defines, at least on Windows
|
||||
#include <kicad_curl/kicad_curl.h>
|
||||
|
||||
#include <mutex>
|
||||
#include <ki_exception.h> // THROW_IO_ERROR
|
||||
|
||||
|
||||
static std::shared_mutex s_curlMutex;
|
||||
static bool s_curlShuttingDown = false;
|
||||
|
||||
|
||||
void KICAD_CURL::Init()
|
||||
{
|
||||
s_curlShuttingDown = false;
|
||||
|
||||
if( curl_global_init( CURL_GLOBAL_ALL ) != CURLE_OK )
|
||||
{
|
||||
THROW_IO_ERROR( "curl_global_init() failed." );
|
||||
@@ -41,10 +48,26 @@ void KICAD_CURL::Init()
|
||||
|
||||
void KICAD_CURL::Cleanup()
|
||||
{
|
||||
s_curlShuttingDown = true;
|
||||
|
||||
std::unique_lock lock( s_curlMutex );
|
||||
|
||||
curl_global_cleanup();
|
||||
}
|
||||
|
||||
|
||||
std::shared_mutex& KICAD_CURL::Mutex()
|
||||
{
|
||||
return s_curlMutex;
|
||||
}
|
||||
|
||||
|
||||
bool KICAD_CURL::IsShuttingDown()
|
||||
{
|
||||
return s_curlShuttingDown;
|
||||
}
|
||||
|
||||
|
||||
std::string GetKicadCurlVersion()
|
||||
{
|
||||
return KICAD_CURL::GetVersion();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2015 Mark Roszko <mark.roszko@gmail.com>
|
||||
* Copyright (C) 2015-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2015-2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <cstddef>
|
||||
#include <exception>
|
||||
#include <sstream>
|
||||
#include <shared_mutex>
|
||||
#include <wx/app.h>
|
||||
|
||||
#include <build_version.h>
|
||||
@@ -88,6 +89,9 @@ static size_t stream_write_callback( void* aContents, size_t aSize, size_t aNmem
|
||||
static int xferinfo( void* aProgress, curl_off_t aDLtotal, curl_off_t aDLnow, curl_off_t aULtotal,
|
||||
curl_off_t aULnow )
|
||||
{
|
||||
if( KICAD_CURL::IsShuttingDown() )
|
||||
return 1; // Should abort the operation
|
||||
|
||||
CURL_PROGRESS* progress = static_cast<CURL_PROGRESS*>( aProgress );
|
||||
curl_off_t curtime = 0;
|
||||
|
||||
@@ -190,6 +194,12 @@ KICAD_CURL_EASY::~KICAD_CURL_EASY()
|
||||
|
||||
int KICAD_CURL_EASY::Perform()
|
||||
{
|
||||
std::shared_lock lock( KICAD_CURL::Mutex(), std::try_to_lock );
|
||||
|
||||
// If can't lock, we should be in the process of tearing down.
|
||||
if( !lock )
|
||||
return CURLE_ABORTED_BY_CALLBACK;
|
||||
|
||||
if( m_headers )
|
||||
curl_easy_setopt( m_CURL, CURLOPT_HTTPHEADER, m_headers );
|
||||
|
||||
|
||||
+14
-1
@@ -57,7 +57,6 @@ KIWAY_PLAYER::KIWAY_PLAYER( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType
|
||||
|
||||
KIWAY_PLAYER::~KIWAY_PLAYER() throw()
|
||||
{
|
||||
|
||||
// socket server must be destructed before we complete
|
||||
// destructing the frame or else we could crash
|
||||
// as the socket server holds a reference to this frame
|
||||
@@ -69,6 +68,20 @@ KIWAY_PLAYER::~KIWAY_PLAYER() throw()
|
||||
delete m_socketServer;
|
||||
m_socketServer = nullptr;
|
||||
}
|
||||
|
||||
// remove active sockets as well
|
||||
for( wxSocketBase* socket : m_sockets )
|
||||
{
|
||||
if( !socket )
|
||||
continue;
|
||||
|
||||
// ensure any event handling stops
|
||||
socket->Notify( false );
|
||||
|
||||
delete socket;
|
||||
}
|
||||
|
||||
m_sockets.clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
#include "lib_table_grid.h"
|
||||
|
||||
|
||||
LIB_TABLE_GRID_TRICKS::LIB_TABLE_GRID_TRICKS( WX_GRID* aGrid ) : GRID_TRICKS( aGrid )
|
||||
LIB_TABLE_GRID_TRICKS::LIB_TABLE_GRID_TRICKS( WX_GRID* aGrid ) :
|
||||
GRID_TRICKS( aGrid )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -65,11 +66,14 @@ void LIB_TABLE_GRID_TRICKS::showPopupMenu( wxMenu& menu, wxGridEvent& aEvent )
|
||||
if( showDeactivate )
|
||||
menu.Append( LIB_TABLE_GRID_TRICKS_DEACTIVATE_SELECTED, _( "Deactivate selected" ) );
|
||||
|
||||
if( showSetVisible )
|
||||
menu.Append( LIB_TABLE_GRID_TRICKS_SET_VISIBLE, _( "Set visible flag" ) );
|
||||
if( supportsVisibilityColumn() )
|
||||
{
|
||||
if( showSetVisible )
|
||||
menu.Append( LIB_TABLE_GRID_TRICKS_SET_VISIBLE, _( "Set visible flag" ) );
|
||||
|
||||
if( showUnsetVisible )
|
||||
menu.Append( LIB_TABLE_GRID_TRICKS_UNSET_VISIBLE, _( "Unset visible flag" ) );
|
||||
if( showUnsetVisible )
|
||||
menu.Append( LIB_TABLE_GRID_TRICKS_UNSET_VISIBLE, _( "Unset visible flag" ) );
|
||||
}
|
||||
|
||||
bool showSettings = false;
|
||||
|
||||
|
||||
@@ -416,7 +416,7 @@ wxDataViewColumn* LIB_TREE_MODEL_ADAPTER::doAddColumn( const wxString& aHeader,
|
||||
|
||||
wxDataViewColumn* col = new wxDataViewColumn(
|
||||
translatedHeader, new LIB_TREE_RENDERER(), index, m_colWidths[aHeader], wxALIGN_NOT,
|
||||
wxDATAVIEW_CELL_INERT | wxDATAVIEW_COL_RESIZABLE | wxDATAVIEW_COL_SORTABLE );
|
||||
wxDATAVIEW_CELL_INERT | static_cast<int>( wxDATAVIEW_COL_RESIZABLE ) );
|
||||
m_widget->AppendColumn( col );
|
||||
|
||||
col->SetMinWidth( headerMinWidth.x );
|
||||
|
||||
@@ -178,6 +178,7 @@ public:
|
||||
m_contentSizer->Add( m_noNotificationsText, 1, wxALL | wxEXPAND, 5 );
|
||||
|
||||
Bind( wxEVT_KILL_FOCUS, &NOTIFICATIONS_LIST::onFocusLoss, this );
|
||||
m_scrolledWindow->Bind( wxEVT_KILL_FOCUS, &NOTIFICATIONS_LIST::onFocusLoss, this );
|
||||
|
||||
SetSizer( bSizer1 );
|
||||
Layout();
|
||||
|
||||
+1
-1
@@ -989,7 +989,7 @@ void PGM_BASE::HandleAssert( const wxString& aFile, int aLine, const wxString& a
|
||||
{
|
||||
static std::set<SENTRY_ASSERT_CACHE_KEY> assertCache;
|
||||
|
||||
SENTRY_ASSERT_CACHE_KEY key = { aFile, aLine, aFunc, aCond, aMsg };
|
||||
SENTRY_ASSERT_CACHE_KEY key = { aFile, aLine, aFunc, aCond };
|
||||
|
||||
if( assertCache.find( key ) == assertCache.end() )
|
||||
{
|
||||
|
||||
@@ -851,7 +851,7 @@ void SVG_PLOTTER::Text( const VECTOR2I& aPos,
|
||||
|
||||
fprintf( m_outputFile,
|
||||
"textLength=\"%.*f\" font-size=\"%.*f\" lengthAdjust=\"spacingAndGlyphs\"\n"
|
||||
"text-anchor=\"%s\" opacity=\"0\">%s</text>\n",
|
||||
"text-anchor=\"%s\" opacity=\"0\" stroke-opacity=\"0\">%s</text>\n",
|
||||
m_precision, sz_dev.x, m_precision, sz_dev.y, hjust, TO_UTF8( XmlEsc( aText ) ) );
|
||||
|
||||
if( !aOrient.IsZero() )
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2020 KiCad Developers, see AUTHORS.TXT for contributors.
|
||||
* Copyright (C) 2024 KiCad Developers, see AUTHORS.TXT for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -55,9 +55,12 @@ RENDER_SETTINGS::~RENDER_SETTINGS()
|
||||
|
||||
|
||||
#if 0
|
||||
constexpr double correction = 0.8; // Looks best visually
|
||||
constexpr double correction = 0.8; // Looks best visually
|
||||
#else
|
||||
constexpr double correction = 1.0; // Matches ISO 128-2
|
||||
constexpr double correction = 1.0; // Matches ISO 128-2, but can creates issues on GTK and MSW:
|
||||
// "dots" are not always visible depending on the zoom level
|
||||
// because they create 0 lenght lines
|
||||
// So they will drawn as segments, even with correction = 1.0
|
||||
#endif
|
||||
|
||||
|
||||
@@ -69,7 +72,9 @@ double RENDER_SETTINGS::GetDashLength( int aLineWidth ) const
|
||||
|
||||
double RENDER_SETTINGS::GetDotLength( int aLineWidth ) const
|
||||
{
|
||||
return ( 1.0 - correction ) * aLineWidth;
|
||||
// The minimal length scale is arbitrary set to 0.2 after trials
|
||||
// 0 lenght can create drawing issues
|
||||
return std::max( ( 1.0 - correction ), 0.2 ) * aLineWidth;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2004-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2004-2023, 2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -42,7 +42,7 @@
|
||||
* platforms. This is the list of illegal file name characters for Windows which includes
|
||||
* the illegal file name characters for Linux and OSX.
|
||||
*/
|
||||
static const char illegalFileNameChars[] = "\\/:\"<>|";
|
||||
static const char illegalFileNameChars[] = "\\/:\"<>|*?";
|
||||
|
||||
|
||||
wxString ConvertToNewOverbarNotation( const wxString& aOldStr )
|
||||
@@ -591,7 +591,7 @@ wxString RemoveHTMLTags( const wxString& aInput )
|
||||
|
||||
wxString LinkifyHTML( wxString aStr )
|
||||
{
|
||||
wxRegEx regex( wxS( "\\b(https?|ftp|file)://([-\\w+&@#/%?=~|!:,.;]*[^.<>\\s\u00b6])" ),
|
||||
wxRegEx regex( wxS( "\\b(https?|ftp|file)://([-\\w+&@#/%?=~|!:,.;]*[^.,:;<>\\s\u00b6])" ),
|
||||
wxRE_ICASE );
|
||||
|
||||
regex.ReplaceAll( &aStr, "<a href=\"\\0\">\\0</a>" );
|
||||
@@ -907,11 +907,12 @@ bool ApplyModifier( double& value, const wxString& aString )
|
||||
}
|
||||
|
||||
if( units.length()
|
||||
&& !units.CmpNoCase( wxT( "F" ) )
|
||||
&& !units.CmpNoCase( wxT( "hz" ) )
|
||||
&& !units.CmpNoCase( wxT( "W" ) )
|
||||
&& !units.CmpNoCase( wxT( "V" ) )
|
||||
&& !units.CmpNoCase( wxT( "H" ) ) )
|
||||
&& !units.IsSameAs( wxT( "F" ), false )
|
||||
&& !units.IsSameAs( wxT( "hz" ), false )
|
||||
&& !units.IsSameAs( wxT( "W" ), false )
|
||||
&& !units.IsSameAs( wxT( "V" ), false )
|
||||
&& !units.IsSameAs( wxT( "A" ), false )
|
||||
&& !units.IsSameAs( wxT( "H" ), false ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -212,6 +212,21 @@ ACTION_TOOLBAR::ACTION_TOOLBAR( EDA_BASE_FRAME* parent, wxWindowID id, const wxP
|
||||
|
||||
ACTION_TOOLBAR::~ACTION_TOOLBAR()
|
||||
{
|
||||
Disconnect( wxEVT_COMMAND_TOOL_CLICKED, wxAuiToolBarEventHandler( ACTION_TOOLBAR::onToolEvent ),
|
||||
nullptr, this );
|
||||
Disconnect( wxEVT_AUITOOLBAR_RIGHT_CLICK,
|
||||
wxAuiToolBarEventHandler( ACTION_TOOLBAR::onToolRightClick ), nullptr, this );
|
||||
Disconnect( wxEVT_AUITOOLBAR_BEGIN_DRAG, wxAuiToolBarEventHandler( ACTION_TOOLBAR::onItemDrag ),
|
||||
nullptr, this );
|
||||
Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( ACTION_TOOLBAR::onMouseClick ), nullptr,
|
||||
this );
|
||||
Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( ACTION_TOOLBAR::onMouseClick ), nullptr, this );
|
||||
Disconnect( m_paletteTimer->GetId(), wxEVT_TIMER,
|
||||
wxTimerEventHandler( ACTION_TOOLBAR::onTimerDone ), nullptr, this );
|
||||
|
||||
Unbind( wxEVT_SYS_COLOUR_CHANGED,
|
||||
wxSysColourChangedEventHandler( ACTION_TOOLBAR::onThemeChanged ), this );
|
||||
|
||||
delete m_paletteTimer;
|
||||
|
||||
// Clear all the maps keeping track of our items on the toolbar
|
||||
|
||||
@@ -130,7 +130,7 @@ VECTOR2I SELECTION::GetCenter() const
|
||||
}
|
||||
|
||||
|
||||
BOX2I SELECTION::GetBoundingBox() const
|
||||
BOX2I SELECTION::GetBoundingBox( bool aOnlyVisible ) const
|
||||
{
|
||||
BOX2I bbox;
|
||||
|
||||
|
||||
@@ -39,35 +39,6 @@
|
||||
#include <wx/log.h>
|
||||
#include <wx/combo.h>
|
||||
|
||||
GRID_CELL_TEXT_EDITOR::GRID_CELL_TEXT_EDITOR() : wxGridCellTextEditor()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void GRID_CELL_TEXT_EDITOR::SetValidator( const wxValidator& validator )
|
||||
{
|
||||
// keep our own copy because wxGridCellTextEditor's is annoyingly private
|
||||
m_validator.reset( static_cast<wxValidator*>( validator.Clone() ) );
|
||||
|
||||
wxGridCellTextEditor::SetValidator( *m_validator );
|
||||
}
|
||||
|
||||
|
||||
void GRID_CELL_TEXT_EDITOR::StartingKey( wxKeyEvent& event )
|
||||
{
|
||||
if( m_validator )
|
||||
{
|
||||
m_validator.get()->SetWindow( Text() );
|
||||
m_validator.get()->ProcessEvent( event );
|
||||
}
|
||||
|
||||
if( event.GetSkipped() )
|
||||
{
|
||||
wxGridCellTextEditor::StartingKey( event );
|
||||
event.Skip( false );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
FOOTPRINT_NAME_VALIDATOR::FOOTPRINT_NAME_VALIDATOR( wxString* aValue ) :
|
||||
wxTextValidator( wxFILTER_EXCLUDE_CHAR_LIST, aValue )
|
||||
|
||||
+25
-25
@@ -399,35 +399,19 @@ void VIEW::SetRequired( int aLayerId, int aRequiredId, bool aRequired )
|
||||
}
|
||||
|
||||
|
||||
// stupid C++... python lambda would do this in one line
|
||||
template <class CONTAINER>
|
||||
struct QUERY_VISITOR
|
||||
{
|
||||
typedef typename CONTAINER::value_type item_type;
|
||||
|
||||
QUERY_VISITOR( CONTAINER& aCont, int aLayer ) :
|
||||
m_cont( aCont ), m_layer( aLayer )
|
||||
{
|
||||
}
|
||||
|
||||
bool operator()( VIEW_ITEM* aItem )
|
||||
{
|
||||
if( aItem->viewPrivData()->GetFlags() & VISIBLE )
|
||||
m_cont.push_back( VIEW::LAYER_ITEM_PAIR( aItem, m_layer ) );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
CONTAINER& m_cont;
|
||||
int m_layer;
|
||||
};
|
||||
|
||||
|
||||
int VIEW::Query( const BOX2I& aRect, std::vector<LAYER_ITEM_PAIR>& aResult ) const
|
||||
{
|
||||
if( m_orderedLayers.empty() )
|
||||
return 0;
|
||||
|
||||
int layer = UNDEFINED_LAYER;
|
||||
auto visitor =
|
||||
[&]( VIEW_ITEM* item ) -> bool
|
||||
{
|
||||
aResult.push_back( VIEW::LAYER_ITEM_PAIR( item, layer ) );
|
||||
return true;
|
||||
};
|
||||
|
||||
std::vector<VIEW_LAYER*>::const_reverse_iterator i;
|
||||
|
||||
// execute queries in reverse direction, so that items that are on the top of
|
||||
@@ -438,7 +422,7 @@ int VIEW::Query( const BOX2I& aRect, std::vector<LAYER_ITEM_PAIR>& aResult ) con
|
||||
if( ( *i )->displayOnly || !( *i )->visible )
|
||||
continue;
|
||||
|
||||
QUERY_VISITOR<std::vector<LAYER_ITEM_PAIR> > visitor( aResult, ( *i )->id );
|
||||
layer = ( *i )->id;
|
||||
( *i )->items->Query( aRect, visitor );
|
||||
}
|
||||
|
||||
@@ -446,6 +430,22 @@ int VIEW::Query( const BOX2I& aRect, std::vector<LAYER_ITEM_PAIR>& aResult ) con
|
||||
}
|
||||
|
||||
|
||||
void VIEW::Query( const BOX2I& aRect, const std::function<bool( VIEW_ITEM* )>& aFunc ) const
|
||||
{
|
||||
if( m_orderedLayers.empty() )
|
||||
return;
|
||||
|
||||
for( const auto& i : m_orderedLayers )
|
||||
{
|
||||
// ignore layers that do not contain actual items (i.e. the selection box, menus, floats)
|
||||
if( i->displayOnly || !i->visible )
|
||||
continue;
|
||||
|
||||
i->items->Query( aRect, aFunc );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
VECTOR2D VIEW::ToWorld( const VECTOR2D& aCoord, bool aAbsolute ) const
|
||||
{
|
||||
const MATRIX3x3D& matrix = m_gal->GetScreenWorldMatrix();
|
||||
|
||||
@@ -92,6 +92,13 @@ void BITMAP_BUTTON::setupEvents()
|
||||
|
||||
BITMAP_BUTTON::~BITMAP_BUTTON()
|
||||
{
|
||||
Unbind( wxEVT_PAINT, &BITMAP_BUTTON::OnPaint, this );
|
||||
Unbind( wxEVT_LEFT_UP, &BITMAP_BUTTON::OnLeftButtonUp, this );
|
||||
Unbind( wxEVT_LEFT_DOWN, &BITMAP_BUTTON::OnLeftButtonDown, this );
|
||||
Unbind( wxEVT_LEAVE_WINDOW, &BITMAP_BUTTON::OnMouseLeave, this );
|
||||
Unbind( wxEVT_ENTER_WINDOW, &BITMAP_BUTTON::OnMouseEnter, this );
|
||||
Unbind( wxEVT_KILL_FOCUS, &BITMAP_BUTTON::OnKillFocus, this );
|
||||
Unbind( wxEVT_SET_FOCUS, &BITMAP_BUTTON::OnSetFocus, this );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2021 CERN
|
||||
* Copyright (C) 2018-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2018-2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -60,20 +60,9 @@ wxString GRID_CELL_TEXT_BUTTON::GetValue() const
|
||||
void GRID_CELL_TEXT_BUTTON::SetSize( const wxRect& aRect )
|
||||
{
|
||||
wxRect rect( aRect );
|
||||
WX_GRID::CellEditorTransformSizeRect( rect );
|
||||
|
||||
#if defined( __WXMAC__ )
|
||||
rect.Inflate( 2 ); // ignore FOCUS_RING
|
||||
#elif defined( __WXGTK__ )
|
||||
rect.Inflate( -3 ); // The -3 is a very sad hack here. Some GTK themes overrun the
|
||||
// default -1, preventing display. Unfortunately, we don't appear to
|
||||
// have a good method of finding the current margin needed.
|
||||
// Some GTK resize events seem to update the cell size but not all and
|
||||
// not consistently.
|
||||
#else
|
||||
rect.Inflate( -1 );
|
||||
#endif
|
||||
|
||||
Combo()->SetSize( rect, wxSIZE_ALLOW_MINUS_ONE );
|
||||
wxGridCellEditor::SetSize( rect );
|
||||
}
|
||||
|
||||
|
||||
@@ -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,11 +234,12 @@ public:
|
||||
TEXT_BUTTON_FP_CHOOSER( wxWindow* aParent, DIALOG_SHIM* aParentDlg,
|
||||
const wxString& aSymbolNetlist, const wxString& aPreselect ) :
|
||||
wxComboCtrl( aParent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
|
||||
wxTE_PROCESS_ENTER ),
|
||||
wxTE_PROCESS_ENTER | wxBORDER_NONE ),
|
||||
m_dlg( aParentDlg ),
|
||||
m_preselect( aPreselect ),
|
||||
m_symbolNetlist( aSymbolNetlist.ToStdString() )
|
||||
{
|
||||
m_buttonFpChooserLock = false;
|
||||
SetButtonBitmaps( KiBitmap( BITMAPS::small_library ) );
|
||||
|
||||
// win32 fix, avoids drawing the "native dropdown caret"
|
||||
@@ -263,17 +254,21 @@ protected:
|
||||
|
||||
void OnButtonClick() override
|
||||
{
|
||||
if( m_buttonFpChooserLock ) // The button to show the FP chooser is clicked, but
|
||||
// a previous click is currently in progress.
|
||||
return;
|
||||
|
||||
// Disable the button until we have finished processing it. Normally this is not an issue
|
||||
// but if the footprint chooser is loading for the first time, it can be slow enough that
|
||||
// multiple clicks will cause multiple instances of the footprint loader process to start
|
||||
m_buttonFpChooserLock = true;
|
||||
|
||||
// pick a footprint using the footprint picker.
|
||||
wxString fpid = GetValue();
|
||||
|
||||
if( fpid.IsEmpty() )
|
||||
fpid = m_preselect;
|
||||
|
||||
// Disable the button until we have finished processing it. Normally this is not an issue
|
||||
// but if the footprint chooser is loading for the first time, it can be slow enough that
|
||||
// multiple clicks will cause multiple instances of the footprint loader process to start
|
||||
Disable();
|
||||
|
||||
if( KIWAY_PLAYER* frame = m_dlg->Kiway().Player( FRAME_FOOTPRINT_CHOOSER, true, m_dlg ) )
|
||||
{
|
||||
if( !m_symbolNetlist.empty() )
|
||||
@@ -288,13 +283,16 @@ protected:
|
||||
frame->Destroy();
|
||||
}
|
||||
|
||||
Enable();
|
||||
m_buttonFpChooserLock = false;
|
||||
}
|
||||
|
||||
protected:
|
||||
DIALOG_SHIM* m_dlg;
|
||||
wxString m_preselect;
|
||||
|
||||
// Lock flag to lock the button to show the FP chooser
|
||||
// true when the button is busy, waiting all footprints loaded to
|
||||
// avoid running more than once the FP chooser
|
||||
bool m_buttonFpChooserLock;
|
||||
/*
|
||||
* Symbol netlist format:
|
||||
* pinNumber pinName <tab> pinNumber pinName...
|
||||
@@ -308,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
|
||||
@@ -326,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 )
|
||||
{
|
||||
@@ -359,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
|
||||
@@ -380,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 ),
|
||||
@@ -400,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 ),
|
||||
@@ -516,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();
|
||||
|
||||
@@ -518,8 +518,10 @@ void mpFXY::Plot( wxDC& dc, mpWindow& w )
|
||||
ys.insert( w.y2p( py ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
else for( int sweep = 0; sweep < GetSweepCount(); ++sweep )
|
||||
{
|
||||
SetSweepWindow( sweep );
|
||||
|
||||
int count = 0;
|
||||
int x0 = 0; // X position of merged current vertical line
|
||||
int ymin0 = 0; // y min coord of merged current vertical line
|
||||
@@ -2456,18 +2458,20 @@ double mpScaleXLog::TransformFromPlot( double xplot ) const
|
||||
void mpFXYVector::Rewind()
|
||||
{
|
||||
m_index = 0;
|
||||
m_sweepWindow = std::numeric_limits<size_t>::max();
|
||||
}
|
||||
|
||||
|
||||
size_t mpFXYVector::GetCount() const
|
||||
void mpFXYVector::SetSweepWindow( int aSweepIdx )
|
||||
{
|
||||
return m_xs.size();
|
||||
m_index = aSweepIdx * m_sweepSize;
|
||||
m_sweepWindow = ( aSweepIdx + 1 ) * m_sweepSize;
|
||||
}
|
||||
|
||||
|
||||
bool mpFXYVector::GetNextXY( double& x, double& y )
|
||||
{
|
||||
if( m_index >= m_xs.size() )
|
||||
if( m_index >= m_xs.size() || m_index >= m_sweepWindow )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -2475,7 +2479,7 @@ bool mpFXYVector::GetNextXY( double& x, double& y )
|
||||
{
|
||||
x = m_xs[m_index];
|
||||
y = m_ys[m_index++];
|
||||
return m_index <= m_xs.size();
|
||||
return m_index <= m_xs.size() && m_index <= m_sweepWindow;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 );
|
||||
|
||||
+109
-12
@@ -720,6 +720,20 @@ void CONNECTION_GRAPH::Recalculate( const SCH_SHEET_LIST& aSheetList, bool aUnco
|
||||
item->GetTypeDesc() );
|
||||
items.push_back( item );
|
||||
dirty_items.insert( item );
|
||||
|
||||
// Add any symbol dirty pins to the dirty_items list
|
||||
if( item->Type() == SCH_SYMBOL_T )
|
||||
{
|
||||
SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( item );
|
||||
|
||||
for( SCH_PIN* pin : symbol->GetPins( &sheet ) )
|
||||
{
|
||||
if( pin->IsConnectivityDirty() )
|
||||
{
|
||||
dirty_items.insert( pin );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// If the symbol isn't dirty, look at the pins
|
||||
// TODO: remove symbols from connectivity graph and only use pins
|
||||
@@ -736,6 +750,19 @@ void CONNECTION_GRAPH::Recalculate( const SCH_SHEET_LIST& aSheetList, bool aUnco
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( item->Type() == SCH_SHEET_T )
|
||||
{
|
||||
SCH_SHEET* sheet = static_cast<SCH_SHEET*>( item );
|
||||
|
||||
for( SCH_SHEET_PIN* pin : sheet->GetPins() )
|
||||
{
|
||||
if( pin->IsConnectivityDirty() )
|
||||
{
|
||||
items.push_back( pin );
|
||||
dirty_items.insert( pin );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure the hierarchy info stored in the SCH_SCREEN (such as symbol units) reflects
|
||||
// the current SCH_SHEET_PATH
|
||||
@@ -890,6 +917,9 @@ std::set<std::pair<SCH_SHEET_PATH, SCH_ITEM*>> CONNECTION_GRAPH::ExtractAffected
|
||||
|
||||
removeSubgraphs( subgraphs );
|
||||
|
||||
for( const auto& [path, item] : retvals )
|
||||
alg::delete_matching( m_items, item );
|
||||
|
||||
return retvals;
|
||||
}
|
||||
|
||||
@@ -2304,9 +2334,16 @@ void CONNECTION_GRAPH::buildConnectionGraph( std::function<void( SCH_ITEM* )>* a
|
||||
|
||||
std::shared_ptr<NET_SETTINGS>& netSettings = m_schematic->Prj().GetProjectFile().m_NetSettings;
|
||||
std::map<wxString, wxString> oldAssignments = netSettings->m_NetClassLabelAssignments;
|
||||
std::set<wxString> affectedNetclassNetAssignments;
|
||||
|
||||
netSettings->m_NetClassLabelAssignments.clear();
|
||||
|
||||
// Used to track where netclasses are assigned to a net from a bus netclass
|
||||
// definition. Without this tracking, depending on the order of testing for
|
||||
// netclasses, an already-assigned netclass on a bus member can be deleted
|
||||
// if an explicitly labelled member net does not have a netclass assigned.
|
||||
std::unordered_set<wxString> netclassAssignedFromBus;
|
||||
|
||||
auto dirtySubgraphs =
|
||||
[&]( const std::vector<CONNECTION_SUBGRAPH*>& subgraphs )
|
||||
{
|
||||
@@ -2345,31 +2382,88 @@ void CONNECTION_GRAPH::buildConnectionGraph( std::function<void( SCH_ITEM* )>* a
|
||||
}
|
||||
}
|
||||
|
||||
if( netclass.IsEmpty() )
|
||||
return;
|
||||
|
||||
if( !driverSubgraph )
|
||||
driverSubgraph = subgraphs.front();
|
||||
|
||||
const wxString netname = driverSubgraph->GetNetName();
|
||||
|
||||
// Handle netclass assignments on buses
|
||||
if( driverSubgraph->m_driver_connection->IsBus() )
|
||||
{
|
||||
for( const auto& member : driverSubgraph->m_driver_connection->Members() )
|
||||
auto processBusMember = [&, this]( const SCH_CONNECTION* member )
|
||||
{
|
||||
netSettings->m_NetClassLabelAssignments[ member->Name() ] = netclass;
|
||||
if( !netclass.IsEmpty() )
|
||||
{
|
||||
netSettings->m_NetClassLabelAssignments[member->Name()] = netclass;
|
||||
netclassAssignedFromBus.insert( member->Name() );
|
||||
}
|
||||
|
||||
auto ii = m_net_name_to_subgraphs_map.find( member->Name() );
|
||||
|
||||
if( ii != m_net_name_to_subgraphs_map.end() )
|
||||
dirtySubgraphs( ii->second );
|
||||
if( oldAssignments.count( member->Name() ) )
|
||||
{
|
||||
if( oldAssignments[member->Name()] != netclass )
|
||||
{
|
||||
affectedNetclassNetAssignments.insert( member->Name() );
|
||||
|
||||
if( ii != m_net_name_to_subgraphs_map.end() )
|
||||
dirtySubgraphs( ii->second );
|
||||
}
|
||||
}
|
||||
else if( !netclass.IsEmpty() )
|
||||
{
|
||||
affectedNetclassNetAssignments.insert( member->Name() );
|
||||
|
||||
if( ii != m_net_name_to_subgraphs_map.end() )
|
||||
dirtySubgraphs( ii->second );
|
||||
}
|
||||
};
|
||||
|
||||
for( const std::shared_ptr<SCH_CONNECTION>& member :
|
||||
driverSubgraph->m_driver_connection->Members() )
|
||||
{
|
||||
// Check if this member itself is a bus (which can be the case
|
||||
// for vector buses as members of a bus, see
|
||||
// https://gitlab.com/kicad/code/kicad/-/issues/16545
|
||||
if( member->IsBus() )
|
||||
{
|
||||
for( const std::shared_ptr<SCH_CONNECTION>& nestedMember :
|
||||
member->Members() )
|
||||
{
|
||||
processBusMember( nestedMember.get() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
processBusMember( member.get() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
netSettings->m_NetClassLabelAssignments[ netname ] = netclass;
|
||||
// Handle netclass assignments on nets / overarching bus definitions.
|
||||
// Note: currently a netclass definition on a bus will override any
|
||||
// on a net. This will be resolved with multiple netclasses.
|
||||
if( !netclassAssignedFromBus.count( netname ) )
|
||||
{
|
||||
if( !netclass.IsEmpty() )
|
||||
{
|
||||
netSettings->m_NetClassLabelAssignments[netname] = netclass;
|
||||
}
|
||||
|
||||
if( oldAssignments[ netname ] != netclass )
|
||||
dirtySubgraphs( subgraphs );
|
||||
if( oldAssignments.count( netname ) )
|
||||
{
|
||||
if( oldAssignments[netname] != netclass )
|
||||
{
|
||||
affectedNetclassNetAssignments.insert( netname );
|
||||
dirtySubgraphs( subgraphs );
|
||||
}
|
||||
}
|
||||
else if( !netclass.IsEmpty() )
|
||||
{
|
||||
affectedNetclassNetAssignments.insert( netname );
|
||||
dirtySubgraphs( subgraphs );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
for( const auto& [ netname, subgraphs ] : m_net_name_to_subgraphs_map )
|
||||
@@ -2379,8 +2473,11 @@ void CONNECTION_GRAPH::buildConnectionGraph( std::function<void( SCH_ITEM* )>* a
|
||||
{
|
||||
for( auto& [ netname, netclass ] : oldAssignments )
|
||||
{
|
||||
if( netSettings->m_NetClassLabelAssignments.count( netname ) )
|
||||
if( netSettings->m_NetClassLabelAssignments.count( netname )
|
||||
|| affectedNetclassNetAssignments.count( netname ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
netSettings->m_NetClassLabelAssignments[ netname ] = netclass;
|
||||
}
|
||||
@@ -2988,7 +3085,7 @@ CONNECTION_SUBGRAPH* CONNECTION_GRAPH::FindFirstSubgraphByName( const wxString&
|
||||
}
|
||||
|
||||
|
||||
CONNECTION_SUBGRAPH* CONNECTION_GRAPH::GetSubgraphForItem( SCH_ITEM* aItem )
|
||||
CONNECTION_SUBGRAPH* CONNECTION_GRAPH::GetSubgraphForItem( SCH_ITEM* aItem ) const
|
||||
{
|
||||
auto it = m_item_to_subgraph_map.find( aItem );
|
||||
CONNECTION_SUBGRAPH* ret = it != m_item_to_subgraph_map.end() ? it->second : nullptr;
|
||||
|
||||
@@ -428,7 +428,7 @@ public:
|
||||
*/
|
||||
CONNECTION_SUBGRAPH* FindFirstSubgraphByName( const wxString& aNetName );
|
||||
|
||||
CONNECTION_SUBGRAPH* GetSubgraphForItem( SCH_ITEM* aItem );
|
||||
CONNECTION_SUBGRAPH* GetSubgraphForItem( SCH_ITEM* aItem ) const;
|
||||
|
||||
const std::vector<CONNECTION_SUBGRAPH*> GetAllSubgraphs( const wxString& aNetName ) const;
|
||||
|
||||
|
||||
@@ -907,7 +907,7 @@ void SCH_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail )
|
||||
KIID uuid( payload );
|
||||
SCH_SHEET_PATH path;
|
||||
|
||||
if( SCH_ITEM* item = m_schematic->GetSheets().GetItem( uuid, &path ) )
|
||||
if( SCH_ITEM* item = m_schematic->GetItem( uuid, &path ) )
|
||||
{
|
||||
if( item->Type() == SCH_SHEET_T )
|
||||
payload = static_cast<SCH_SHEET*>( item )->GetShownName( false );
|
||||
|
||||
@@ -513,7 +513,7 @@ void DIALOG_ERC::OnERCItemSelected( wxDataViewEvent& aEvent )
|
||||
{
|
||||
const KIID& itemID = RC_TREE_MODEL::ToUUID( aEvent.GetItem() );
|
||||
SCH_SHEET_PATH sheet;
|
||||
SCH_ITEM* item = m_parent->Schematic().GetSheets().GetItem( itemID, &sheet );
|
||||
SCH_ITEM* item = m_parent->Schematic().GetItem( itemID, &sheet );
|
||||
|
||||
if( m_centerMarkerOnIdle )
|
||||
{
|
||||
|
||||
@@ -677,7 +677,7 @@ void DIALOG_SCH_FIELD_PROPERTIES::UpdateField( SCH_COMMIT* aCommit, SCH_FIELD* a
|
||||
int unit = symbol->GetUnit();
|
||||
LIB_ID libId = symbol->GetLibId();
|
||||
|
||||
for( SCH_SHEET_PATH& sheet : editFrame->Schematic().GetSheets() )
|
||||
for( SCH_SHEET_PATH& sheet : editFrame->Schematic().GetUnorderedSheets() )
|
||||
{
|
||||
SCH_SCREEN* screen = sheet.LastScreen();
|
||||
std::vector<SCH_SYMBOL*> otherUnits;
|
||||
|
||||
@@ -293,10 +293,11 @@ void DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem( SCH_COMMIT* aCommit,
|
||||
if( m_italic->Get3StateValue() != wxCHK_UNDETERMINED )
|
||||
eda_text->SetItalic( m_italic->GetValue() );
|
||||
|
||||
// Must come after SetTextSize()
|
||||
if( m_bold->Get3StateValue() != wxCHK_UNDETERMINED )
|
||||
eda_text->SetBold( m_bold->GetValue() );
|
||||
|
||||
// Must come after bold & italic
|
||||
// Must come after SetBold() & SetItalic()
|
||||
if( m_fontCtrl->GetStringSelection() != INDETERMINATE_ACTION )
|
||||
{
|
||||
eda_text->SetFont( m_fontCtrl->GetFontSelection( eda_text->IsBold(),
|
||||
|
||||
@@ -553,20 +553,8 @@ bool DIALOG_LABEL_PROPERTIES::TransferDataFromWindow()
|
||||
else if( m_currentLabel->GetTextWidth() != m_textSize.GetValue() )
|
||||
m_currentLabel->SetTextSize( VECTOR2I( m_textSize.GetValue(), m_textSize.GetValue() ) );
|
||||
|
||||
if( m_bold->IsChecked() != m_currentLabel->IsBold() )
|
||||
{
|
||||
if( m_bold->IsChecked() )
|
||||
{
|
||||
m_currentLabel->SetBold( true );
|
||||
m_currentLabel->SetTextThickness( GetPenSizeForBold( m_currentLabel->GetTextWidth() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_currentLabel->SetBold( false );
|
||||
m_currentLabel->SetTextThickness( 0 ); // Use default pen width
|
||||
}
|
||||
}
|
||||
|
||||
// Must come after SetTextSize()
|
||||
m_currentLabel->SetBold( m_bold->IsChecked() );
|
||||
m_currentLabel->SetItalic( m_italic->IsChecked() );
|
||||
|
||||
m_currentLabel->SetTextColor( m_textColorSwatch->GetSwatchColor() );
|
||||
|
||||
@@ -262,8 +262,9 @@ bool DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow()
|
||||
else
|
||||
m_graphicText->SetBodyStyle( 0 );
|
||||
|
||||
m_graphicText->SetItalic( m_italic->IsChecked() );
|
||||
// Must come after SetTextSize()
|
||||
m_graphicText->SetBold( m_bold->IsChecked() );
|
||||
m_graphicText->SetItalic( m_italic->IsChecked() );
|
||||
m_graphicText->SetTextColor( m_textColorSwatch->GetSwatchColor() );
|
||||
|
||||
if( m_hAlignLeft->IsChecked() )
|
||||
|
||||
@@ -279,21 +279,10 @@ bool DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataFromWindow()
|
||||
m_italic->IsChecked() ) );
|
||||
}
|
||||
|
||||
if( m_bold->IsChecked() != m_currentText->IsBold() )
|
||||
{
|
||||
if( m_bold->IsChecked() )
|
||||
{
|
||||
m_currentText->SetBold( true );
|
||||
m_currentText->SetTextThickness( GetPenSizeForBold( m_currentText->GetTextWidth() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_currentText->SetBold( false );
|
||||
m_currentText->SetTextThickness( 0 ); // Use default pen width
|
||||
}
|
||||
}
|
||||
|
||||
// Must come after SetTextSize()
|
||||
m_currentText->SetBold( m_italic->IsChecked() );
|
||||
m_currentText->SetItalic( m_italic->IsChecked() );
|
||||
|
||||
m_currentText->SetTextColor( m_textColorSwatch->GetSwatchColor() );
|
||||
|
||||
if( m_hAlignRight->IsChecked() )
|
||||
|
||||
@@ -147,26 +147,14 @@ bool DIALOG_SHEET_PIN_PROPERTIES::TransferDataFromWindow()
|
||||
m_italic->IsChecked() ) );
|
||||
}
|
||||
|
||||
if( m_bold->IsChecked() != m_sheetPin->IsBold() )
|
||||
{
|
||||
if( m_bold->IsChecked() )
|
||||
{
|
||||
m_sheetPin->SetBold( true );
|
||||
m_sheetPin->SetTextThickness( GetPenSizeForBold( m_sheetPin->GetTextWidth() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_sheetPin->SetBold( false );
|
||||
m_sheetPin->SetTextThickness( 0 ); // Use default pen width
|
||||
}
|
||||
}
|
||||
|
||||
m_sheetPin->SetItalic( m_italic->IsChecked() );
|
||||
|
||||
// Currently, eeschema uses only the text width as text size,
|
||||
// and expects text width = text height
|
||||
m_sheetPin->SetTextSize( VECTOR2I( m_textSize.GetIntValue(), m_textSize.GetIntValue() ) );
|
||||
|
||||
// Must come after SetTextSize()
|
||||
m_sheetPin->SetBold( m_bold->IsChecked() );
|
||||
m_sheetPin->SetItalic( m_italic->IsChecked() );
|
||||
|
||||
m_sheetPin->SetTextColor( m_textColorSwatch->GetSwatchColor() );
|
||||
|
||||
if( m_input->GetValue() ) m_sheetPin->SetShape( LABEL_FLAG_SHAPE::L_INPUT );
|
||||
|
||||
@@ -50,7 +50,7 @@ DIALOG_SIM_FORMAT_VALUE::DIALOG_SIM_FORMAT_VALUE( wxWindow* aParent, SPICE_VALUE
|
||||
m_units = aFormat->Range.Right( 2 );
|
||||
SetTitle( wxString::Format( GetTitle(), _( "Frequency" ) ) );
|
||||
}
|
||||
else if( aFormat->Range.EndsWith( wxS( "dBV" ) ) )
|
||||
else if( aFormat->Range.EndsWith( wxS( "dB" ) ) )
|
||||
{
|
||||
m_units = aFormat->Range.Right( 3 );
|
||||
SetTitle( wxString::Format( GetTitle(), _( "Gain" ) ) );
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include <sch_edit_frame.h>
|
||||
#include <sim/sim_model_l_mutual.h>
|
||||
#include <sim/spice_circuit_model.h>
|
||||
#include <wx/log.h>
|
||||
|
||||
using CATEGORY = SIM_MODEL::PARAM::CATEGORY;
|
||||
|
||||
@@ -77,8 +78,7 @@ DIALOG_SIM_MODEL<T_symbol, T_field>::DIALOG_SIM_MODEL( wxWindow* aParent, EDA_BA
|
||||
m_scintillaTricksSubckt( nullptr ),
|
||||
m_firstCategory( nullptr ),
|
||||
m_prevParamGridSelection( nullptr ),
|
||||
m_lastParamGridWidth( 0 ),
|
||||
m_inKillFocus( false )
|
||||
m_lastParamGridWidth( 0 )
|
||||
{
|
||||
m_browseButton->SetBitmap( KiBitmapBundle( BITMAPS::small_folder ) );
|
||||
|
||||
@@ -219,12 +219,14 @@ bool DIALOG_SIM_MODEL<T_symbol, T_field>::TransferDataToWindow()
|
||||
// The model is sourced from a library, optionally with instance overrides.
|
||||
m_rbLibraryModel->SetValue( true );
|
||||
|
||||
if( !loadLibrary( libraryFilename ) )
|
||||
if( !loadLibrary( libraryFilename, reporter ) )
|
||||
{
|
||||
if( reporter.HasMessage() )
|
||||
m_infoBar->ShowMessage( msg );
|
||||
|
||||
m_libraryPathText->ChangeValue( libraryFilename );
|
||||
m_curModelType = SIM_MODEL::ReadTypeFromFields( m_fields, reporter );
|
||||
|
||||
// load library will mangle the set reporter
|
||||
m_libraryModelsMgr.CreateModel( nullptr, m_sortedPartPins, m_fields, reporter );
|
||||
|
||||
m_modelNameChoice->Append( _( "<unknown>" ) );
|
||||
@@ -237,14 +239,15 @@ bool DIALOG_SIM_MODEL<T_symbol, T_field>::TransferDataToWindow()
|
||||
|
||||
if( modelIdx == wxNOT_FOUND )
|
||||
{
|
||||
DisplayErrorMessage( this, wxString::Format( _( "No model named '%s' in library." ),
|
||||
modelName ) );
|
||||
m_infoBar->ShowMessage( wxString::Format( _( "No model named '%s' in library." ),
|
||||
modelName ) );
|
||||
|
||||
// Default to first item in library
|
||||
m_modelNameChoice->SetSelection( 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_infoBar->Hide();
|
||||
m_modelNameChoice->SetSelection( modelIdx );
|
||||
}
|
||||
|
||||
@@ -807,37 +810,28 @@ void DIALOG_SIM_MODEL<T_symbol, T_field>::removeOrphanedPinAssignments( SIM_MODE
|
||||
|
||||
|
||||
template <typename T_symbol, typename T_field>
|
||||
bool DIALOG_SIM_MODEL<T_symbol, T_field>::loadLibrary( const wxString& aLibraryPath,
|
||||
bool aForceReload )
|
||||
bool DIALOG_SIM_MODEL<T_symbol, T_field>::loadLibrary( const wxString& aLibraryPath, REPORTER& aReporter,
|
||||
bool aForceReload )
|
||||
{
|
||||
if( m_prevLibrary == aLibraryPath && !aForceReload )
|
||||
return true;
|
||||
|
||||
wxString msg;
|
||||
WX_STRING_REPORTER reporter( &msg );
|
||||
|
||||
m_libraryModelsMgr.SetForceFullParse();
|
||||
m_libraryModelsMgr.SetLibrary( aLibraryPath, reporter );
|
||||
m_libraryModelsMgr.SetLibrary( aLibraryPath, aReporter );
|
||||
|
||||
if( reporter.HasMessage() )
|
||||
{
|
||||
DisplayErrorMessage( this, msg );
|
||||
if( aReporter.HasMessage() )
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string modelName = SIM_MODEL::GetFieldValue( &m_fields, SIM_LIBRARY::NAME_FIELD );
|
||||
|
||||
for( const auto& [baseModelName, baseModel] : library()->GetModels() )
|
||||
{
|
||||
if( baseModelName == modelName )
|
||||
m_libraryModelsMgr.CreateModel( &baseModel, m_sortedPartPins, m_fields, reporter );
|
||||
m_libraryModelsMgr.CreateModel( &baseModel, m_sortedPartPins, m_fields, aReporter );
|
||||
else
|
||||
m_libraryModelsMgr.CreateModel( &baseModel, m_sortedPartPins, reporter );
|
||||
m_libraryModelsMgr.CreateModel( &baseModel, m_sortedPartPins, aReporter );
|
||||
}
|
||||
|
||||
if( reporter.HasMessage() )
|
||||
DisplayErrorMessage( this, msg );
|
||||
|
||||
m_rbLibraryModel->SetValue( true );
|
||||
m_libraryPathText->ChangeValue( aLibraryPath );
|
||||
|
||||
@@ -1088,16 +1082,16 @@ SIM_MODEL& DIALOG_SIM_MODEL<T_symbol, T_field>::curModel() const
|
||||
{
|
||||
int sel = m_modelNameChoice->GetSelection();
|
||||
|
||||
if( sel >= 0 && sel < (int) m_libraryModelsMgr.GetModels().size() )
|
||||
if( sel >= 0 && sel < static_cast<int>( m_libraryModelsMgr.GetModels().size() ) )
|
||||
return m_libraryModelsMgr.GetModels().at( sel ).get();
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (int) m_curModelType < (int) m_builtinModelsMgr.GetModels().size() )
|
||||
return m_builtinModelsMgr.GetModels().at( (int) m_curModelType );
|
||||
if( static_cast<int>( m_curModelType ) < static_cast<int>( m_builtinModelsMgr.GetModels().size() ) )
|
||||
return m_builtinModelsMgr.GetModels().at( static_cast<int>( m_curModelType ) );
|
||||
}
|
||||
|
||||
return m_builtinModelsMgr.GetModels().at( (int) SIM_MODEL::TYPE::NONE );
|
||||
return m_builtinModelsMgr.GetModels().at( static_cast<int>( SIM_MODEL::TYPE::NONE ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -1174,49 +1168,47 @@ void DIALOG_SIM_MODEL<T_symbol, T_field>::onRadioButton( wxCommandEvent& aEvent
|
||||
}
|
||||
|
||||
|
||||
|
||||
template <typename T_symbol, typename T_field>
|
||||
void DIALOG_SIM_MODEL<T_symbol, T_field>::onLibrarayPathText( wxCommandEvent& aEvent )
|
||||
void DIALOG_SIM_MODEL<T_symbol, T_field>::onLibraryPathText( wxCommandEvent& aEvent )
|
||||
{
|
||||
m_rbLibraryModel->SetValue( true );
|
||||
updateWidgets();
|
||||
}
|
||||
|
||||
|
||||
template <typename T_symbol, typename T_field>
|
||||
void DIALOG_SIM_MODEL<T_symbol, T_field>::onLibraryPathTextEnter( wxCommandEvent& aEvent )
|
||||
{
|
||||
if( m_rbLibraryModel->GetValue() )
|
||||
{
|
||||
wxString path = m_libraryPathText->GetValue();
|
||||
m_rbLibraryModel->SetValue( true );
|
||||
|
||||
if( !path.IsEmpty() )
|
||||
{
|
||||
try
|
||||
{
|
||||
loadLibrary( path );
|
||||
updateWidgets();
|
||||
}
|
||||
catch( const IO_ERROR& )
|
||||
{
|
||||
// TODO: Add an infobar to report the error?
|
||||
}
|
||||
}
|
||||
}
|
||||
wxString msg;
|
||||
WX_STRING_REPORTER reporter( &msg );
|
||||
wxString path = m_libraryPathText->GetValue();
|
||||
|
||||
if( loadLibrary( path, reporter, true ) )
|
||||
m_infoBar->Hide();
|
||||
else if( reporter.HasMessage() )
|
||||
m_infoBar->ShowMessage( msg );
|
||||
|
||||
updateWidgets();
|
||||
}
|
||||
|
||||
|
||||
template <typename T_symbol, typename T_field>
|
||||
void DIALOG_SIM_MODEL<T_symbol, T_field>::onLibraryPathTextKillFocus( wxFocusEvent& aEvent )
|
||||
{
|
||||
if( !m_inKillFocus )
|
||||
{
|
||||
m_inKillFocus = true;
|
||||
CallAfter(
|
||||
[this]()
|
||||
{
|
||||
// Disable logging -- otherwise we'll end up in an endless loop of show-log,
|
||||
// kill-focus, show-log, kill-focus, etc.
|
||||
wxLogNull doNotLog;
|
||||
|
||||
wxCommandEvent dummy;
|
||||
onLibraryPathTextEnter( dummy );
|
||||
wxCommandEvent dummy;
|
||||
onLibraryPathTextEnter( dummy );
|
||||
} );
|
||||
|
||||
m_inKillFocus = false;
|
||||
}
|
||||
aEvent.Skip(); // mandatory in wxFocusEvent events
|
||||
}
|
||||
|
||||
|
||||
@@ -1241,7 +1233,14 @@ void DIALOG_SIM_MODEL<T_symbol, T_field>::onBrowseButtonClick( wxCommandEvent& a
|
||||
if( fn.MakeRelativeTo( Prj().GetProjectPath() ) && !fn.GetFullPath().StartsWith( wxS( ".." ) ) )
|
||||
path = fn.GetFullPath();
|
||||
|
||||
loadLibrary( path, true );
|
||||
wxString msg;
|
||||
WX_STRING_REPORTER reporter( &msg );
|
||||
|
||||
if( loadLibrary( path, reporter, true ) )
|
||||
m_infoBar->Hide();
|
||||
else
|
||||
m_infoBar->ShowMessage( msg );
|
||||
|
||||
updateWidgets();
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,8 @@ private:
|
||||
|
||||
void removeOrphanedPinAssignments( SIM_MODEL* aModel );
|
||||
|
||||
bool loadLibrary( const wxString& aLibraryPath, bool aForceReload = false );
|
||||
bool loadLibrary( const wxString& aLibraryPath, REPORTER& aReporter,
|
||||
bool aForceReload = false );
|
||||
|
||||
void addParamPropertyIfRelevant( SIM_MODEL* aModel, int aParamIndex );
|
||||
wxPGProperty* newParamProperty( SIM_MODEL* aModel, int aParamIndex ) const;
|
||||
@@ -94,7 +95,7 @@ private:
|
||||
int getModelPinIndex( const wxString& aModelPinString ) const;
|
||||
|
||||
void onRadioButton( wxCommandEvent& aEvent ) override;
|
||||
void onLibrarayPathText( wxCommandEvent& aEvent ) override;
|
||||
void onLibraryPathText( wxCommandEvent& aEvent ) override;
|
||||
void onLibraryPathTextEnter( wxCommandEvent& aEvent ) override;
|
||||
void onLibraryPathTextKillFocus( wxFocusEvent& aEvent ) override;
|
||||
void onBrowseButtonClick( wxCommandEvent& aEvent ) override;
|
||||
@@ -140,8 +141,7 @@ private:
|
||||
wxPGProperty* m_firstCategory; // Used to add principal parameters to root.
|
||||
wxPGProperty* m_prevParamGridSelection;
|
||||
|
||||
int m_lastParamGridWidth;
|
||||
bool m_inKillFocus;
|
||||
int m_lastParamGridWidth;
|
||||
};
|
||||
|
||||
#endif /* DIALOG_SIM_MODEL_H */
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "widgets/std_bitmap_button.h"
|
||||
#include "widgets/wx_grid.h"
|
||||
#include "widgets/wx_infobar.h"
|
||||
|
||||
#include "dialog_sim_model_base.h"
|
||||
|
||||
@@ -19,6 +20,13 @@ DIALOG_SIM_MODEL_BASE::DIALOG_SIM_MODEL_BASE( wxWindow* parent, wxWindowID id, c
|
||||
wxBoxSizer* bSizer8;
|
||||
bSizer8 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_infoBar = new WX_INFOBAR( this );
|
||||
m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE );
|
||||
m_infoBar->SetEffectDuration( 500 );
|
||||
m_infoBar->Hide();
|
||||
|
||||
bSizer8->Add( m_infoBar, 0, wxEXPAND, 5 );
|
||||
|
||||
m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_modelPanel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizerPanel;
|
||||
@@ -330,7 +338,7 @@ DIALOG_SIM_MODEL_BASE::DIALOG_SIM_MODEL_BASE( wxWindow* parent, wxWindowID id, c
|
||||
m_rbLibraryModel->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onRadioButton ), NULL, this );
|
||||
m_pathLabel->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathLabelUpdate ), NULL, this );
|
||||
m_libraryPathText->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathTextKillFocus ), NULL, this );
|
||||
m_libraryPathText->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onLibrarayPathText ), NULL, this );
|
||||
m_libraryPathText->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathText ), NULL, this );
|
||||
m_libraryPathText->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathTextEnter ), NULL, this );
|
||||
m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onBrowseButtonClick ), NULL, this );
|
||||
m_browseButton->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onBrowseButtonUpdate ), NULL, this );
|
||||
@@ -367,7 +375,7 @@ DIALOG_SIM_MODEL_BASE::~DIALOG_SIM_MODEL_BASE()
|
||||
m_rbLibraryModel->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onRadioButton ), NULL, this );
|
||||
m_pathLabel->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathLabelUpdate ), NULL, this );
|
||||
m_libraryPathText->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathTextKillFocus ), NULL, this );
|
||||
m_libraryPathText->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onLibrarayPathText ), NULL, this );
|
||||
m_libraryPathText->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathText ), NULL, this );
|
||||
m_libraryPathText->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onLibraryPathTextEnter ), NULL, this );
|
||||
m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SIM_MODEL_BASE::onBrowseButtonClick ), NULL, this );
|
||||
m_browseButton->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SIM_MODEL_BASE::onBrowseButtonUpdate ), NULL, this );
|
||||
|
||||
@@ -63,10 +63,10 @@
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxNotebook" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxInfoBar" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
@@ -77,6 +77,67 @@
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="drag_accept_files">0</property>
|
||||
<property name="duration">500</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">1</property>
|
||||
<property name="hide_effect">wxSHOW_EFFECT_NONE</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_infoBar</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="show_effect">wxSHOW_EFFECT_NONE</property>
|
||||
<property name="size"></property>
|
||||
<property name="subclass">WX_INFOBAR; widgets/wx_infobar.h; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxNotebook" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmapsize"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
@@ -129,10 +190,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -199,10 +260,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -283,10 +344,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -358,10 +419,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -385,7 +446,7 @@
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength"></property>
|
||||
<property name="maxlength">0</property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
@@ -413,7 +474,7 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnKillFocus">onLibraryPathTextKillFocus</event>
|
||||
<event name="OnText">onLibrarayPathText</event>
|
||||
<event name="OnText">onLibraryPathText</event>
|
||||
<event name="OnTextEnter">onLibraryPathTextEnter</event>
|
||||
</object>
|
||||
</object>
|
||||
@@ -426,10 +487,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
@@ -507,10 +568,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -573,10 +634,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -655,10 +716,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -721,10 +782,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -794,10 +855,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -864,10 +925,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -930,10 +991,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1003,10 +1064,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1068,10 +1129,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1146,10 +1207,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1228,10 +1289,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1291,10 +1352,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1358,10 +1419,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1421,10 +1482,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1499,10 +1560,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmapsize"></property>
|
||||
@@ -1558,10 +1619,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1619,10 +1680,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1690,10 +1751,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1751,10 +1812,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="backspace_unindents">1</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
@@ -1834,10 +1895,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1914,10 +1975,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -1975,10 +2036,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="autosize_cols">0</property>
|
||||
<property name="autosize_rows">0</property>
|
||||
<property name="best_size"></property>
|
||||
@@ -2066,10 +2127,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
@@ -2128,10 +2189,10 @@
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_layer">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="aui_position">0</property>
|
||||
<property name="aui_row">0</property>
|
||||
<property name="backspace_unindents">1</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
|
||||
@@ -12,14 +12,16 @@
|
||||
#include <wx/intl.h>
|
||||
class STD_BITMAP_BUTTON;
|
||||
class WX_GRID;
|
||||
class WX_INFOBAR;
|
||||
|
||||
#include "dialog_shim.h"
|
||||
#include <wx/string.h>
|
||||
#include <wx/radiobut.h>
|
||||
#include <wx/infobar.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/radiobut.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/bmpbuttn.h>
|
||||
@@ -52,6 +54,7 @@ class DIALOG_SIM_MODEL_BASE : public DIALOG_SHIM
|
||||
private:
|
||||
|
||||
protected:
|
||||
WX_INFOBAR* m_infoBar;
|
||||
wxNotebook* m_notebook;
|
||||
wxPanel* m_modelPanel;
|
||||
wxRadioButton* m_rbLibraryModel;
|
||||
@@ -91,7 +94,7 @@ class DIALOG_SIM_MODEL_BASE : public DIALOG_SHIM
|
||||
virtual void onRadioButton( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onLibraryPathLabelUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void onLibraryPathTextKillFocus( wxFocusEvent& event ) { event.Skip(); }
|
||||
virtual void onLibrarayPathText( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onLibraryPathText( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onLibraryPathTextEnter( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onBrowseButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onBrowseButtonUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
|
||||
@@ -792,7 +792,7 @@ bool DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow()
|
||||
int unit = m_symbol->GetUnit();
|
||||
LIB_ID libId = m_symbol->GetLibId();
|
||||
|
||||
for( SCH_SHEET_PATH& sheet : GetParent()->Schematic().GetSheets() )
|
||||
for( SCH_SHEET_PATH& sheet : GetParent()->Schematic().GetUnorderedSheets() )
|
||||
{
|
||||
SCH_SCREEN* screen = sheet.LastScreen();
|
||||
std::vector<SCH_SYMBOL*> otherUnits;
|
||||
|
||||
@@ -150,7 +150,7 @@ DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES( SCH_EDIT_FRAME* aParent, SCH_ITE
|
||||
|
||||
m_separator5->SetIsSeparator();
|
||||
|
||||
SCH_SHEET_LIST sheetList = m_frame->Schematic().GetSheets();
|
||||
SCH_SHEET_LIST sheetList = m_frame->Schematic().GetUnorderedSheets();
|
||||
sheetList.SortByPageNumbers( false );
|
||||
|
||||
for( const SCH_SHEET_PATH& sheet : sheetList )
|
||||
@@ -471,21 +471,10 @@ bool DIALOG_TEXT_PROPERTIES::TransferDataFromWindow()
|
||||
m_italic->IsChecked() ) );
|
||||
}
|
||||
|
||||
if( m_bold->IsChecked() != m_currentText->IsBold() )
|
||||
{
|
||||
if( m_bold->IsChecked() )
|
||||
{
|
||||
m_currentText->SetBold( true );
|
||||
m_currentText->SetTextThickness( GetPenSizeForBold( m_currentText->GetTextWidth() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_currentText->SetBold( false );
|
||||
m_currentText->SetTextThickness( 0 ); // Use default pen width
|
||||
}
|
||||
}
|
||||
|
||||
// Must come after SetTextSize()
|
||||
m_currentText->SetBold( m_bold->IsChecked() );
|
||||
m_currentText->SetItalic( m_italic->IsChecked() );
|
||||
|
||||
m_currentText->SetTextColor( m_textColorSwatch->GetSwatchColor() );
|
||||
|
||||
if( m_hAlignRight->IsChecked() )
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <../sim/simulator_frame.h>
|
||||
#include <dialog_user_defined_signals.h>
|
||||
#include <string_utils.h>
|
||||
#include <validators.h>
|
||||
|
||||
|
||||
DIALOG_USER_DEFINED_SIGNALS::DIALOG_USER_DEFINED_SIGNALS( SIMULATOR_FRAME* aParent,
|
||||
@@ -86,12 +87,19 @@ void DIALOG_USER_DEFINED_SIGNALS::addGridRow( const wxString& aText, int aId )
|
||||
m_grid->SetCellValue( row, 1, wxString::Format( wxS( "%d" ), aId ) );
|
||||
|
||||
wxGridCellAttr* attr = new wxGridCellAttr;
|
||||
#if defined( __WXMSW__ )
|
||||
// For some obscure reason, a GRID_CELL_STC_EDITOR does not work on MSW:
|
||||
// It has a strange behavior when entering data, making it unusable.
|
||||
// (see https://gitlab.com/kicad/code/kicad/-/issues/15837)
|
||||
// So use a GRID_CELL_TEXT_EDITOR.
|
||||
attr->SetEditor( new GRID_CELL_TEXT_EDITOR() );
|
||||
#else
|
||||
attr->SetEditor( new GRID_CELL_STC_EDITOR( true,
|
||||
[this]( wxStyledTextEvent& aEvent, SCINTILLA_TRICKS* aScintillaTricks )
|
||||
{
|
||||
onScintillaCharAdded( aEvent, aScintillaTricks );
|
||||
} ) );
|
||||
|
||||
#endif
|
||||
m_grid->SetAttr( row, 0, attr );
|
||||
}
|
||||
|
||||
|
||||
@@ -106,7 +106,11 @@ PANEL_EESCHEMA_COLOR_SETTINGS::~PANEL_EESCHEMA_COLOR_SETTINGS()
|
||||
delete m_currentSettings;
|
||||
|
||||
for( EDA_ITEM* item : m_previewItems )
|
||||
{
|
||||
// Avoid referencing items after they are deleted (we don't control order)
|
||||
item->SetParent( nullptr );
|
||||
delete item;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -226,6 +226,11 @@ protected:
|
||||
m_grid->AutoSizeColumns( false );
|
||||
}
|
||||
}
|
||||
|
||||
bool supportsVisibilityColumn() override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
+67
-76
@@ -131,12 +131,9 @@ const std::set<ELECTRICAL_PINTYPE> DrivenPinTypes =
|
||||
|
||||
int ERC_TESTER::TestDuplicateSheetNames( bool aCreateMarker )
|
||||
{
|
||||
SCH_SCREEN* screen;
|
||||
int err_count = 0;
|
||||
int err_count = 0;
|
||||
|
||||
SCH_SCREENS screenList( m_schematic->Root() );
|
||||
|
||||
for( screen = screenList.GetFirst(); screen != nullptr; screen = screenList.GetNext() )
|
||||
for( SCH_SCREEN* screen = m_screens.GetFirst(); screen; screen = m_screens.GetNext() )
|
||||
{
|
||||
std::vector<SCH_SHEET*> list;
|
||||
|
||||
@@ -197,7 +194,7 @@ void ERC_TESTER::TestTextVars( DS_PROXY_VIEW_ITEM* aDrawingSheet )
|
||||
wsItems.BuildDrawItemsList( aDrawingSheet->GetPageInfo(), aDrawingSheet->GetTitleBlock() );
|
||||
}
|
||||
|
||||
for( SCH_SHEET_PATH& sheet : m_schematic->GetSheets() )
|
||||
for( const SCH_SHEET_PATH& sheet : m_sheetList )
|
||||
{
|
||||
SCH_SCREEN* screen = sheet.LastScreen();
|
||||
|
||||
@@ -300,13 +297,11 @@ void ERC_TESTER::TestTextVars( DS_PROXY_VIEW_ITEM* aDrawingSheet )
|
||||
|
||||
int ERC_TESTER::TestConflictingBusAliases()
|
||||
{
|
||||
wxString msg;
|
||||
int err_count = 0;
|
||||
wxString msg;
|
||||
int err_count = 0;
|
||||
std::vector<std::shared_ptr<BUS_ALIAS>> aliases;
|
||||
|
||||
SCH_SCREENS screens( m_schematic->Root() );
|
||||
std::vector< std::shared_ptr<BUS_ALIAS> > aliases;
|
||||
|
||||
for( SCH_SCREEN* screen = screens.GetFirst(); screen != nullptr; screen = screens.GetNext() )
|
||||
for( SCH_SCREEN* screen = m_screens.GetFirst(); screen; screen = m_screens.GetNext() )
|
||||
{
|
||||
const auto& screen_aliases = screen->GetBusAliases();
|
||||
|
||||
@@ -347,13 +342,9 @@ int ERC_TESTER::TestConflictingBusAliases()
|
||||
|
||||
int ERC_TESTER::TestMultiunitFootprints()
|
||||
{
|
||||
SCH_SHEET_LIST sheets = m_schematic->GetSheets();
|
||||
|
||||
int errors = 0;
|
||||
SCH_MULTI_UNIT_REFERENCE_MAP refMap;
|
||||
sheets.GetMultiUnitSymbols( refMap, true );
|
||||
|
||||
for( std::pair<const wxString, SCH_REFERENCE_LIST>& symbol : refMap )
|
||||
for( std::pair<const wxString, SCH_REFERENCE_LIST>& symbol : m_refMap )
|
||||
{
|
||||
SCH_REFERENCE_LIST& refList = symbol.second;
|
||||
|
||||
@@ -412,14 +403,9 @@ int ERC_TESTER::TestMultiunitFootprints()
|
||||
|
||||
int ERC_TESTER::TestMissingUnits()
|
||||
{
|
||||
ERC_SETTINGS& settings = m_schematic->ErcSettings();
|
||||
SCH_SHEET_LIST sheets = m_schematic->GetSheets();
|
||||
|
||||
int errors = 0;
|
||||
SCH_MULTI_UNIT_REFERENCE_MAP refMap;
|
||||
sheets.GetMultiUnitSymbols( refMap, true );
|
||||
|
||||
for( std::pair<const wxString, SCH_REFERENCE_LIST>& symbol : refMap )
|
||||
for( std::pair<const wxString, SCH_REFERENCE_LIST>& symbol : m_refMap )
|
||||
{
|
||||
SCH_REFERENCE_LIST& refList = symbol.second;
|
||||
|
||||
@@ -437,38 +423,40 @@ int ERC_TESTER::TestMissingUnits()
|
||||
std::set<int> instance_units;
|
||||
std::set<int> missing_units;
|
||||
|
||||
auto report_missing = [&]( std::set<int>& aMissingUnits, wxString aErrorMsg,
|
||||
int aErrorCode )
|
||||
{
|
||||
wxString msg;
|
||||
wxString missing_pin_units = wxS( "[ " );
|
||||
int ii = 0;
|
||||
|
||||
for( int missing_unit : aMissingUnits )
|
||||
{
|
||||
if( ii++ == 3 )
|
||||
auto report_missing =
|
||||
[&]( std::set<int>& aMissingUnits, wxString aErrorMsg, int aErrorCode )
|
||||
{
|
||||
missing_pin_units += wxS( "....." );
|
||||
break;
|
||||
}
|
||||
wxString msg;
|
||||
wxString missing_pin_units = wxS( "[ " );
|
||||
int ii = 0;
|
||||
|
||||
missing_pin_units += libSymbol->GetUnitDisplayName( missing_unit ) + ", " ;
|
||||
}
|
||||
for( int missing_unit : aMissingUnits )
|
||||
{
|
||||
if( ii++ == 3 )
|
||||
{
|
||||
missing_pin_units += wxS( "....." );
|
||||
break;
|
||||
}
|
||||
|
||||
missing_pin_units.Truncate( missing_pin_units.length() - 2 );
|
||||
missing_pin_units += wxS( " ]" );
|
||||
missing_pin_units += libSymbol->GetUnitDisplayName( missing_unit ) + ", " ;
|
||||
}
|
||||
|
||||
msg.Printf( aErrorMsg, symbol.first, missing_pin_units );
|
||||
missing_pin_units.Truncate( missing_pin_units.length() - 2 );
|
||||
missing_pin_units += wxS( " ]" );
|
||||
|
||||
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( aErrorCode );
|
||||
ercItem->SetErrorMessage( msg );
|
||||
ercItem->SetItems( unit );
|
||||
msg.Printf( aErrorMsg, symbol.first, missing_pin_units );
|
||||
|
||||
SCH_MARKER* marker = new SCH_MARKER( ercItem, unit->GetPosition() );
|
||||
base_ref.GetSheetPath().LastScreen()->Append( marker );
|
||||
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() );
|
||||
|
||||
++errors;
|
||||
};
|
||||
SCH_MARKER* marker = new SCH_MARKER( ercItem, unit->GetPosition() );
|
||||
base_ref.GetSheetPath().LastScreen()->Append( marker );
|
||||
|
||||
++errors;
|
||||
};
|
||||
|
||||
for( int ii = 1; ii <= libSymbol->GetUnitCount(); ++ii )
|
||||
lib_units.insert( lib_units.end(), ii );
|
||||
@@ -480,7 +468,7 @@ int ERC_TESTER::TestMissingUnits()
|
||||
instance_units.begin(), instance_units.end(),
|
||||
std::inserter( missing_units, missing_units.begin() ) );
|
||||
|
||||
if( !missing_units.empty() && settings.IsTestEnabled( ERCE_MISSING_UNIT ) )
|
||||
if( !missing_units.empty() && m_settings.IsTestEnabled( ERCE_MISSING_UNIT ) )
|
||||
{
|
||||
report_missing( missing_units, _( "Symbol %s has unplaced units %s" ),
|
||||
ERCE_MISSING_UNIT );
|
||||
@@ -528,21 +516,21 @@ int ERC_TESTER::TestMissingUnits()
|
||||
}
|
||||
}
|
||||
|
||||
if( !missing_power.empty() && settings.IsTestEnabled( ERCE_MISSING_POWER_INPUT_PIN ) )
|
||||
if( !missing_power.empty() && m_settings.IsTestEnabled( ERCE_MISSING_POWER_INPUT_PIN ) )
|
||||
{
|
||||
report_missing( missing_power,
|
||||
_( "Symbol %s has input power pins in units %s that are not placed." ),
|
||||
ERCE_MISSING_POWER_INPUT_PIN );
|
||||
}
|
||||
|
||||
if( !missing_input.empty() && settings.IsTestEnabled( ERCE_MISSING_INPUT_PIN ) )
|
||||
if( !missing_input.empty() && m_settings.IsTestEnabled( ERCE_MISSING_INPUT_PIN ) )
|
||||
{
|
||||
report_missing( missing_input,
|
||||
_( "Symbol %s has input pins in units %s that are not placed." ),
|
||||
ERCE_MISSING_INPUT_PIN );
|
||||
}
|
||||
|
||||
if( !missing_bidi.empty() && settings.IsTestEnabled( ERCE_MISSING_BIDI_PIN ) )
|
||||
if( !missing_bidi.empty() && m_settings.IsTestEnabled( ERCE_MISSING_BIDI_PIN ) )
|
||||
{
|
||||
report_missing( missing_bidi,
|
||||
_( "Symbol %s has bidirectional pins in units %s that are not "
|
||||
@@ -576,7 +564,7 @@ int ERC_TESTER::TestMissingNetclasses()
|
||||
sheet.LastScreen()->Append( marker );
|
||||
};
|
||||
|
||||
for( const SCH_SHEET_PATH& sheet : m_schematic->GetSheets() )
|
||||
for( const SCH_SHEET_PATH& sheet : m_sheetList )
|
||||
{
|
||||
for( SCH_ITEM* item : sheet.LastScreen()->Items() )
|
||||
{
|
||||
@@ -612,7 +600,7 @@ int ERC_TESTER::TestNoConnectPins()
|
||||
{
|
||||
int err_count = 0;
|
||||
|
||||
for( const SCH_SHEET_PATH& sheet : m_schematic->GetSheets() )
|
||||
for( const SCH_SHEET_PATH& sheet : m_sheetList )
|
||||
{
|
||||
std::map<VECTOR2I, std::vector<SCH_ITEM*>> pinMap;
|
||||
|
||||
@@ -679,12 +667,9 @@ int ERC_TESTER::TestNoConnectPins()
|
||||
|
||||
int ERC_TESTER::TestPinToPin()
|
||||
{
|
||||
ERC_SETTINGS& settings = m_schematic->ErcSettings();
|
||||
const NET_MAP& nets = m_schematic->ConnectionGraph()->GetNetMap();
|
||||
|
||||
int errors = 0;
|
||||
|
||||
for( const std::pair<NET_NAME_CODE_CACHE_KEY, std::vector<CONNECTION_SUBGRAPH*>> net : nets )
|
||||
for( const std::pair<NET_NAME_CODE_CACHE_KEY, std::vector<CONNECTION_SUBGRAPH*>> net : m_nets )
|
||||
{
|
||||
std::vector<ERC_SCH_PIN_CONTEXT> pins;
|
||||
std::unordered_map<EDA_ITEM*, SCH_SCREEN*> pinToScreenMap;
|
||||
@@ -705,6 +690,21 @@ int ERC_TESTER::TestPinToPin()
|
||||
}
|
||||
}
|
||||
|
||||
std::sort( pins.begin(), pins.end(),
|
||||
[]( const ERC_SCH_PIN_CONTEXT& lhs, const ERC_SCH_PIN_CONTEXT& rhs )
|
||||
{
|
||||
int ret = StrNumCmp( lhs.Pin()->GetParentSymbol()->GetRef( &lhs.Sheet() ),
|
||||
rhs.Pin()->GetParentSymbol()->GetRef( &rhs.Sheet() ) );
|
||||
|
||||
if( ret == 0 )
|
||||
ret = StrNumCmp( lhs.Pin()->GetNumber(), rhs.Pin()->GetNumber() );
|
||||
|
||||
if( ret == 0 )
|
||||
ret = lhs < rhs; // Fallback to hash to guarantee deterministic sort
|
||||
|
||||
return ret < 0;
|
||||
} );
|
||||
|
||||
ERC_SCH_PIN_CONTEXT needsDriver;
|
||||
bool hasDriver = false;
|
||||
|
||||
@@ -765,9 +765,9 @@ int ERC_TESTER::TestPinToPin()
|
||||
else
|
||||
hasDriver |= ( DrivingPinTypes.count( testType ) != 0 );
|
||||
|
||||
PIN_ERROR erc = settings.GetPinMapValue( refType, testType );
|
||||
PIN_ERROR erc = m_settings.GetPinMapValue( refType, testType );
|
||||
|
||||
if( erc != PIN_ERROR::OK && settings.IsTestEnabled( ERCE_PIN_TO_PIN_WARNING ) )
|
||||
if( erc != PIN_ERROR::OK && m_settings.IsTestEnabled( ERCE_PIN_TO_PIN_WARNING ) )
|
||||
{
|
||||
std::shared_ptr<ERC_ITEM> ercItem =
|
||||
ERC_ITEM::Create( erc == PIN_ERROR::WARNING ? ERCE_PIN_TO_PIN_WARNING :
|
||||
@@ -793,7 +793,7 @@ int ERC_TESTER::TestPinToPin()
|
||||
{
|
||||
int err_code = ispowerNet ? ERCE_POWERPIN_NOT_DRIVEN : ERCE_PIN_NOT_DRIVEN;
|
||||
|
||||
if( settings.IsTestEnabled( err_code ) )
|
||||
if( m_settings.IsTestEnabled( err_code ) )
|
||||
{
|
||||
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( err_code );
|
||||
|
||||
@@ -815,13 +815,11 @@ int ERC_TESTER::TestPinToPin()
|
||||
|
||||
int ERC_TESTER::TestMultUnitPinConflicts()
|
||||
{
|
||||
const NET_MAP& nets = m_schematic->ConnectionGraph()->GetNetMap();
|
||||
|
||||
int errors = 0;
|
||||
|
||||
std::unordered_map<wxString, std::pair<wxString, SCH_PIN*>> pinToNetMap;
|
||||
|
||||
for( const std::pair<NET_NAME_CODE_CACHE_KEY, std::vector<CONNECTION_SUBGRAPH*>> net : nets )
|
||||
for( const std::pair<NET_NAME_CODE_CACHE_KEY, std::vector<CONNECTION_SUBGRAPH*>> net : m_nets )
|
||||
{
|
||||
const wxString& netName = net.first.Name;
|
||||
|
||||
@@ -875,13 +873,11 @@ int ERC_TESTER::TestMultUnitPinConflicts()
|
||||
|
||||
int ERC_TESTER::TestSimilarLabels()
|
||||
{
|
||||
const NET_MAP& nets = m_schematic->ConnectionGraph()->GetNetMap();
|
||||
|
||||
int errors = 0;
|
||||
|
||||
std::unordered_map<wxString, std::pair<SCH_LABEL_BASE*, SCH_SHEET_PATH>> labelMap;
|
||||
|
||||
for( const std::pair<NET_NAME_CODE_CACHE_KEY, std::vector<CONNECTION_SUBGRAPH*>> net : nets )
|
||||
for( const std::pair<NET_NAME_CODE_CACHE_KEY, std::vector<CONNECTION_SUBGRAPH*>> net : m_nets )
|
||||
{
|
||||
for( CONNECTION_SUBGRAPH* subgraph : net.second )
|
||||
{
|
||||
@@ -942,9 +938,7 @@ int ERC_TESTER::TestLibSymbolIssues()
|
||||
wxString msg;
|
||||
int err_count = 0;
|
||||
|
||||
SCH_SCREENS screens( m_schematic->Root() );
|
||||
|
||||
for( SCH_SCREEN* screen = screens.GetFirst(); screen != nullptr; screen = screens.GetNext() )
|
||||
for( SCH_SCREEN* screen = m_screens.GetFirst(); screen; screen = m_screens.GetNext() )
|
||||
{
|
||||
std::vector<SCH_MARKER*> markers;
|
||||
|
||||
@@ -1027,11 +1021,9 @@ int ERC_TESTER::TestLibSymbolIssues()
|
||||
int ERC_TESTER::TestOffGridEndpoints()
|
||||
{
|
||||
const int gridSize = m_schematic->Settings().m_ConnectionGridSize;
|
||||
int err_count = 0;
|
||||
|
||||
SCH_SCREENS screens( m_schematic->Root() );
|
||||
int err_count = 0;
|
||||
|
||||
for( SCH_SCREEN* screen = screens.GetFirst(); screen != nullptr; screen = screens.GetNext() )
|
||||
for( SCH_SCREEN* screen = m_screens.GetFirst(); screen; screen = m_screens.GetNext() )
|
||||
{
|
||||
std::vector<SCH_MARKER*> markers;
|
||||
|
||||
@@ -1093,11 +1085,10 @@ int ERC_TESTER::TestSimModelIssues()
|
||||
{
|
||||
wxString msg;
|
||||
WX_STRING_REPORTER reporter( &msg );
|
||||
SCH_SHEET_LIST sheets = m_schematic->GetSheets();
|
||||
int err_count = 0;
|
||||
SIM_LIB_MGR libMgr( &m_schematic->Prj() );
|
||||
|
||||
for( SCH_SHEET_PATH& sheet : sheets )
|
||||
for( SCH_SHEET_PATH& sheet : m_sheetList )
|
||||
{
|
||||
std::vector<SCH_MARKER*> markers;
|
||||
|
||||
|
||||
+14
-4
@@ -27,9 +27,10 @@
|
||||
#define ERC_H
|
||||
|
||||
#include <erc_settings.h>
|
||||
#include <sch_screen.h>
|
||||
#include <connection_graph.h>
|
||||
|
||||
|
||||
class SCH_SHEET_LIST;
|
||||
class SCHEMATIC;
|
||||
class DS_PROXY_VIEW_ITEM;
|
||||
class SCH_EDIT_FRAME;
|
||||
@@ -47,8 +48,13 @@ class ERC_TESTER
|
||||
public:
|
||||
|
||||
ERC_TESTER( SCHEMATIC* aSchematic ) :
|
||||
m_schematic( aSchematic )
|
||||
m_schematic( aSchematic ),
|
||||
m_settings( aSchematic->ErcSettings() ),
|
||||
m_sheetList( aSchematic->GetSheets() ),
|
||||
m_screens( aSchematic->Root() ),
|
||||
m_nets( aSchematic->ConnectionGraph()->GetNetMap() )
|
||||
{
|
||||
m_sheetList.GetMultiUnitSymbols( m_refMap, true );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -139,8 +145,12 @@ public:
|
||||
KIFACE* aCvPcb, PROJECT* aProject, PROGRESS_REPORTER* aProgressReporter );
|
||||
|
||||
private:
|
||||
|
||||
SCHEMATIC* m_schematic;
|
||||
SCHEMATIC* m_schematic;
|
||||
ERC_SETTINGS& m_settings;
|
||||
SCH_SHEET_LIST m_sheetList;
|
||||
SCH_SCREENS m_screens;
|
||||
SCH_MULTI_UNIT_REFERENCE_MAP m_refMap;
|
||||
const NET_MAP& m_nets;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
#include <erc_sch_pin_context.h>
|
||||
|
||||
|
||||
SCH_PIN* ERC_SCH_PIN_CONTEXT::Pin()
|
||||
SCH_PIN* ERC_SCH_PIN_CONTEXT::Pin() const
|
||||
{
|
||||
return m_pin;
|
||||
}
|
||||
|
||||
|
||||
SCH_SHEET_PATH& ERC_SCH_PIN_CONTEXT::Sheet()
|
||||
const SCH_SHEET_PATH& ERC_SCH_PIN_CONTEXT::Sheet() const
|
||||
{
|
||||
return m_sheet;
|
||||
}
|
||||
|
||||
@@ -56,12 +56,12 @@ public:
|
||||
/**
|
||||
* Get the SCH_PIN for this context.
|
||||
*/
|
||||
SCH_PIN* Pin();
|
||||
SCH_PIN* Pin() const;
|
||||
|
||||
/**
|
||||
* Get the #SCH_SHEET_PATH context for the paired #SCH_PIN.
|
||||
*/
|
||||
SCH_SHEET_PATH& Sheet();
|
||||
const SCH_SHEET_PATH& Sheet() const;
|
||||
|
||||
/**
|
||||
* Test two pin contexts for equality based on the deterministic hash.
|
||||
|
||||
@@ -53,11 +53,10 @@ void FIELDS_EDITOR_GRID_DATA_MODEL::AddColumn( const wxString& aFieldName, const
|
||||
void FIELDS_EDITOR_GRID_DATA_MODEL::updateDataStoreSymbolField( const SCH_SYMBOL& aSymbol,
|
||||
const wxString& aFieldName )
|
||||
{
|
||||
if( const SCH_FIELD* field = aSymbol.GetFieldByName( aFieldName ) )
|
||||
m_dataStore[aSymbol.m_Uuid][aFieldName] = field->GetText();
|
||||
else if( isAttribute( aFieldName ) )
|
||||
if( isAttribute( aFieldName ) )
|
||||
m_dataStore[aSymbol.m_Uuid][aFieldName] = getAttributeValue( aSymbol, aFieldName );
|
||||
|
||||
else if( const SCH_FIELD* field = aSymbol.GetFieldByName( aFieldName ) )
|
||||
m_dataStore[aSymbol.m_Uuid][aFieldName] = field->GetText();
|
||||
// Handle fields with variables as names that are not present in the symbol
|
||||
// by giving them the correct value
|
||||
else if( IsTextVar( aFieldName ) )
|
||||
@@ -85,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;
|
||||
|
||||
+16
-7
@@ -146,6 +146,7 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
||||
// unload current project file before loading new
|
||||
{
|
||||
ClearUndoRedoList();
|
||||
ClearRepeatItemsList();
|
||||
SetScreen( nullptr );
|
||||
m_toolManager->GetTool<EE_INSPECTION_TOOL>()->Reset( TOOL_BASE::SUPERMODEL_RELOAD );
|
||||
CreateScreens();
|
||||
@@ -180,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 );
|
||||
SCH_IO_MGR::SCH_FILE_T schFileType = SCH_IO_MGR::GuessPluginTypeFromSchPath( fullFileName,
|
||||
KICTL_KICAD_ONLY );
|
||||
|
||||
if( schFileType == SCH_IO_MGR::SCH_LEGACY )
|
||||
{
|
||||
@@ -230,7 +232,10 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
||||
|
||||
if( schFileType == SCH_IO_MGR::SCH_FILE_T::SCH_FILE_UNKNOWN )
|
||||
{
|
||||
msg.Printf( _( "Unsupported schematic file '%s'." ), fullFileName );
|
||||
msg.Printf( _( "'%s' is not a KiCad schematic file.\nUse File -> Import for "
|
||||
"non-KiCad schematic files." ),
|
||||
fullFileName );
|
||||
|
||||
progressReporter.Hide();
|
||||
DisplayErrorMessage( this, msg );
|
||||
}
|
||||
@@ -488,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() )
|
||||
@@ -507,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();
|
||||
|
||||
@@ -742,6 +749,7 @@ void SCH_EDIT_FRAME::OnImportProject( wxCommandEvent& aEvent )
|
||||
// Don't leave dangling pointers to previously-opened document.
|
||||
m_toolManager->GetTool<EE_SELECTION_TOOL>()->ClearSelection();
|
||||
ClearUndoRedoList();
|
||||
ClearRepeatItemsList();
|
||||
|
||||
if( setProject )
|
||||
{
|
||||
@@ -1075,7 +1083,7 @@ bool SCH_EDIT_FRAME::SaveProject( bool aSaveAs )
|
||||
// File doesn't exist yet; true if we just imported something
|
||||
updateFileHistory = true;
|
||||
}
|
||||
else if( !Schematic().GetSheets().IsModified() )
|
||||
else if( !IsContentModified() )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -1462,6 +1470,7 @@ bool SCH_EDIT_FRAME::importFile( const wxString& aFileName, int aFileType,
|
||||
}
|
||||
|
||||
ClearUndoRedoList();
|
||||
ClearRepeatItemsList();
|
||||
|
||||
initScreenZoom();
|
||||
SetSheetNumberAndCount();
|
||||
|
||||
@@ -669,6 +669,7 @@ std::unique_ptr< LIB_SYMBOL > LIB_SYMBOL::Flatten() const
|
||||
retv->SetExcludedFromBoard( parent->GetExcludedFromBoard() );
|
||||
|
||||
retv->UpdateFieldOrdinals();
|
||||
retv->m_parent.reset();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -171,7 +171,8 @@ static wxString GetNetNavigatorItemText( const SCH_ITEM* aItem,
|
||||
|
||||
|
||||
void SCH_EDIT_FRAME::MakeNetNavigatorNode( const wxString& aNetName, wxTreeItemId aParentId,
|
||||
const NET_NAVIGATOR_ITEM_DATA* aSelection )
|
||||
const NET_NAVIGATOR_ITEM_DATA* aSelection,
|
||||
bool aSingleSheetSchematic )
|
||||
{
|
||||
wxCHECK( !aNetName.IsEmpty(), /* void */ );
|
||||
wxCHECK( m_schematic, /* void */ );
|
||||
@@ -206,7 +207,7 @@ void SCH_EDIT_FRAME::MakeNetNavigatorNode( const wxString& aNetName, wxTreeItemI
|
||||
m_netNavigator->SelectItem( sheetId );
|
||||
|
||||
// If there is only one sheet in the schematic, always expand the sheet tree.
|
||||
if( Schematic().GetSheets().size() == 1 )
|
||||
if( aSingleSheetSchematic )
|
||||
expandId = sheetId;
|
||||
|
||||
for( const SCH_ITEM* item : subGraph->GetItems() )
|
||||
@@ -243,6 +244,8 @@ void SCH_EDIT_FRAME::RefreshNetNavigator( const NET_NAVIGATOR_ITEM_DATA* aSelect
|
||||
if( m_netNavigator->IsEmpty() && m_highlightedConn.IsEmpty() )
|
||||
return;
|
||||
|
||||
bool singleSheetSchematic = m_schematic->GetUnorderedSheets().size() == 1;
|
||||
|
||||
if( !m_netNavigator->IsEmpty() && m_highlightedConn.IsEmpty() )
|
||||
{
|
||||
m_netNavigator->DeleteAllItems();
|
||||
@@ -259,7 +262,7 @@ void SCH_EDIT_FRAME::RefreshNetNavigator( const NET_NAVIGATOR_ITEM_DATA* aSelect
|
||||
|
||||
wxTreeItemId rootId = m_netNavigator->AddRoot( UnescapeString( m_highlightedConn ), 0 );
|
||||
|
||||
MakeNetNavigatorNode( m_highlightedConn, rootId, aSelection );
|
||||
MakeNetNavigatorNode( m_highlightedConn, rootId, aSelection, singleSheetSchematic );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -273,14 +276,14 @@ void SCH_EDIT_FRAME::RefreshNetNavigator( const NET_NAVIGATOR_ITEM_DATA* aSelect
|
||||
m_netNavigator->DeleteAllItems();
|
||||
wxTreeItemId rootId = m_netNavigator->AddRoot( UnescapeString( m_highlightedConn ), 0 );
|
||||
|
||||
MakeNetNavigatorNode( m_highlightedConn, rootId, itemData );
|
||||
MakeNetNavigatorNode( m_highlightedConn, rootId, itemData, singleSheetSchematic );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wxTreeItemId rootId = m_netNavigator->AddRoot( UnescapeString( m_highlightedConn ), 0 );
|
||||
|
||||
MakeNetNavigatorNode( m_highlightedConn, rootId, aSelection );
|
||||
MakeNetNavigatorNode( m_highlightedConn, rootId, aSelection, singleSheetSchematic );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -84,8 +84,7 @@ bool NETLIST_EXPORTER_ORCADPCB2::WriteNetlist( const wxString& aOutFileName,
|
||||
if( symbol->GetLibSymbolRef()
|
||||
&& symbol->GetLibSymbolRef()->GetFPFilters().GetCount() != 0 )
|
||||
{
|
||||
cmpList.push_back( SCH_REFERENCE( symbol, symbol->GetLibSymbolRef().get(),
|
||||
sheet ) );
|
||||
cmpList.push_back( SCH_REFERENCE( symbol, sheet ) );
|
||||
}
|
||||
|
||||
footprint = symbol->GetFootprintFieldText( true, &sheet, false );
|
||||
|
||||
@@ -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 );
|
||||
|
||||
+12
-10
@@ -404,6 +404,11 @@ SCH_EDIT_FRAME::~SCH_EDIT_FRAME()
|
||||
if( m_schematic )
|
||||
m_schematic->RemoveAllListeners();
|
||||
|
||||
// Delete all items not in draw list before deleting schematic
|
||||
// to avoid dangling pointers stored in these items
|
||||
ClearUndoRedoList();
|
||||
ClearRepeatItemsList();
|
||||
|
||||
delete m_schematic;
|
||||
m_schematic = nullptr;
|
||||
|
||||
@@ -774,7 +779,7 @@ void SCH_EDIT_FRAME::AddCopyForRepeatItem( const SCH_ITEM* aItem )
|
||||
|
||||
EDA_ITEM* SCH_EDIT_FRAME::GetItem( const KIID& aId ) const
|
||||
{
|
||||
return Schematic().GetSheets().GetItem( aId );
|
||||
return Schematic().GetItem( aId );
|
||||
}
|
||||
|
||||
|
||||
@@ -894,7 +899,7 @@ bool SCH_EDIT_FRAME::canCloseWindow( wxCloseEvent& aEvent )
|
||||
|
||||
// Shutdown blocks must be determined and vetoed as early as possible
|
||||
if( KIPLATFORM::APP::SupportsShutdownBlockReason() && aEvent.GetId() == wxEVT_QUERY_END_SESSION
|
||||
&& Schematic().GetSheets().IsModified() )
|
||||
&& IsContentModified() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -942,9 +947,7 @@ bool SCH_EDIT_FRAME::canCloseWindow( wxCloseEvent& aEvent )
|
||||
if( !Schematic().IsValid() )
|
||||
return false;
|
||||
|
||||
SCH_SHEET_LIST sheetlist = Schematic().GetSheets();
|
||||
|
||||
if( sheetlist.IsModified() )
|
||||
if( IsContentModified() )
|
||||
{
|
||||
wxFileName fileName = Schematic().RootScreen()->GetFileName();
|
||||
wxString msg = _( "Save changes to '%s' before closing?" );
|
||||
@@ -965,7 +968,7 @@ bool SCH_EDIT_FRAME::canCloseWindow( wxCloseEvent& aEvent )
|
||||
|
||||
void SCH_EDIT_FRAME::doCloseWindow()
|
||||
{
|
||||
SCH_SHEET_LIST sheetlist = Schematic().GetSheets();
|
||||
SCH_SHEET_LIST sheetlist = Schematic().GetUnorderedSheets();
|
||||
|
||||
// Shutdown all running tools
|
||||
if( m_toolManager )
|
||||
@@ -1057,7 +1060,7 @@ void SCH_EDIT_FRAME::doCloseWindow()
|
||||
// Make sure local settings are persisted
|
||||
SaveProjectLocalSettings();
|
||||
|
||||
Schematic().RootScreen()->Clear();
|
||||
Schematic().RootScreen()->Clear( true );
|
||||
|
||||
// all sub sheets are deleted, only the main sheet is usable
|
||||
GetCurrentSheet().clear();
|
||||
@@ -2037,7 +2040,7 @@ const BOX2I SCH_EDIT_FRAME::GetDocumentExtents( bool aIncludeAllVisible ) const
|
||||
|
||||
bool SCH_EDIT_FRAME::IsContentModified() const
|
||||
{
|
||||
return Schematic().GetSheets().IsModified();
|
||||
return Schematic().GetUnorderedSheets().IsModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -2052,9 +2055,8 @@ void SCH_EDIT_FRAME::FocusOnItem( SCH_ITEM* aItem )
|
||||
{
|
||||
static KIID lastBrightenedItemID( niluuid );
|
||||
|
||||
SCH_SHEET_LIST sheetList = Schematic().GetSheets();
|
||||
SCH_SHEET_PATH dummy;
|
||||
SCH_ITEM* lastItem = sheetList.GetItem( lastBrightenedItemID, &dummy );
|
||||
SCH_ITEM* lastItem = Schematic().GetItem( lastBrightenedItemID, &dummy );
|
||||
|
||||
if( lastItem && lastItem != aItem )
|
||||
{
|
||||
|
||||
@@ -710,6 +710,15 @@ public:
|
||||
return m_items_to_repeat;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the list of items which are to be repeated with the insert key.
|
||||
* These objects are owned by this container.
|
||||
*/
|
||||
void ClearRepeatItemsList()
|
||||
{
|
||||
m_items_to_repeat.clear();
|
||||
}
|
||||
|
||||
EDA_ITEM* GetItem( const KIID& aId ) const override;
|
||||
|
||||
/**
|
||||
@@ -866,7 +875,8 @@ public:
|
||||
void RefreshNetNavigator( const NET_NAVIGATOR_ITEM_DATA* aSelection = nullptr );
|
||||
|
||||
void MakeNetNavigatorNode( const wxString& aNetName, wxTreeItemId aParentId,
|
||||
const NET_NAVIGATOR_ITEM_DATA* aSelection = nullptr );
|
||||
const NET_NAVIGATOR_ITEM_DATA* aSelection,
|
||||
bool aSingleSheetSchematic );
|
||||
|
||||
void SelectNetNavigatorItem( const NET_NAVIGATOR_ITEM_DATA* aSelection = nullptr );
|
||||
|
||||
|
||||
+36
-5
@@ -195,15 +195,30 @@ wxString SCH_FIELD::GetShownText( const SCH_SHEET_PATH* aPath, bool aAllowExtraT
|
||||
return symbol->ResolveTextVar( aPath, token, aDepth + 1 );
|
||||
};
|
||||
|
||||
std::function<bool( wxString* )> schematicResolver =
|
||||
[&]( wxString* token ) -> bool
|
||||
{
|
||||
if( SCHEMATIC* schematic = Schematic() )
|
||||
return schematic->ResolveTextVar( aPath, token, aDepth + 1 );
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
std::function<bool( wxString* )> sheetResolver =
|
||||
[&]( wxString* token ) -> bool
|
||||
{
|
||||
SCH_SHEET* sheet = static_cast<SCH_SHEET*>( m_parent );
|
||||
|
||||
SCHEMATIC* schematic = Schematic();
|
||||
SCH_SHEET_PATH path = *aPath;
|
||||
path.push_back( sheet );
|
||||
|
||||
return sheet->ResolveTextVar( &path, token, aDepth + 1 );
|
||||
bool retval = sheet->ResolveTextVar( &path, token, aDepth + 1 );
|
||||
|
||||
if( schematic )
|
||||
retval |= schematic->ResolveTextVar( &path, token, aDepth + 1 );
|
||||
|
||||
return retval;
|
||||
};
|
||||
|
||||
std::function<bool( wxString* )> labelResolver =
|
||||
@@ -222,7 +237,8 @@ wxString SCH_FIELD::GetShownText( const SCH_SHEET_PATH* aPath, bool aAllowExtraT
|
||||
{
|
||||
text = wxS( "" );
|
||||
}
|
||||
else if( HasTextVars() )
|
||||
|
||||
for( int ii = 0; ii < 10 && text.Contains( wxT( "${" ) ); ++ii )
|
||||
{
|
||||
if( aDepth < 10 )
|
||||
{
|
||||
@@ -233,7 +249,10 @@ wxString SCH_FIELD::GetShownText( const SCH_SHEET_PATH* aPath, bool aAllowExtraT
|
||||
else if( m_parent && m_parent->IsType( { SCH_LABEL_LOCATE_ANY_T } ) )
|
||||
text = ExpandTextVars( text, &labelResolver );
|
||||
else if( Schematic() )
|
||||
{
|
||||
text = ExpandTextVars( text, &Schematic()->Prj() );
|
||||
text = ExpandTextVars( text, &schematicResolver );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -740,11 +759,10 @@ void SCH_FIELD::OnScintillaCharAdded( SCINTILLA_TRICKS* aScintillaTricks,
|
||||
}
|
||||
else
|
||||
{
|
||||
SCH_SHEET_LIST sheets = schematic->GetSheets();
|
||||
SCH_REFERENCE_LIST refs;
|
||||
SCH_SYMBOL* refSymbol = nullptr;
|
||||
|
||||
sheets.GetSymbols( refs );
|
||||
schematic->GetUnorderedSheets().GetSymbols( refs );
|
||||
|
||||
for( size_t jj = 0; jj < refs.GetCount(); jj++ )
|
||||
{
|
||||
@@ -998,7 +1016,11 @@ void SCH_FIELD::SetText( const wxString& aText )
|
||||
if( m_isNamedVariable )
|
||||
return;
|
||||
|
||||
EDA_TEXT::SetText( aText );
|
||||
// Mandatory fields should not have leading or trailing whitespace.
|
||||
if( IsMandatory() )
|
||||
EDA_TEXT::SetText( aText.Strip( wxString::both ) );
|
||||
else
|
||||
EDA_TEXT::SetText( aText );
|
||||
}
|
||||
|
||||
|
||||
@@ -1291,6 +1313,15 @@ VECTOR2I SCH_FIELD::GetParentPosition() const
|
||||
}
|
||||
|
||||
|
||||
bool SCH_FIELD::IsMandatory() const
|
||||
{
|
||||
if( m_parent && m_parent->Type() == SCH_SHEET_T )
|
||||
return m_id >= 0 && m_id < SHEET_MANDATORY_FIELDS;
|
||||
else
|
||||
return m_id >= 0 && m_id < MANDATORY_FIELDS;
|
||||
}
|
||||
|
||||
|
||||
bool SCH_FIELD::operator <( const SCH_ITEM& aItem ) const
|
||||
{
|
||||
if( Type() != aItem.Type() )
|
||||
|
||||
@@ -209,6 +209,8 @@ public:
|
||||
*/
|
||||
void ImportValues( const LIB_FIELD& aSource );
|
||||
|
||||
bool IsMandatory() const;
|
||||
|
||||
int GetPenWidth() const override;
|
||||
|
||||
void ClearCaches() override;
|
||||
|
||||
@@ -460,7 +460,8 @@ ASCH_ROUND_RECTANGLE::ASCH_ROUND_RECTANGLE( const std::map<wxString, wxString>&
|
||||
|
||||
ASCH_ARC::ASCH_ARC( const std::map<wxString, wxString>& aProps ) :
|
||||
ASCH_OWNER_INTERFACE( aProps ),
|
||||
ASCH_BORDER_INTERFACE( aProps )
|
||||
ASCH_BORDER_INTERFACE( aProps ),
|
||||
ASCH_FILL_INTERFACE( aProps )
|
||||
{
|
||||
m_IsElliptical = ReadRecord( aProps ) == ALTIUM_SCH_RECORD::ELLIPTICAL_ARC;
|
||||
wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::ARC || m_IsElliptical );
|
||||
@@ -478,6 +479,11 @@ ASCH_ARC::ASCH_ARC( const std::map<wxString, wxString>& aProps ) :
|
||||
}
|
||||
|
||||
|
||||
ASCH_PIECHART::ASCH_PIECHART( const std::map<wxString, wxString>& aProps ) :
|
||||
ASCH_ARC( aProps )
|
||||
{}
|
||||
|
||||
|
||||
ASCH_ELLIPSE::ASCH_ELLIPSE( const std::map<wxString, wxString>& aProps ) :
|
||||
ASCH_OWNER_INTERFACE( aProps ),
|
||||
ASCH_FILL_INTERFACE( aProps ),
|
||||
|
||||
@@ -482,7 +482,7 @@ struct ASCH_ROUND_RECTANGLE : ASCH_OWNER_INTERFACE, ASCH_FILL_INTERFACE, ASCH_BO
|
||||
};
|
||||
|
||||
|
||||
struct ASCH_ARC : ASCH_OWNER_INTERFACE, ASCH_BORDER_INTERFACE
|
||||
struct ASCH_ARC : ASCH_OWNER_INTERFACE, ASCH_BORDER_INTERFACE, ASCH_FILL_INTERFACE
|
||||
{
|
||||
bool m_IsElliptical;
|
||||
VECTOR2I m_Center;
|
||||
@@ -495,6 +495,12 @@ struct ASCH_ARC : ASCH_OWNER_INTERFACE, ASCH_BORDER_INTERFACE
|
||||
};
|
||||
|
||||
|
||||
struct ASCH_PIECHART : ASCH_ARC
|
||||
{
|
||||
explicit ASCH_PIECHART( const std::map<wxString, wxString>& aProps );
|
||||
};
|
||||
|
||||
|
||||
struct ASCH_ELLIPSE : ASCH_OWNER_INTERFACE, ASCH_FILL_INTERFACE, ASCH_BORDER_INTERFACE
|
||||
{
|
||||
VECTOR2I Center;
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
|
||||
#include <bezier_curves.h>
|
||||
#include <compoundfilereader.h>
|
||||
#include <font/fontconfig.h>
|
||||
#include <geometry/ellipse.h>
|
||||
#include <string_utils.h>
|
||||
#include <sch_edit_frame.h>
|
||||
@@ -325,6 +326,9 @@ SCH_SHEET* SCH_IO_ALTIUM::LoadSchematicFile( const wxString& aFileName, SCHEMATI
|
||||
fileName.SetExt( FILEEXT::KiCadSchematicFileExtension );
|
||||
m_schematic = aSchematic;
|
||||
|
||||
// Show the font substitution warnings
|
||||
fontconfig::FONTCONFIG::SetReporter( &WXLOG_REPORTER::GetInstance() );
|
||||
|
||||
// Delete on exception, if I own m_rootSheet, according to aAppendToMe
|
||||
std::unique_ptr<SCH_SHEET> deleter( aAppendToMe ? nullptr : m_rootSheet );
|
||||
|
||||
@@ -892,9 +896,9 @@ void SCH_IO_ALTIUM::ParseRecord( int index, std::map<wxString, wxString>& proper
|
||||
ParseEllipse( properties );
|
||||
break;
|
||||
|
||||
case ALTIUM_SCH_RECORD::PIECHART:
|
||||
m_reporter->Report( _( "Record 'PIECHART' not handled." ), RPT_SEVERITY_INFO );
|
||||
break;
|
||||
case ALTIUM_SCH_RECORD::PIECHART:
|
||||
ParsePieChart( properties );
|
||||
break;
|
||||
|
||||
case ALTIUM_SCH_RECORD::ROUND_RECTANGLE:
|
||||
ParseRoundRectangle( properties );
|
||||
@@ -1483,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 );
|
||||
@@ -1537,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() )
|
||||
{
|
||||
@@ -1617,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 );
|
||||
@@ -2152,7 +2161,9 @@ void SCH_IO_ALTIUM::ParseArc( const std::map<wxString, wxString>& aProperties,
|
||||
|
||||
circle->SetPosition( elem.m_Center + m_sheetOffset );
|
||||
circle->SetEnd( circle->GetPosition() + VECTOR2I( arc_radius, 0 ) );
|
||||
circle->SetStroke( STROKE_PARAMS( elem.LineWidth, LINE_STYLE::SOLID ) );
|
||||
|
||||
SetSchShapeLine( elem, circle );
|
||||
SetSchShapeFillAndColor( elem, circle );
|
||||
|
||||
currentScreen->Append( circle );
|
||||
}
|
||||
@@ -2168,7 +2179,8 @@ void SCH_IO_ALTIUM::ParseArc( const std::map<wxString, wxString>& aProperties,
|
||||
arc->SetStart( elem.m_Center + startOffset + m_sheetOffset );
|
||||
arc->SetArcAngleAndEnd( includedAngle.Normalize(), true );
|
||||
|
||||
arc->SetStroke( STROKE_PARAMS( elem.LineWidth, LINE_STYLE::SOLID ) );
|
||||
SetSchShapeLine( elem, arc );
|
||||
SetSchShapeFillAndColor( elem, arc );
|
||||
|
||||
currentScreen->Append( arc );
|
||||
}
|
||||
@@ -2214,6 +2226,7 @@ void SCH_IO_ALTIUM::ParseArc( const std::map<wxString, wxString>& aProperties,
|
||||
|
||||
circle->SetEnd( circle->GetPosition() + VECTOR2I( arc_radius, 0 ) );
|
||||
SetLibShapeLine( elem, circle, ALTIUM_SCH_RECORD::ARC );
|
||||
SetLibShapeFillAndColor( elem, circle, ALTIUM_SCH_RECORD::ARC, elem.Color );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2241,6 +2254,7 @@ void SCH_IO_ALTIUM::ParseArc( const std::map<wxString, wxString>& aProperties,
|
||||
arc->SetArcAngleAndEnd( includedAngle.Normalize(), true );
|
||||
|
||||
SetLibShapeLine( elem, arc, ALTIUM_SCH_RECORD::ARC );
|
||||
SetLibShapeFillAndColor( elem, arc, ALTIUM_SCH_RECORD::ARC, elem.Color );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2341,6 +2355,92 @@ void SCH_IO_ALTIUM::ParseEllipticalArc( const std::map<wxString, wxString>& aPro
|
||||
}
|
||||
|
||||
|
||||
void SCH_IO_ALTIUM::ParsePieChart( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
{
|
||||
ParseArc( aProperties, aSymbol );
|
||||
|
||||
ASCH_PIECHART elem( aProperties );
|
||||
|
||||
int arc_radius = elem.m_Radius;
|
||||
VECTOR2I center = elem.m_Center;
|
||||
EDA_ANGLE startAngle( elem.m_EndAngle, DEGREES_T );
|
||||
EDA_ANGLE endAngle( elem.m_StartAngle, DEGREES_T );
|
||||
VECTOR2I startOffset( KiROUND( arc_radius * startAngle.Cos() ),
|
||||
-KiROUND( arc_radius * startAngle.Sin() ) );
|
||||
VECTOR2I endOffset( KiROUND( arc_radius * endAngle.Cos() ),
|
||||
-KiROUND( arc_radius * endAngle.Sin() ) );
|
||||
|
||||
if( aSymbol.empty() && ShouldPutItemOnSheet( elem.ownerindex ) )
|
||||
{
|
||||
SCH_SCREEN* screen = getCurrentScreen();
|
||||
wxCHECK( screen, /* void */ );
|
||||
|
||||
// close polygon
|
||||
SCH_LINE* line = new SCH_LINE( center + m_sheetOffset, SCH_LAYER_ID::LAYER_NOTES );
|
||||
line->SetEndPoint( center + startOffset + m_sheetOffset );
|
||||
line->SetStroke( STROKE_PARAMS( elem.LineWidth, LINE_STYLE::SOLID ) );
|
||||
|
||||
line->SetFlags( IS_NEW );
|
||||
screen->Append( line );
|
||||
|
||||
line = new SCH_LINE( center + m_sheetOffset, SCH_LAYER_ID::LAYER_NOTES );
|
||||
line->SetEndPoint( center + endOffset + m_sheetOffset );
|
||||
line->SetStroke( STROKE_PARAMS( elem.LineWidth, LINE_STYLE::SOLID ) );
|
||||
|
||||
line->SetFlags( IS_NEW );
|
||||
screen->Append( line );
|
||||
}
|
||||
else
|
||||
{
|
||||
LIB_SYMBOL* symbol = (int) aSymbol.size() <= elem.ownerpartdisplaymode
|
||||
? nullptr
|
||||
: aSymbol[elem.ownerpartdisplaymode];
|
||||
SCH_SYMBOL* schsym = nullptr;
|
||||
|
||||
if( !symbol )
|
||||
{
|
||||
const auto& libSymbolIt = m_libSymbols.find( elem.ownerindex );
|
||||
|
||||
if( libSymbolIt == m_libSymbols.end() )
|
||||
{
|
||||
// TODO: e.g. can depend on Template (RECORD=39
|
||||
m_reporter->Report( wxString::Format( wxT( "Piechart's owner (%d) not found." ),
|
||||
elem.ownerindex ),
|
||||
RPT_SEVERITY_DEBUG );
|
||||
return;
|
||||
}
|
||||
|
||||
symbol = libSymbolIt->second;
|
||||
schsym = m_symbols.at( libSymbolIt->first );
|
||||
}
|
||||
|
||||
if( aSymbol.empty() && !IsComponentPartVisible( elem ) )
|
||||
return;
|
||||
|
||||
LIB_SHAPE* line = new LIB_SHAPE( symbol, SHAPE_T::POLY );
|
||||
symbol->AddDrawItem( line, false );
|
||||
|
||||
line->SetUnit( std::max( 0, elem.ownerpartid ) );
|
||||
|
||||
if( !schsym )
|
||||
{
|
||||
line->AddPoint( center + startOffset );
|
||||
line->AddPoint( center );
|
||||
line->AddPoint( center + endOffset );
|
||||
}
|
||||
else
|
||||
{
|
||||
line->AddPoint( GetRelativePosition( center + startOffset + m_sheetOffset, schsym ) );
|
||||
line->AddPoint( GetRelativePosition( center + m_sheetOffset, schsym ) );
|
||||
line->AddPoint( GetRelativePosition( center + endOffset + m_sheetOffset, schsym ) );
|
||||
}
|
||||
|
||||
SetLibShapeLine( elem, line, ALTIUM_SCH_RECORD::LINE );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SCH_IO_ALTIUM::ParseEllipse( const std::map<wxString, wxString>& aProperties,
|
||||
std::vector<LIB_SYMBOL*>& aSymbol )
|
||||
{
|
||||
@@ -3193,8 +3293,8 @@ void SCH_IO_ALTIUM::ParsePowerPort( const std::map<wxString, wxString>& aPropert
|
||||
{
|
||||
libSymbol = powerSymbolIt->second; // cache hit
|
||||
}
|
||||
else if( LIB_SYMBOL* alreadyLoaded =
|
||||
m_pi->LoadSymbol( getLibFileName().GetFullPath(), elem.text, m_properties.get() ) )
|
||||
else if( LIB_SYMBOL* alreadyLoaded = m_pi->LoadSymbol( getLibFileName().GetFullPath(), symName,
|
||||
m_properties.get() ) )
|
||||
{
|
||||
libSymbol = alreadyLoaded;
|
||||
}
|
||||
@@ -3327,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 );
|
||||
@@ -4210,6 +4312,8 @@ std::map<wxString,LIB_SYMBOL*> SCH_IO_ALTIUM::ParseLibFile( const ALTIUM_COMPOUN
|
||||
|
||||
case ALTIUM_SCH_RECORD::ELLIPSE: ParseEllipse( properties, symbols ); break;
|
||||
|
||||
case ALTIUM_SCH_RECORD::PIECHART: ParsePieChart( properties, symbols ); break;
|
||||
|
||||
case ALTIUM_SCH_RECORD::ROUND_RECTANGLE: ParseRoundRectangle( properties, symbols ); break;
|
||||
|
||||
case ALTIUM_SCH_RECORD::ELLIPTICAL_ARC: ParseEllipticalArc( properties, symbols ); break;
|
||||
@@ -4292,6 +4396,9 @@ long long SCH_IO_ALTIUM::getLibraryTimestamp( const wxString& aLibraryPath ) con
|
||||
void SCH_IO_ALTIUM::ensureLoadedLibrary( const wxString& aLibraryPath,
|
||||
const STRING_UTF8_MAP* aProperties )
|
||||
{
|
||||
// Suppress font substitution warnings
|
||||
fontconfig::FONTCONFIG::SetReporter( nullptr );
|
||||
|
||||
if( m_libCache.count( aLibraryPath ) )
|
||||
{
|
||||
wxCHECK( m_timestamps.count( aLibraryPath ), /*void*/ );
|
||||
|
||||
@@ -152,6 +152,7 @@ private:
|
||||
void ParseHarnessType( const std::map<wxString, wxString>& aProperties );
|
||||
void ParseHarnessPort( const ASCH_PORT& aElem );
|
||||
void ParseHyperlink( const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol = nullsym);
|
||||
void ParsePieChart( const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol = nullsym);
|
||||
void ParseRectangle( const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol = nullsym);
|
||||
void ParseSheetSymbol( int aIndex, const std::map<wxString, wxString>& aProperties );
|
||||
void ParseSheetEntry( const std::map<wxString, wxString>& aProperties );
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <sch_io/cadstar/sch_io_cadstar_archive.h>
|
||||
#include <io/cadstar/cadstar_parts_lib_parser.h>
|
||||
|
||||
#include <font/fontconfig.h>
|
||||
#include <lib_symbol.h>
|
||||
#include <progress_reporter.h>
|
||||
#include <project_sch.h>
|
||||
@@ -68,6 +69,9 @@ SCH_SHEET* SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile( const wxString& aFi
|
||||
{
|
||||
wxCHECK( !aFileName.IsEmpty() && aSchematic, nullptr );
|
||||
|
||||
// Show the font substitution warnings
|
||||
fontconfig::FONTCONFIG::SetReporter( &WXLOG_REPORTER::GetInstance() );
|
||||
|
||||
SCH_SHEET* rootSheet = nullptr;
|
||||
|
||||
|
||||
@@ -251,6 +255,9 @@ void SCH_IO_CADSTAR_ARCHIVE::ensureLoadedLibrary( const wxString& aLibraryPath,
|
||||
wxFileName csafn;
|
||||
wxString fplibname = "cadstarpcblib";
|
||||
|
||||
// Suppress font substitution warnings
|
||||
fontconfig::FONTCONFIG::SetReporter( nullptr );
|
||||
|
||||
if( aProperties && aProperties->count( "csa" ) )
|
||||
{
|
||||
csafn = wxFileName( aProperties->at( "csa" ) );
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user