Commit patch fixing an issue in pan with middle mouse button (from lajos kamocsay)

Other minor fixes.
This commit is contained in:
lajos kamocsay 2012-04-15 12:33:35 +02:00 committed by jean-pierre charras
parent 57d75a75a8
commit add5321328
9 changed files with 1095 additions and 1087 deletions

View File

@ -575,7 +575,7 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPosition )
else
virtualSize.x = logicalClientRect.width;
}
else if( logicalClientRect.width < drawingRect.width )
else
{
if( drawingCenterX > clientCenterX )
virtualSize.x = drawingRect.width +
@ -586,10 +586,6 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPosition )
else
virtualSize.x = drawingRect.width;
}
else
{
virtualSize.x = drawingRect.width;
}
}
if( drawingRect.GetTop() < logicalClientRect.GetTop() && drawingRect.GetBottom() > logicalClientRect.GetBottom() )
@ -610,7 +606,7 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPosition )
else
virtualSize.y = logicalClientRect.height;
}
else if( logicalClientRect.height < drawingRect.height )
else
{
if( drawingCenterY > clientCenterY )
virtualSize.y = drawingRect.height +
@ -621,10 +617,6 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPosition )
else
virtualSize.y = drawingRect.height;
}
else
{
virtualSize.y = drawingRect.height;
}
}
}

View File

@ -145,9 +145,13 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
bSizer2->Add( m_checkShowHiddenPins, 0, wxALL|wxEXPAND, 3 );
m_checkEnableMiddleButtonPan = new wxCheckBox( m_panel1, xwID_ANY, _("Enable middle mouse button panning"), wxDefaultPosition, wxDefaultSize, 0 );
m_checkEnableMiddleButtonPan->SetToolTip( _("Use middle mouse button dragging to pan") );
bSizer2->Add( m_checkEnableMiddleButtonPan, 0, wxALL, 3 );
m_checkMiddleButtonPanLimited = new wxCheckBox( m_panel1, wxID_ANY, _("Middle mouse button panning limited by current toolbar panning"), wxDefaultPosition, wxDefaultSize, 0 );
m_checkMiddleButtonPanLimited = new wxCheckBox( m_panel1, wxID_ANY, _("Middle mouse button panning limited"), wxDefaultPosition, wxDefaultSize, 0 );
m_checkMiddleButtonPanLimited->SetToolTip( _("Middle mouse button panning limited by current scrollbar size") );
bSizer2->Add( m_checkMiddleButtonPanLimited, 0, wxALL, 3 );
m_checkAutoPan = new wxCheckBox( m_panel1, wxID_ANY, _("Enable automatic &panning"), wxDefaultPosition, wxDefaultSize, 0 );

View File

@ -2533,7 +2533,7 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="tooltip">Use middle mouse button dragging to pan</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
@ -2600,7 +2600,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Middle mouse button panning limited by current toolbar panning</property>
<property name="label">Middle mouse button panning limited</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -2621,7 +2621,7 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="tooltip">Middle mouse button panning limited by current scrollbar size</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>

View File

@ -91,7 +91,7 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event )
dlg.SetPadNameTextSize( ReturnStringFromValue( g_UserUnit, pin->GetNumberTextSize() ) );
dlg.SetPadNameTextSizeUnits( units );
dlg.SetLength( ReturnStringFromValue( g_UserUnit, pin->GetLength(), m_internalUnits ) );
dlg.SetLength( ReturnStringFromValue( g_UserUnit, pin->GetLength() ) );
dlg.SetLengthUnits( units );
dlg.SetAddToAllParts( pin->GetUnit() == 0 );
dlg.SetAddToAllBodyStyles( pin->GetConvert() == 0 );

View File

@ -220,9 +220,13 @@ public:
/**
* Function GetWxOrientation.
* @return int - ws' style printing orientation.
* @return ws' style printing orientation (wxPORTRAIT or wxLANDSCAPE).
*/
#if wxCHECK_VERSION( 2, 9, 0 )
wxPrintOrientation GetWxOrientation() const { return IsPortrait() ? wxPORTRAIT : wxLANDSCAPE; }
#else
int GetWxOrientation() const { return IsPortrait() ? wxPORTRAIT : wxLANDSCAPE; }
#endif
/**
* Function GetPaperId

View File

@ -14,6 +14,7 @@
* depending on compil option
*/
#if defined(PCBNEW) || defined(CVPCB)
/// Convert mils to PCBNEW internal units (iu).
inline int Mils2iu( int mils )
{
@ -36,4 +37,11 @@ inline int DMils2iu( int dmils )
#endif
}
#elif defined(EESCHEMA)
inline int Mils2iu( int mils )
{
return mils;
}
#endif
#endif // #define CONVERT_TO_BIU_H

File diff suppressed because it is too large Load Diff

View File

@ -150,12 +150,12 @@ DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE(
sbSizer2PAN = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pan:") ), wxVERTICAL );
m_MiddleButtonPANOpt = new wxCheckBox( this, wxID_MIDDLEBUTTONPAN, _("Middle Button PAN Enabled"), wxDefaultPosition, wxDefaultSize, 0 );
m_MiddleButtonPANOpt->SetToolTip( _("Allows auto pan when creating a track, or moving an item.") );
m_MiddleButtonPANOpt->SetToolTip( _("Use middle mouse button dragging to pan") );
sbSizer2PAN->Add( m_MiddleButtonPANOpt, 0, wxALL, 5 );
m_OptMiddleButtonPanLimited = new wxCheckBox( this, wxID_MIDDLEBUTTONPAN, _("Middle Button PAN Limited"), wxDefaultPosition, wxDefaultSize, 0 );
m_OptMiddleButtonPanLimited->SetToolTip( _("Allows auto pan when creating a track, or moving an item.") );
m_OptMiddleButtonPanLimited->SetToolTip( _("Middle mouse button panning limited by current scrollbar size") );
sbSizer2PAN->Add( m_OptMiddleButtonPanLimited, 0, wxALL, 5 );

View File

@ -1842,7 +1842,7 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Allows auto pan when creating a track, or moving an item.</property>
<property name="tooltip">Use middle mouse button dragging to pan</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
@ -1930,7 +1930,7 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Allows auto pan when creating a track, or moving an item.</property>
<property name="tooltip">Middle mouse button panning limited by current scrollbar size</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>