diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py index afa1bee91..7835c1773 100644 --- a/openlp/core/ui/slidecontroller.py +++ b/openlp/core/ui/slidecontroller.py @@ -1386,12 +1386,14 @@ class SlideController(DisplayController, LogMixin, RegistryProperties): new_item = Registry().get(self.service_item.name).on_remote_edit(self.service_item.edit_id, True) if new_item: self.add_service_item(new_item) - + def on_clear(self): """ Clear the preview bar. """ - pass + self.preview_widget.clear_list() + self.toolbar.set_widget_visible(["editSong"], False) + self.toolbar.set_widget_visible(["clear"], False) def on_preview_add_to_service(self): """ diff --git a/openlp/core/widgets/views.py b/openlp/core/widgets/views.py index 5adec3e27..bcd96edb9 100644 --- a/openlp/core/widgets/views.py +++ b/openlp/core/widgets/views.py @@ -146,6 +146,14 @@ class ListPreviewWidget(QtWidgets.QTableWidget, RegistryProperties): self.screen_ratio = screen_ratio self.__recalculate_layout() + def clear_list(self): + """ + Clear the preview list + :return: + """ + self.setRowCount(0) + self.clear() + def replace_service_item(self, service_item, width, slide_number): """ Replace the current preview items with the ones in service_item and display the given slide @@ -156,8 +164,7 @@ class ListPreviewWidget(QtWidgets.QTableWidget, RegistryProperties): """ self.service_item = service_item self.setRowCount(0) - self.clear() - self.setColumnWidth(0, width) + self.clear_list() row = 0 text = [] for frame_number, frame in enumerate(self.service_item.get_frames()):