From: akl Date: Mon, 24 Mar 2008 11:34:01 +0000 (+0000) Subject: Fix a pb. with naming of vertical headers of table of planes. X-Git-Tag: V5_0_0a1~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=21f280537aa3e422d1424836014b33b613be4433;p=modules%2Fvisu.git Fix a pb. with naming of vertical headers of table of planes. --- diff --git a/src/VISUGUI/VisuGUI_CutLinesDlg.cxx b/src/VISUGUI/VisuGUI_CutLinesDlg.cxx index 56c94a85..a659f464 100644 --- a/src/VISUGUI/VisuGUI_CutLinesDlg.cxx +++ b/src/VISUGUI/VisuGUI_CutLinesDlg.cxx @@ -608,6 +608,8 @@ void VisuGUI_CutLinesDlg::DrawTable() else if (aNbPlanes < aNbRows) myPosTable->setRowCount(aNbPlanes); + QString str("Plane# %1"); + QStringList aLabels; int aMin = (aNbRows < aNbPlanes)? aNbRows : aNbPlanes; for (int i = 0; isetData( anIndex, QVariant( myCutLines->GetLinePosition(i) ), Qt::DisplayRole ); //myPosTable->setText(i, 0, QString::number(myCutLines->GetLinePosition(i))); myPosTable->item( i, 1 )->setCheckState(myCutLines->IsDefaultPosition(i) ? Qt::Checked : Qt::Unchecked ); + aLabels.append( str.arg(i+1) ); } //QHeader *vh = myPosTable->verticalHeader(); - QString str("Plane# %1"); - QStringList aLabels; for (int i=aMin; iGetLinePosition(i)));*/ diff --git a/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx b/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx index 88126f04..e99b70e5 100644 --- a/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx +++ b/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx @@ -352,15 +352,16 @@ void VisuGUI_CutPlanesPane::DrawTable() else if (aNbPlanes < aNbRows) myPosTable->setRowCount(aNbPlanes); + QStringList aLabels; + QString str("Plane# %1"); int aMin = (aNbRows < aNbPlanes)? aNbRows : aNbPlanes; for (int i = 0; iitem( i, 0 )->setText( QString::number(myCutPlanes->GetPlanePosition(i))); myPosTable->item( i, 1 )->setCheckState( myCutPlanes->IsDefault(i) ? Qt::Checked : Qt::Unchecked); + aLabels.append( str.arg(i+1) ); } //QHeader *vh = myPosTable->verticalHeader(); - QStringList aLabels; - QString str("Plane# %1"); for (int i=aMin; isetText( QString::number(myCutPlanes->GetPlanePosition(i)));