Fix Link Graph Groups setting 0 MinX value

This commit is contained in:
Mark Watkins 2011-10-09 00:13:39 +10:00
parent 29dd876c11
commit 210c60b5f1
2 changed files with 3 additions and 2 deletions

View File

@ -1374,7 +1374,7 @@ qint64 gGraph::MinX()
for (QVector<Layer *>::iterator l=m_layers.begin();l!=m_layers.end();l++) {
if ((*l)->isEmpty()) continue;
tmp=(*l)->Minx();
//if (!tmp) continue;
if (!tmp) continue;
if (!val || tmp < val) val = tmp;
}
if (val) rmin_x=val;
@ -1713,6 +1713,7 @@ void gGraphView::ResetBounds(bool refresh) //short group)
qint64 m1=0,m2=0;
for (int i=0;i<m_graphs.size();i++) {
m_graphs[i]->ResetBounds();
if (!m_graphs[i]->min_x) continue;
if (!m1 || m_graphs[i]->min_x<m1) m1=m_graphs[i]->min_x;
if (!m2 || m_graphs[i]->max_x>m2) m2=m_graphs[i]->max_x;
}

View File

@ -472,5 +472,5 @@ void MainWindow::on_action_Edit_Profile_triggered()
void MainWindow::on_action_Link_Graph_Groups_toggled(bool arg1)
{
PROFILE["LinkGroups"]=arg1;
if (daily) daily->ReloadGraphs();
if (daily) daily->RedrawGraphs();
}