From 23120a82fc2ca3907e5549da22d0cef644cdde6f Mon Sep 17 00:00:00 2001 From: "Jets@ps2004" <120110796+Preetam-Das26@users.noreply.github.com> Date: Sat, 12 Oct 2024 14:18:27 +0530 Subject: [PATCH] Autoplot - Add messagebox for emptytreewidget (#2562) --- mslib/msui/autoplot_dockwidget.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/mslib/msui/autoplot_dockwidget.py b/mslib/msui/autoplot_dockwidget.py index d75bd13f3..156756cce 100644 --- a/mslib/msui/autoplot_dockwidget.py +++ b/mslib/msui/autoplot_dockwidget.py @@ -298,7 +298,12 @@ def add_to_treewidget(self, parent, parent2, config_settings, treewidget, flight config_settings["automated_plotting_flights"].append([flight, sections, vertical, filename, itime, vtime]) parent.refresh_signal_emit.emit() if treewidget.objectName() == "autoplotSecsTreeWidget": - if url is None: + if url == "": + QMessageBox.information( + self, + "WARNING", + "Please select the URL, layer, styles and level (row information first)" + ) return item = QTreeWidgetItem([url, layer, styles, level, self.stime, self.etime, self.intv]) self.autoplotSecsTreeWidget.addTopLevelItem(item) @@ -346,7 +351,12 @@ def update_treewidget(self, parent, parent2, config_settings, treewidget, flight parent.refresh_signal_emit.emit() if treewidget.objectName() == "autoplotSecsTreeWidget": - if url is None: + if url == "": + QMessageBox.information( + self, + "WARNING", + "Please select the URL, layer, styles and level (row information first)" + ) return selected_item = self.autoplotSecsTreeWidget.currentItem() selected_item.setText(0, url)