瀏覽代碼

BUG: When the bottom widget is 0, no need to span the button box

julien 15 年之前
父節點
當前提交
74c1e8bd19
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Libs/Widgets/ctkFileDialog.cpp

+ 1 - 1
Libs/Widgets/ctkFileDialog.cpp

@@ -118,7 +118,7 @@ void ctkFileDialog::setBottomWidget(QWidget* widget, const QString& label)
   QDialogButtonBox* buttonBox = this->findChild<QDialogButtonBox*>();
   Q_ASSERT(buttonBox);
   gridLayout->removeWidget(buttonBox);
-  gridLayout->addWidget(buttonBox, 2, 2, 3, 1);
+  gridLayout->addWidget(buttonBox, 2, 2, widget ? 3 : 2, 1);
 }
 
 //------------------------------------------------------------------------------