]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Correct tab order for dialog control buttons (from left/top to right/bottom or in...
authorstv <stv@opencascade.com>
Tue, 17 Jan 2006 08:34:42 +0000 (08:34 +0000)
committerstv <stv@opencascade.com>
Tue, 17 Jan 2006 08:34:42 +0000 (08:34 +0000)
src/Qtx/QtxDialog.cxx

index bf827df577824579a7ce837b279a9af6f8dd58e2..347479e55e750abf86f45059958bee56275ad4c3 100755 (executable)
@@ -236,7 +236,7 @@ void QtxDialog::Area::layoutButtons()
                        center.append( it.current() );
        }
 
-    delete layout();
+  delete layout();
 
        QBoxLayout* buttonLayout = 0;
        if ( myOrientation == Qt::Vertical )
@@ -267,6 +267,22 @@ void QtxDialog::Area::layoutButtons()
                                buttonLayout->addStretch( 1 );
                }
        }
+
+  QWidgetList wids;
+  if ( layout() )
+  {
+    for ( QLayoutIterator it = layout()->iterator(); it.current(); ++it )
+    {
+      if ( !it.current()->widget() )
+        continue;
+
+      if ( QApplication::reverseLayout() )
+        wids.prepend( it.current()->widget() );
+      else
+        wids.append( it.current()->widget() );
+    }
+  }
+  Qtx::setTabOrder( wids );
 }
 
 /*!