diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp
index c9f19462ba..183cad4241 100644
--- a/pcbnew/class_track.cpp
+++ b/pcbnew/class_track.cpp
@@ -624,7 +624,7 @@ void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode,
#ifdef USE_WX_OVERLAY
// If dragged not draw in OnPaint otherwise remains impressed in wxOverlay
- if( (m_Flags && IS_DRAGGED) && aDC->IsKindOf(wxCLASSINFO(wxPaintDC)))
+ if( (m_Flags & IS_DRAGGED) && aDC->IsKindOf(wxCLASSINFO(wxPaintDC)))
return;
#endif
@@ -691,7 +691,7 @@ void SEGZONE::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode,
#ifdef USE_WX_OVERLAY
// If dragged not draw in OnPaint otherwise remains impressed in wxOverlay
- if( (m_Flags && IS_DRAGGED) && aDC->IsKindOf(wxCLASSINFO(wxPaintDC)))
+ if( (m_Flags & IS_DRAGGED) && aDC->IsKindOf(wxCLASSINFO(wxPaintDC)))
return;
#endif
@@ -1319,7 +1319,7 @@ TRACK* TRACK::GetTrack( TRACK* aStartTrace, TRACK* aEndTrace, ENDPOINT_T aEndPoi
if( nextSegment )
{
- if ( (nextSegment != this) &&
+ if ( (nextSegment != this) &&
!nextSegment->GetState( BUSY | IS_DELETED ) &&
(refLayers & nextSegment->GetLayerMask()) )
{
diff --git a/pcbnew/dialogs/dialog_plot_base.cpp b/pcbnew/dialogs/dialog_plot_base.cpp
index 4b7b5695d4..b79b361eeb 100644
--- a/pcbnew/dialogs/dialog_plot_base.cpp
+++ b/pcbnew/dialogs/dialog_plot_base.cpp
@@ -347,7 +347,6 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
sbSizerMsg = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Messages:") ), wxVERTICAL );
m_messagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
- m_messagesBox->SetMaxLength( 0 );
m_messagesBox->SetMinSize( wxSize( -1,70 ) );
sbSizerMsg->Add( m_messagesBox, 1, wxEXPAND, 5 );
diff --git a/pcbnew/dialogs/dialog_plot_base.fbp b/pcbnew/dialogs/dialog_plot_base.fbp
index b9e5800cc9..1c97178da6 100644
--- a/pcbnew/dialogs/dialog_plot_base.fbp
+++ b/pcbnew/dialogs/dialog_plot_base.fbp
@@ -3982,7 +3982,7 @@
0
- 0
+
0
-1,70
diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp
index d613206802..d9f4791969 100644
--- a/pcbnew/pcbframe.cpp
+++ b/pcbnew/pcbframe.cpp
@@ -605,7 +605,7 @@ void PCB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event )
{
m_canvas->SetAbortRequest( true );
- if( GetScreen()->IsModify() )
+ if( GetScreen()->IsModify() && !GetBoard()->IsEmpty() )
{
wxString msg;
msg.Printf( _("Save the changes in\n<%s>\nbefore closing?"),