diff --git a/nexus/StationSelectDialog.py b/nexus/StationSelectDialog.py index 8e4a1b238229774f560db67b5c40a544474502c2..e4a580c4cb6fb990fb76e84beb0b637077ae4499 100644 --- a/nexus/StationSelectDialog.py +++ b/nexus/StationSelectDialog.py @@ -61,16 +61,16 @@ class StationSelectDialog(*load_ui('StationSelectDialog.ui')): self.tableWidget.setSelectionMode(QAbstractItemView.ExtendedSelection) if self.action == 'type & gain': - self.gainCB.setChecked(True) - self.gainCB.setText(f"Copy Datalogger Gain: {self.values[0]}") - self.typeCB.setChecked(True) - self.typeCB.setText(f"Copy Datalogger Type: {self.values[1]}") - self.sensor_label.setParent(None) + self.uiGainCB.setChecked(True) + self.uiGainCB.setText(f"Copy Datalogger Gain: {self.values[0]}") + self.uiTypeCB.setChecked(True) + self.uiTypeCB.setText(f"Copy Datalogger Type: {self.values[1]}") + self.uiSensorLabel.setParent(None) else: - self.sensor_label.setText(f"Copy Sensor Type: {self.values[0]}") - self.typeCB.setParent(None) - self.gainCB.setParent(None) - + self.uiSensorLabel.setText(f"Copy Sensor Type: {self.values[0]}") + self.uiTypeCB.setParent(None) + self.uiGainCB.setParent(None) + self.tableWidget.setSelectionMode(QAbstractItemView.ExtendedSelection) self.tableWidget.setRowCount(len(self.stations)) self.tableWidget.horizontalHeader().sectionClicked.connect(self.sort_table) # Add stations to table diff --git a/nexus/StationSelectDialog.ui b/nexus/StationSelectDialog.ui index bf0bf6f6c4c1bb63fc09a983321c782b539902e8..4d960766eb07d478bf9a04608aaf6dbaf48f2d50 100644 --- a/nexus/StationSelectDialog.ui +++ b/nexus/StationSelectDialog.ui @@ -6,55 +6,67 @@ <rect> <x>0</x> <y>0</y> - <width>469</width> - <height>612</height> + <width>359</width> + <height>576</height> </rect> </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="windowTitle"> <string>Dialog</string> </property> <layout class="QVBoxLayout" name="verticalLayout"> - <item> - <widget class="QCheckBox" name="typeCB"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="toolTip"> - <string>Copy stated datalogger type to selected stations in table</string> - </property> - </widget> - </item> - <item> - <widget class="QCheckBox" name="gainCB"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="toolTip"> - <string>Copy stated datalogger gain to selected stations in table</string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="sensor_label"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="toolTip"> - <string>Copy stated sensor type to selected stations in table</string> - </property> - </widget> - </item> + <item> + <widget class="QCheckBox" name="uiTypeCB"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>Copy stated datalogger type to selected stations in table</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="uiGainCB"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>Copy stated datalogger gain to selected stations in table</string> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="uiSensorLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>Copy stated sensor type to selected stations in table</string> + </property> + </widget> + </item> <item> <widget class="QTableWidget" name="tableWidget"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="horizontalScrollBarPolicy"> <enum>Qt::ScrollBarAlwaysOff</enum> </property> @@ -167,4 +179,4 @@ </hints> </connection> </connections> -</ui> \ No newline at end of file +</ui> diff --git a/nexus/nexus.py b/nexus/nexus.py index b46d93effc689023dd8b4e79168c2c4c40c07f6a..1448a5b815420c2a69f27287788a93ab17850791 100755 --- a/nexus/nexus.py +++ b/nexus/nexus.py @@ -1304,9 +1304,9 @@ class StationWidget(WidgetBase, *load_ui("StationWidget.ui")): def copy_to_stations(self, stations, action, values): dialog = StationSelectDialog(stations, action, values, parent=self) if dialog.exec_(): - if dialog.sensor_label.parent() is None: - copy_this = {"DLtype": dialog.typeCB.isChecked(), - "DLgain": dialog.gainCB.isChecked()} + if dialog.uiSensorLabel.parent() is None: + copy_this = {"DLtype": dialog.uiTypeCB.isChecked(), + "DLgain": dialog.uiGainCB.isChecked()} else: copy_this = {"Stype": True} self.update_stations(dialog.selected_stations, copy_this)