Don't paint hidden fields without a schematic context
This commit is contained in:
parent
8694c37376
commit
afab26d554
|
@ -215,6 +215,9 @@ void PANEL_EESCHEMA_COLOR_SETTINGS::createSwatches()
|
|||
m_preview->ShowScrollbars( wxSHOW_SB_NEVER, wxSHOW_SB_NEVER );
|
||||
m_preview->GetGAL()->SetAxesEnabled( false );
|
||||
|
||||
KIGFX::SCH_RENDER_SETTINGS* settings = m_preview->GetRenderSettings();
|
||||
settings->m_IsSymbolEditor = true;
|
||||
|
||||
m_colorsMainSizer->Add( 10, 0, 0, wxEXPAND, 5 );
|
||||
m_colorsMainSizer->Add( m_preview, 1, wxALL | wxEXPAND, 5 );
|
||||
m_colorsMainSizer->Add( 10, 0, 0, wxEXPAND, 5 );
|
||||
|
|
|
@ -869,7 +869,7 @@ void SCH_PAINTER::draw( const LIB_FIELD *aField, int aLayer )
|
|||
|
||||
if( !( aField->IsVisible() || aField->IsForceVisible() ) )
|
||||
{
|
||||
if( !m_schematic || eeconfig()->m_Appearance.show_hidden_fields )
|
||||
if( m_schSettings.m_IsSymbolEditor || eeconfig()->m_Appearance.show_hidden_fields )
|
||||
color = getRenderColor( aField, LAYER_HIDDEN, drawingShadows );
|
||||
else
|
||||
return;
|
||||
|
|
|
@ -54,7 +54,7 @@ SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL( wxWindow* aParentWindow, wxWindowID aWindo
|
|||
|
||||
m_painter.reset( new KIGFX::SCH_PAINTER( m_gal ) );
|
||||
|
||||
auto* renderSettings = static_cast<KIGFX::SCH_RENDER_SETTINGS*>( m_painter->GetSettings() );
|
||||
KIGFX::SCH_RENDER_SETTINGS* renderSettings = GetRenderSettings();
|
||||
renderSettings->LoadColors( Pgm().GetSettingsManager().GetColorSettings() );
|
||||
renderSettings->m_ShowPinsElectricalType = false;
|
||||
renderSettings->m_TextOffsetRatio = 0.35;
|
||||
|
@ -89,6 +89,12 @@ SCH_PREVIEW_PANEL::~SCH_PREVIEW_PANEL()
|
|||
}
|
||||
|
||||
|
||||
KIGFX::SCH_RENDER_SETTINGS* SCH_PREVIEW_PANEL::GetRenderSettings() const
|
||||
{
|
||||
return static_cast<KIGFX::SCH_RENDER_SETTINGS*>( m_painter->GetSettings() );
|
||||
}
|
||||
|
||||
|
||||
void SCH_PREVIEW_PANEL::OnShow()
|
||||
{
|
||||
//m_view->RecacheAllItems();
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
|
||||
namespace KIGFX {
|
||||
class SCH_RENDER_SETTINGS;
|
||||
class SCH_VIEW;
|
||||
namespace PREVIEW {
|
||||
class SELECTION_AREA;
|
||||
|
@ -51,6 +52,8 @@ public:
|
|||
/// @copydoc wxWindow::Refresh()
|
||||
void Refresh( bool aEraseBackground, const wxRect* aRect ) override;
|
||||
|
||||
KIGFX::SCH_RENDER_SETTINGS* GetRenderSettings() const;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
|
Loading…
Reference in New Issue