← Back to team overview

kicad-developers team mailing list archive

[PATCH] Fix the option inversing in CvPcb->FootprintPreview->DisplayOptions

 

Option 'Center and warp cursor on zoom' has inverted (opposed) value
in the display options dialog of Footprint preview of CvPcb. If this
option is set the cursor does not moves to center on zooming but if
option is unset it does.
From 92ebe9b6dfcc37648940eba486f521892039d688 Mon Sep 17 00:00:00 2001
From: Baranovskiy Konstantin <baranovskiykonstantin@xxxxxxxxx>
Date: Sun, 14 Jan 2018 08:31:00 +0200
Subject: [PATCH] Fix the option inversing in
 CvPcb->FootprintPreview->DisplayOptions

Option 'Center and warp cursor on zoom' has inverted (opposed) value
in the display options dialog of Footprint preview of CvPcb. If this
option is set the cursor does not moves to center on zooming but if
option is unset it does.
---
 cvpcb/dialogs/dialog_display_options.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cvpcb/dialogs/dialog_display_options.cpp b/cvpcb/dialogs/dialog_display_options.cpp
index df3bdd8fe..20db40e8b 100644
--- a/cvpcb/dialogs/dialog_display_options.cpp
+++ b/cvpcb/dialogs/dialog_display_options.cpp
@@ -79,7 +79,7 @@ void DIALOG_FOOTPRINTS_DISPLAY_OPTIONS::initDialog()
     m_ShowPadSketch->SetValue( not displ_opts->m_DisplayPadFill );
     m_ShowPadNum->SetValue( displ_opts->m_DisplayPadNum );
 
-    m_enableZoomNoCenter->SetValue( m_Parent->GetCanvas()->GetEnableZoomNoCenter() );
+    m_enableZoomNoCenter->SetValue( not m_Parent->GetCanvas()->GetEnableZoomNoCenter() );
     m_enableMousewheelPan->SetValue( m_Parent->GetCanvas()->GetEnableMousewheelPan() );
     m_enableAutoPan->SetValue( m_Parent->GetCanvas()->GetEnableAutoPan() );
 }
@@ -99,7 +99,7 @@ void DIALOG_FOOTPRINTS_DISPLAY_OPTIONS::UpdateObjectSettings( void )
     displ_opts->m_DisplayPadNum  = m_ShowPadNum->GetValue();
     displ_opts->m_DisplayPadFill = not m_ShowPadSketch->GetValue();
 
-    m_Parent->GetCanvas()->SetEnableZoomNoCenter( m_enableZoomNoCenter->GetValue() );
+    m_Parent->GetCanvas()->SetEnableZoomNoCenter( not m_enableZoomNoCenter->GetValue() );
     m_Parent->GetCanvas()->SetEnableMousewheelPan( m_enableMousewheelPan->GetValue() );
     m_Parent->GetCanvas()->SetEnableAutoPan( m_enableAutoPan->GetValue() );
 
-- 
2.15.1


Follow ups