From: Yoann AUDOUIN Date: Tue, 3 Mar 2020 08:24:28 +0000 (+0100) Subject: Merge branch 'BR_PY3' X-Git-Tag: SH_V2_2_0~27 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0a294e9196365e37d8c7e0a6a3c6d81f08984869;p=modules%2Fhydrosolver.git Merge branch 'BR_PY3' --- 0a294e9196365e37d8c7e0a6a3c6d81f08984869 diff --cc src/HYDROGUI/BndConditionsDialog.py index 7c393be,474b4be..b9c3924 mode 100644,100755..100755 --- a/src/HYDROGUI/BndConditionsDialog.py +++ b/src/HYDROGUI/BndConditionsDialog.py @@@ -266,27 -270,35 +270,35 @@@ class BoundaryConditionsDialog(QDialog) liubor = values[1] livbor = values[2] litbor = values[3] - - if lihbor: - self.boundaryConditionsTable.item(row_nb, 1).setText(str(lihbor)) - - if liubor: - self.boundaryConditionsTable.item(row_nb, 2).setText(str(liubor)) - - if livbor: - self.boundaryConditionsTable.item(row_nb, 3).setText(str(livbor)) - - if litbor: - self.boundaryConditionsTable.item(row_nb, 4).setText(str(litbor)) - + #print "on_preset_changed ", preset, lihbor, liubor, livbor, litbor + + #if lihbor is not None: + self.boundaryConditionsTable.item(row_nb, 1).setText(str(lihbor)) + + #if liubor is not None: + self.boundaryConditionsTable.item(row_nb, 2).setText(str(liubor)) + + #if livbor is not None: + self.boundaryConditionsTable.item(row_nb, 3).setText(str(livbor)) + + #if litbor is not None: + self.boundaryConditionsTable.item(row_nb, 4).setText(str(litbor)) - ++ + if isinstance(combo, QComboBox): + ind = combo.findText(preset) + if ind >= 0: + combo.setCurrentIndex(ind) + """Define result file path""" def on_result_file_browse(self): - file_path = QtGui.QFileDialog.getSaveFileName(self, self.tr("Select output file path")) + file_path, filt = QFileDialog.getSaveFileName(self, self.tr("Select output file path")) + #print file_path if file_path: self.resultBndConditionsFileEdit.setText(file_path) - + """Set groups list""" def set_groups(self, groups): + #print "set_groups" self.boundaryConditionsTable.setRowCount(0) for group in groups: # Add row @@@ -322,21 -335,24 +335,24 @@@ font = item.font() font.setBold(True) item.setFont(font) - item.setFlags(QtCore.Qt.ItemIsEnabled) + item.setFlags(Qt.ItemIsEnabled) self.boundaryConditionsTable.setItem(row_nb, 5, item) - + self.update_table() - + """Update conditions data in the table from the conditions input file""" def update_table(self): + #print "update_table" is_updated = False - - nb_rows = self.boundaryConditionsTable.rowCount() - for row_nb in xrange(0, nb_rows): + + nb_rows = self.boundaryConditionsTable.rowCount() + for row_nb in range(0, nb_rows): group_name = str(self.boundaryConditionsTable.item(row_nb, 5).text()) - if self.input_conditions.has_key(group_name): + if group_name in self.input_conditions: - ++ values = self.input_conditions[group_name] - + #print values + lihbor = str(values[0]) liubor = str(values[1]) livbor = str(values[2])