Make sure SCH-related frames use the schematic worksheet color.
Fixes https://gitlab.com/kicad/code/kicad/issues/6843
This commit is contained in:
parent
7a081b7c04
commit
0d57f90982
|
@ -653,6 +653,15 @@ void DIALOG_PAGES_SETTINGS::UpdatePageLayoutExample()
|
|||
renderSettings.LoadColors( colorSettings );
|
||||
renderSettings.SetPrintDC( &memDC );
|
||||
|
||||
if( m_parent->IsType( FRAME_SCH )
|
||||
|| m_parent->IsType( FRAME_SCH_SYMBOL_EDITOR )
|
||||
|| m_parent->IsType( FRAME_SCH_VIEWER )
|
||||
|| m_parent->IsType( FRAME_SCH_VIEWER_MODAL ) )
|
||||
{
|
||||
COLOR4D worksheetColor = renderSettings.GetLayerColor( LAYER_SCHEMATIC_WORKSHEET );
|
||||
renderSettings.SetLayerColor( LAYER_WORKSHEET, worksheetColor );
|
||||
}
|
||||
|
||||
GRFilledRect( NULL, &memDC, 0, 0, m_layout_size.x, m_layout_size.y, bgColor, bgColor );
|
||||
|
||||
PrintPageLayout( &renderSettings, pageDUMMY, emptyString, emptyString, m_tb,
|
||||
|
@ -783,12 +792,13 @@ void DIALOG_PAGES_SETTINGS::OnWksFileSelection( wxCommandEvent& event )
|
|||
// For Win/Linux/macOS compatibility, a relative path is a good idea
|
||||
if( shortFileName != GetWksFileName() && shortFileName != fileName )
|
||||
{
|
||||
wxString msg = wxString::Format( _(
|
||||
"The page layout description file name has changed.\n"
|
||||
"Do you want to use the relative path:\n"
|
||||
"\"%s\"\n"
|
||||
"instead of\n"
|
||||
"\"%s\"?" ), shortFileName, fileName );
|
||||
wxString msg = wxString::Format( _( "The page layout description file name has changed.\n"
|
||||
"Do you want to use the relative path:\n"
|
||||
"\"%s\"\n"
|
||||
"instead of\n"
|
||||
"\"%s\"?" ),
|
||||
shortFileName,
|
||||
fileName );
|
||||
|
||||
if( !IsOK( this, msg ) )
|
||||
shortFileName = fileName;
|
||||
|
|
|
@ -39,8 +39,8 @@ class PCB_BASE_EDIT_FRAME : public PCB_BASE_FRAME
|
|||
{
|
||||
public:
|
||||
PCB_BASE_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType,
|
||||
const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize,
|
||||
long aStyle, const wxString& aFrameName );
|
||||
const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize,
|
||||
long aStyle, const wxString& aFrameName );
|
||||
|
||||
virtual ~PCB_BASE_EDIT_FRAME();
|
||||
|
||||
|
@ -90,7 +90,7 @@ public:
|
|||
* commands like move
|
||||
*/
|
||||
void SaveCopyInUndoList( EDA_ITEM* aItemToCopy, UNDO_REDO aTypeCommand,
|
||||
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) ) override;
|
||||
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) ) override;
|
||||
|
||||
/**
|
||||
* Function SaveCopyInUndoList
|
||||
|
@ -102,7 +102,7 @@ public:
|
|||
* for commands like move
|
||||
*/
|
||||
void SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList, UNDO_REDO aTypeCommand,
|
||||
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) ) override;
|
||||
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) ) override;
|
||||
|
||||
/**
|
||||
* Function RestoreCopyFromRedoList
|
||||
|
|
Loading…
Reference in New Issue