From 72ea80082e94f6f191d6f601b0d2f3cbbe195ce9 Mon Sep 17 00:00:00 2001 From: Markus Rosenstihl Date: Sat, 4 Jul 2026 19:42:13 +0200 Subject: [PATCH] fixed possible bug when using line and col input widgets on bottomt right of editor --- src/damaris/gui/DamarisGUI.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/damaris/gui/DamarisGUI.py b/src/damaris/gui/DamarisGUI.py index 801eb8e..f7c8f96 100644 --- a/src/damaris/gui/DamarisGUI.py +++ b/src/damaris/gui/DamarisGUI.py @@ -1369,27 +1369,26 @@ get_job_id get_description set_description get_xdata get_ydata set_xdate set_yda def column_line_widgets_changed_event( self, data=None ): page = self.main_notebook.get_current_page( ) - textview = None - newline = None - newcol = None - if page == 0: textview = self.experiment_script_textview + column_indicator = self.experiment_script_column_indicator newline = self.experiment_script_line_indicator.get_value_as_int( ) - 1 - newcol = self.experiment_script_column_indicator.get_value_as_int( ) - 1 + newcol = column_indicator.get_value_as_int( ) - 1 elif page == 1: textview = self.data_handling_textview + column_indicator = self.data_handling_column_indicator newline = self.data_handling_line_indicator.get_value_as_int( ) - 1 - newcol = self.data_handling_column_indicator.get_value_as_int( ) - 1 + newcol = column_indicator.get_value_as_int( ) - 1 else: print("unknown line/column selector") + return False textbuffer = textview.get_buffer( ) new_place = textbuffer.get_iter_at_line( newline ) if not newcol > new_place.get_chars_in_line( ): new_place.set_line_offset( newcol ) else: - self.__dict__[ text_name + "_column_indicator" ].set_value( 1 ) + column_indicator.set_value( 1 ) if len( textbuffer.get_selection_bounds( ) ) != 0: textbuffer.move_mark_by_name( "insert", new_place ) else: @@ -3048,7 +3047,6 @@ class MonitorWidgets: # Statistics activated? if (self.display_statistics_checkbutton.get_active( ) and in_result.uses_statistics( ) and in_result.ready_for_drawing_error( )): - for i in range( chans ): err = in_result.get_yerr( i ) if moving_average is not None: