提交 39cbe88d 编写于 作者: D dev@dev.com

Fix Memory access bug for zoom level 19,20

上级 98e91f02
......@@ -132,8 +132,8 @@ QWidget * qtvplugin_grid::load_prop_window()
void qtvplugin_grid::cb_paintEvent( QPainter * pImage )
{
int step_level[10] = {20,20,10,10,5,5,2,1,1,1};
double dstep_level[10] = {0.5,0.2,0.1,0.05,0.02,0.01,0.005,0.002,0.001,0.0005};
int step_level[12] = {20,20,10,10,5,5,2,1,1,1,1,1};
double dstep_level[12] = {0.5,0.2,0.1,0.05,0.02,0.01,0.005,0.002,0.001,0.0005,0.0005/2,0.0005/4};
if (!m_pVi || m_bVisible==false)
return ;
QRect rect = m_pVi->windowRect();
......@@ -208,7 +208,7 @@ void qtvplugin_grid::cb_paintEvent( QPainter * pImage )
if (false==m_pVi->CV_LLA2DP(lat,lon_right,&DP_right,&DP_bottom))
continue;
pImage->drawLine(DP_left,DP_top,DP_right,DP_bottom);
sprintf(str,"%-8.3f",lat);
sprintf(str,"%-9.4f",lat);
pImage->drawText(DP_left,DP_top-8,str);
}
for (double lon=int(lon_left*(1/step)-1.5)*step;lon<=int(lon_right*(1/step)+1.5)*step&&m_pVi->level()>0;lon+=step)
......@@ -227,7 +227,7 @@ void qtvplugin_grid::cb_paintEvent( QPainter * pImage )
dLon+=360;
while (dLon>180)
dLon-=360;
sprintf(str,"%-8.3f",(float)dLon);
sprintf(str,"%-9.4f",(float)dLon);
pImage->drawText(DP_left,DP_bottom-16,str);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册