|
1 | | -VERSION = '008.047' |
| 1 | +VERSION = '008.048' |
2 | 2 | LCNCVER = '2.10' |
3 | 3 | DOCSVER = LCNCVER |
4 | 4 |
|
@@ -387,7 +387,6 @@ def initialized__(self): |
387 | 387 | self.set_mode() |
388 | 388 | self.user_button_setup() |
389 | 389 | self.set_buttons_state([self.alwaysOnList], True) |
390 | | - self.get_main_tab_widgets() |
391 | 390 | self.load_material_file() |
392 | 391 | self.offset_peripherals() |
393 | 392 | self.set_probe_offset_pins() |
@@ -2681,32 +2680,6 @@ def set_interlock_defaults(self): |
2681 | 2680 | self.halPulsePins = {} |
2682 | 2681 | self.dualCodeButtons = {} |
2683 | 2682 |
|
2684 | | - def get_main_tab_widgets(self): |
2685 | | - # 1 of 2 this is a work around for pyqt5.11 not having setTabVisible(index, bool) that is present in pyqt5.15 |
2686 | | - self.widgetMain = self.w.main_tab_widget.findChild(QWidget, 'main_tab') |
2687 | | - self.widgetConversational = self.w.main_tab_widget.findChild(QWidget, 'conv_tab') |
2688 | | - self.widgetParameters = self.w.main_tab_widget.findChild(QWidget, 'param_tab') |
2689 | | - self.widgetSettings = self.w.main_tab_widget.findChild(QWidget, 'settings_tab') |
2690 | | - self.widgetStatistics = self.w.main_tab_widget.findChild(QWidget, 'stats_tab') |
2691 | | - |
2692 | | - def disable_tabs(self): |
2693 | | - # remove all tabs, then add them back based on their pin state (this keeps them in order) |
2694 | | - # 2 of 2 this is a work around for pyqt5.11 not having setTabVisible(index, bool) that is present in pyqt5.15 |
2695 | | - while self.w.main_tab_widget.count() > 1: |
2696 | | - self.w.main_tab_widget.removeTab(1) |
2697 | | - if not self.convTabDisable.get(): |
2698 | | - self.w.main_tab_widget.insertTab(1, self.widgetConversational, 'CONVERSATIONAL') |
2699 | | - if not self.paramTabDisable.get(): |
2700 | | - self.w.main_tab_widget.insertTab(2, self.widgetParameters, 'PARAMETERS') |
2701 | | - if not self.settingsTabDisable.get(): |
2702 | | - self.w.main_tab_widget.insertTab(3, self.widgetSettings, 'SETTINGS') |
2703 | | - self.w.main_tab_widget.insertTab(4, self.widgetStatistics, 'STATISTICS') |
2704 | | - # reorder the indexes to account for any missing tabs, any missing will be -1 (which doesn't matter) |
2705 | | - self.CONVERSATIONAL = self.w.main_tab_widget.indexOf(self.widgetConversational) |
2706 | | - self.PARAMETERS = self.w.main_tab_widget.indexOf(self.widgetParameters) |
2707 | | - self.SETTINGS = self.w.main_tab_widget.indexOf(self.widgetSettings) |
2708 | | - self.STATISTICS = self.w.main_tab_widget.indexOf(self.widgetStatistics) |
2709 | | - |
2710 | 2683 | def preview_index_return(self, index): |
2711 | 2684 | if self.w.gcode_editor.editor.isModified(): |
2712 | 2685 | self.new_exitCall(index) |
@@ -3117,9 +3090,9 @@ def set_signal_connections(self): |
3117 | 3090 | self.w.feed_label.pressed.connect(self.feed_label_pressed) |
3118 | 3091 | self.w.rapid_label.pressed.connect(self.rapid_label_pressed) |
3119 | 3092 | self.w.jogs_label.pressed.connect(self.jogs_label_pressed) |
3120 | | - self.paramTabDisable.value_changed.connect(self.disable_tabs) |
3121 | | - self.settingsTabDisable.value_changed.connect(self.disable_tabs) |
3122 | | - self.convTabDisable.value_changed.connect(self.disable_tabs) |
| 3093 | + self.paramTabDisable.value_changed.connect(lambda v: self.w.main_tab_widget.setTabVisible(self.PARAMETERS, not v)) |
| 3094 | + self.settingsTabDisable.value_changed.connect(lambda v: self.w.main_tab_widget.setTabVisible(self.SETTINGS, not v)) |
| 3095 | + self.convTabDisable.value_changed.connect(lambda v: self.w.main_tab_widget.setTabVisible(self.CONVERSATIONAL, not v)) |
3123 | 3096 | self.w.cut_time_reset.pressed.connect(lambda: self.statistic_reset('cut_time', 'Cut time')) |
3124 | 3097 | self.w.probe_time_reset.pressed.connect(lambda: self.statistic_reset('probe_time', 'Probe time')) |
3125 | 3098 | self.w.paused_time_reset.pressed.connect(lambda: self.statistic_reset('paused_time', 'Paused time')) |
|
0 commit comments