Explorar el Código

Simplify ctkDICOMTableView constructor removing redundant call

This commit removes the gratuitous call to "lblTableName->setText()".
Following commit 3831125 (Refactoring and code clean up), the call
to "setQueryTableName()" fulfills the same role.

This commit also ensure the call to "setQueryTableName()" is consistently
done after initializing the pimpl.

Suggested-by: Sergey Aleshin <4memph@gmail.com>
Jean-Christophe Fillion-Robin hace 10 años
padre
commit
b9d32d2573
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  1. 1 2
      Libs/DICOM/Widgets/ctkDICOMTableView.cpp

+ 1 - 2
Libs/DICOM/Widgets/ctkDICOMTableView.cpp

@@ -198,7 +198,6 @@ ctkDICOMTableView::ctkDICOMTableView(QString queryTableName, QWidget *parent)
   Q_D(ctkDICOMTableView);
   Q_D(ctkDICOMTableView);
   d->init();
   d->init();
   this->setQueryTableName(queryTableName);
   this->setQueryTableName(queryTableName);
-  d->lblTableName->setText(queryTableName);
 }
 }
 
 
 //------------------------------------------------------------------------------
 //------------------------------------------------------------------------------
@@ -208,8 +207,8 @@ ctkDICOMTableView::ctkDICOMTableView (ctkDICOMDatabase* dicomDataBase, QString q
 {
 {
   this->setDicomDataBase(dicomDataBase);
   this->setDicomDataBase(dicomDataBase);
   Q_D(ctkDICOMTableView);
   Q_D(ctkDICOMTableView);
-  this->setQueryTableName(queryTableName);
   d->init();
   d->init();
+  this->setQueryTableName(queryTableName);
 }
 }
 
 
 //------------------------------------------------------------------------------
 //------------------------------------------------------------------------------