Skip to content
Snippets Groups Projects
Commit b4a5401c authored by Mikhail Karnevskiy's avatar Mikhail Karnevskiy
Browse files

Change slider position after clicking on table results.

parent 4fd36340
No related branches found
No related tags found
1 merge request!2Next development step
......@@ -271,6 +271,7 @@ class MainController:
self.widget.left_control_widget.show_fit_btn.setChecked(True)
self.show_1d_items()
self.set_title()
self.widget.navigation_widget.setValue(int(img)+1)
def clean_peak_list(self):
self.model.peaks.clean(True)
......@@ -481,10 +482,7 @@ class MainController:
self.set_pattern()
self.update_proc_pattern()
self.show_existing_fit(0, int(y))
self.widget.navigation_widget.blockSignals(True)
self.widget.navigation_widget.slider.setValue(int(y)+1)
self.widget.navigation_widget.image_index.setValue(int(y)+1)
self.widget.navigation_widget.blockSignals(False)
self.widget.navigation_widget.setValue(int(y)+1)
def show_img_mouse_position(self, x, y):
if self.widget.left_control_widget.show_marker_btn.isChecked():
......
......@@ -545,3 +545,9 @@ class SliderWidget(QtWidgets.QWidget):
self._layout.addWidget(LabelAlignRight('Image:'))
self._layout.addWidget(self.image_index)
def setValue(self, val):
self.blockSignals(True)
self.slider.setValue(val)
self.image_index.setValue(val)
self.blockSignals(False)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment