kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #08009
Re: PCBNEW NANOMETRES build zoom crash
> I am working on this today.
>
> My gut says this:
>
>
> Basically it comes down to the fact that we cannot describe an area larger than about 12
> feet with the nanometer internal units.
Jean-Pierre,
Can you first look over the attached patch, then play with it.
This basically fixes the crash, but I think there's more finishing touches that need to be
done.
I need to get back to work now.
Thank you very much,
Dick
*) The RoundTo0() might need to be pulled back when we are using NANOMETRES
*) The status bar coordinate display needs to be re-thought. This is a discussion in itself.
=== modified file 'pcbnew/basepcbframe.cpp'
--- pcbnew/basepcbframe.cpp 2012-04-16 23:31:29 +0000
+++ pcbnew/basepcbframe.cpp 2012-04-18 18:14:34 +0000
@@ -810,8 +810,12 @@
{
msg = _( "Zoom " );
- wxString value;
- value.Printf( wxT( "%g" ), GetScreen()->m_ZoomList[i]);
+ wxString value = wxString::Format( wxT( "%g" ),
+
+ // @todo could do scaling here and show a "percentage"
+ GetScreen()->m_ZoomList[i]
+ );
+
msg += value;
m_zoomSelectBox->Append( msg );
@@ -821,6 +825,7 @@
}
}
+
/* Function GetActiveViewerFrame
* return a reference to the current Module Viewer Frame if exists
* if called from the PCB editor, this is the m_ModuleViewerFrame
=== modified file 'pcbnew/classpcb.cpp'
--- pcbnew/classpcb.cpp 2012-04-17 03:12:53 +0000
+++ pcbnew/classpcb.cpp 2012-04-18 18:11:30 +0000
@@ -59,8 +59,11 @@
ZOOM_FACTOR( 200.0 ),
ZOOM_FACTOR( 350.0 ),
ZOOM_FACTOR( 500.0 ),
+
+#if 1 || !defined( USE_PCBNEW_NANOMETRES )
ZOOM_FACTOR( 1000.0 ),
ZOOM_FACTOR( 2000.0 )
+#endif
};
Follow ups
References