Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoplot - Add messagebox for emptytreewidget #2562

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions mslib/msui/autoplot_dockwidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the text linter has not seen that, but we should do it :)

Please select the URL, layer, styles and level (row information first)"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

)
return
item = QTreeWidgetItem([url, layer, styles, level, self.stime, self.etime, self.intv])
self.autoplotSecsTreeWidget.addTopLevelItem(item)
Expand Down Expand Up @@ -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)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please select the URL, layer, styles and level (row information first)"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

)
return
selected_item = self.autoplotSecsTreeWidget.currentItem()
selected_item.setText(0, url)
Expand Down
Loading