Minor fixes in page layout editor
This commit is contained in:
parent
611878351a
commit
68002d2eec
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// C++ code generated with wxFormBuilder (version Dec 1 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -9,7 +9,7 @@
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
|
||||
PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
|
||||
{
|
||||
wxBoxSizer* bSizerpanel;
|
||||
bSizerpanel = new wxBoxSizer( wxVERTICAL );
|
||||
|
@ -314,8 +314,6 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
|
|||
|
||||
m_staticTextThickness = new wxStaticText( m_swItemProperties, wxID_ANY, _("Line width:"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
|
||||
m_staticTextThickness->Wrap( -1 );
|
||||
m_staticTextThickness->SetMinSize( wxSize( 76,-1 ) );
|
||||
|
||||
m_SizerLineThickness->Add( m_staticTextThickness, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_textCtrlThickness = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
@ -337,8 +335,6 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
|
|||
|
||||
m_staticTextRot = new wxStaticText( m_swItemProperties, wxID_ANY, _("Rotation:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextRot->Wrap( -1 );
|
||||
m_staticTextRot->SetMinSize( wxSize( 76,-1 ) );
|
||||
|
||||
fgSizerRotation->Add( m_staticTextRot, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_textCtrlRotation = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
@ -359,8 +355,6 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
|
|||
|
||||
m_staticTextBitmapPPI1 = new wxStaticText( m_swItemProperties, wxID_ANY, _("Bitmap DPI:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextBitmapPPI1->Wrap( -1 );
|
||||
m_staticTextBitmapPPI1->SetMinSize( wxSize( 76,-1 ) );
|
||||
|
||||
fgSizerPPI->Add( m_staticTextBitmapPPI1, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_textCtrlBitmapPPI = new wxTextCtrl( m_swItemProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
@ -455,6 +449,7 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
|
|||
m_SizerItemProperties->Add( m_staticline8, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
m_buttonOK = new wxButton( m_swItemProperties, wxID_ANY, _("Apply"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
||||
m_buttonOK->SetDefault();
|
||||
m_SizerItemProperties->Add( m_buttonOK, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
@ -654,6 +649,7 @@ PANEL_PROPERTIES_BASE::PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, c
|
|||
bSizerGeneralOpts->Add( bSizerGeneraMargins, 0, wxEXPAND|wxBOTTOM, 15 );
|
||||
|
||||
m_buttonGeneralOptsOK = new wxButton( m_swGeneralOpts, wxID_ANY, _("Apply"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
||||
m_buttonGeneralOptsOK->SetDefault();
|
||||
bSizerGeneralOpts->Add( m_buttonGeneralOptsOK, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,12 +1,11 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// C++ code generated with wxFormBuilder (version Dec 1 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __PROPERTIES_FRAME_BASE_H__
|
||||
#define __PROPERTIES_FRAME_BASE_H__
|
||||
#pragma once
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
|
@ -23,11 +22,11 @@
|
|||
#include <wx/textctrl.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/combobox.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/scrolwin.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/scrolwin.h>
|
||||
#include <wx/notebook.h>
|
||||
#include <wx/panel.h>
|
||||
|
||||
|
@ -152,9 +151,8 @@ class PANEL_PROPERTIES_BASE : public wxPanel
|
|||
|
||||
public:
|
||||
|
||||
PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 340,775 ), long style = wxTAB_TRAVERSAL );
|
||||
PANEL_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 340,775 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||
~PANEL_PROPERTIES_BASE();
|
||||
|
||||
};
|
||||
|
||||
#endif //__PROPERTIES_FRAME_BASE_H__
|
||||
|
|
|
@ -47,6 +47,7 @@ PL_DRAW_PANEL_GAL::PL_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWindo
|
|||
|
||||
m_painter.reset( new KIGFX::WS_PAINTER( m_gal ) );
|
||||
m_view->SetPainter( m_painter.get() );
|
||||
m_view->SetScaleLimits( 20.0, 0.05 ); // This fixes the zoom in and zoom out limits
|
||||
|
||||
setDefaultLayerDeps();
|
||||
|
||||
|
@ -76,12 +77,29 @@ void PL_DRAW_PANEL_GAL::DisplayWorksheet()
|
|||
selTool->GetSelection().Clear();
|
||||
m_view->Clear();
|
||||
|
||||
// Obviously, always show the page limit:
|
||||
m_edaFrame->SetShowPageLimits( true );
|
||||
auto painter = m_view->GetPainter();
|
||||
auto settings = painter->GetSettings();
|
||||
settings->SetShowPageLimits( true );
|
||||
|
||||
model.SetupDrawEnvironment( m_edaFrame->GetPageSettings(), Mils2iu( 1 ) );
|
||||
|
||||
for( WS_DATA_ITEM* dataItem : model.GetItems() )
|
||||
dataItem->SyncDrawItems( nullptr, m_view );
|
||||
|
||||
selTool->RebuildSelection();
|
||||
|
||||
// Gives a reasonable boundary to the view area
|
||||
// Otherwise scroll bars are not usable
|
||||
// A full size = 2 * page size allows a margin around the worksheet.
|
||||
// (Note: no need to have a large working area: nothing can be drawn outside th page size).
|
||||
double size_x = m_edaFrame->GetPageSizeIU().x;
|
||||
double size_y = m_edaFrame->GetPageSizeIU().y;
|
||||
BOX2D boundary( VECTOR2D( -size_x/4 , -size_y/4 ),
|
||||
VECTOR2D( size_x * 1.5, size_y * 1.5) );
|
||||
m_view->SetBoundary( boundary );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -41,9 +41,7 @@
|
|||
*/
|
||||
static const double pl_editorZoomList[] =
|
||||
{
|
||||
ZOOM_FACTOR( 5 ),
|
||||
ZOOM_FACTOR( 7.0 ),
|
||||
ZOOM_FACTOR( 10.0 ),
|
||||
ZOOM_FACTOR( 10.0 ), // Zoom in
|
||||
ZOOM_FACTOR( 15.0 ),
|
||||
ZOOM_FACTOR( 22.0 ),
|
||||
ZOOM_FACTOR( 35.0 ),
|
||||
|
@ -60,10 +58,11 @@ static const double pl_editorZoomList[] =
|
|||
ZOOM_FACTOR( 1500.0 ),
|
||||
ZOOM_FACTOR( 2000.0 ),
|
||||
ZOOM_FACTOR( 3000.0 ),
|
||||
ZOOM_FACTOR( 4500.0 ), // Zoom out
|
||||
};
|
||||
|
||||
|
||||
// Default grid sizes for PCB editor screens.
|
||||
// Default grid sizes for page layout editor screens.
|
||||
static GRID_TYPE pl_editorGridList[] =
|
||||
{
|
||||
// predefined grid list in mm
|
||||
|
|
Loading…
Reference in New Issue