Push UI preferences to child edit and view windows. (fixes lp:1468388)
* Push center on zoom, use middle mouse button to pan, limit panning, and pan while moving object settings from schematic editor to symbol library editor and symbol library viewer child windows. * Push center on zoom, use middle mouse button to pan, limit panning, and pan while moving object settings from board editor to footprint library editor and footprint library viewer child windows.
This commit is contained in:
parent
11275f78e5
commit
0aa9fad668
|
@ -745,6 +745,16 @@ void EDA_DRAW_FRAME::UpdateMsgPanel()
|
|||
SetMsgPanel( item );
|
||||
}
|
||||
|
||||
// FIXME: There needs to be a better way for child windows to load preferences.
|
||||
// This function pushes four preferences from a parent window to a child window
|
||||
// i.e. from eeschema to the schematic symbol editor
|
||||
void EDA_DRAW_FRAME::PushPreferences( const EDA_DRAW_PANEL* aParentCanvas )
|
||||
{
|
||||
m_canvas->SetEnableZoomNoCenter( aParentCanvas->GetEnableZoomNoCenter() );
|
||||
m_canvas->SetEnableMiddleButtonPan( aParentCanvas->GetEnableMiddleButtonPan() );
|
||||
m_canvas->SetMiddleButtonPanLimited( aParentCanvas->GetMiddleButtonPanLimited() );
|
||||
m_canvas->SetEnableAutoPan( aParentCanvas->GetEnableAutoPan() );
|
||||
}
|
||||
|
||||
wxString EDA_DRAW_FRAME::CoordinateToString( int aValue, bool aConvertToMils ) const
|
||||
{
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <libeditframe.h>
|
||||
#include <base_units.h>
|
||||
#include <kiway.h>
|
||||
#include <class_drawpanel.h>
|
||||
|
||||
// Sttaic members:
|
||||
|
||||
|
@ -51,6 +52,8 @@ void SCH_BASE_FRAME::OnOpenLibraryViewer( wxCommandEvent& event )
|
|||
{
|
||||
LIB_VIEW_FRAME* viewlibFrame = (LIB_VIEW_FRAME*) Kiway().Player( FRAME_SCH_VIEWER, true );
|
||||
|
||||
viewlibFrame->PushPreferences( m_canvas );
|
||||
|
||||
// On Windows, Raise() does not bring the window on screen, when iconized
|
||||
if( viewlibFrame->IsIconized() )
|
||||
viewlibFrame->Iconize( false );
|
||||
|
|
|
@ -1123,6 +1123,8 @@ void SCH_EDIT_FRAME::OnOpenLibraryEditor( wxCommandEvent& event )
|
|||
libeditFrame->Show( true );
|
||||
}
|
||||
|
||||
libeditFrame->PushPreferences( m_canvas );
|
||||
|
||||
// On Windows, Raise() does not bring the window on screen, when iconized
|
||||
if( libeditFrame->IsIconized() )
|
||||
libeditFrame->Iconize( false );
|
||||
|
|
|
@ -725,6 +725,15 @@ public:
|
|||
*/
|
||||
virtual void UpdateMsgPanel();
|
||||
|
||||
/**
|
||||
* Function PushPreferences
|
||||
* Pushes a few preferences from a parent window to a child window.
|
||||
* (i.e. from eeschema to schematic symbol editor)
|
||||
*
|
||||
* @param aParentCanvas is the parent canvas to push preferences from.
|
||||
*/
|
||||
void PushPreferences( const EDA_DRAW_PANEL* aParentCanvas );
|
||||
|
||||
/**
|
||||
* Function PrintPage
|
||||
* used to print a page
|
||||
|
|
|
@ -218,6 +218,8 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
if( wxWindow::FindFocus() != editor )
|
||||
editor->SetFocus();
|
||||
}
|
||||
|
||||
editor->PushPreferences( m_canvas );
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -244,6 +246,8 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
if( wxWindow::FindFocus() != viewer )
|
||||
viewer->SetFocus();
|
||||
}
|
||||
|
||||
viewer->PushPreferences( m_canvas );
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue