From 21f280537aa3e422d1424836014b33b613be4433 Mon Sep 17 00:00:00 2001 From: akl Date: Mon, 24 Mar 2008 11:34:01 +0000 Subject: [PATCH] Fix a pb. with naming of vertical headers of table of planes. --- src/VISUGUI/VisuGUI_CutLinesDlg.cxx | 5 +++-- src/VISUGUI/VisuGUI_CutPlanesDlg.cxx | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) 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))); -- 2.39.2