]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
0002187: select several surfaces in “Setup surfaces” dialog
authorouv <ouv@opencascade.com>
Thu, 19 Jun 2014 10:21:25 +0000 (14:21 +0400)
committerouv <ouv@opencascade.com>
Thu, 19 Jun 2014 10:21:25 +0000 (14:21 +0400)
src/Plot2d/Plot2d_SetupCurvesDlg.cxx
src/Plot3d/Plot3d_SetupSurfacesDlg.cxx

index 71113741693d28b547e57ec583ac572ce73b1323..e48d39d07ec91f76966fc922e1d2441244901fdd 100755 (executable)
@@ -159,7 +159,7 @@ Plot2d_SetupCurvesDlg::Plot2d_SetupCurvesDlg( QWidget* theParent )
   aLabels.append( tr( "NB_MARKERS" ) );
   myTable->setHorizontalHeaderLabels( aLabels );
   myTable->verticalHeader()->hide();
-  myTable->setSelectionMode( QTableWidget::NoSelection );
+  myTable->setSelectionMode( QTableWidget::ExtendedSelection );
 
   QComboBox* aCombo = new QComboBox( 0 );
   myTable->verticalHeader()->setDefaultSectionSize( aCombo->sizeHint().height() );
@@ -437,7 +437,7 @@ void Plot2d_SetupCurvesDlg::onRemove( )
   for ( selIter = aRegs.begin(); selIter != aRegs.end(); ++selIter )
   {
     const QTableWidgetSelectionRange& aReg = *selIter;
-    for ( int i = aReg.topRow(), n = aReg.bottomRow(); i < n; i++ )
+    for ( int i = aReg.topRow(), n = aReg.bottomRow(); i <= n; i++ )
       aSelRows.insert( i );
   }
 
index 36c2ffb14a86e09a1912ba72a6db29b74bfeec18..b4d8204052eab355e6c13947aa733c5e2be8a759 100644 (file)
@@ -70,7 +70,7 @@ Plot3d_SetupSurfacesDlg::Plot3d_SetupSurfacesDlg( QWidget* theParent )
   aLabels.append( tr( "COLOR_SCALE" ) );
   myTable->setHorizontalHeaderLabels( aLabels );
   myTable->verticalHeader()->hide();
-  myTable->setSelectionMode( QTableWidget::NoSelection );
+  myTable->setSelectionMode( QTableWidget::ExtendedSelection );
 
   QComboBox* aCombo = new QComboBox( 0 );
   myTable->verticalHeader()->setDefaultSectionSize( aCombo->sizeHint().height() );
@@ -212,7 +212,7 @@ void Plot3d_SetupSurfacesDlg::onRemove()
   for ( selIter = aRegs.begin(); selIter != aRegs.end(); ++selIter )
   {
     const QTableWidgetSelectionRange& aReg = *selIter;
-    for ( int i = aReg.topRow(), n = aReg.bottomRow(); i < n; i++ )
+    for ( int i = aReg.topRow(), n = aReg.bottomRow(); i <= n; i++ )
       aSelRows.insert( i );
   }