Skip to content

Commit

Permalink
fix: improved sideview and linearview plot titling process
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMightyRaider committed Dec 27, 2024
1 parent eb817d3 commit 805d930
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion mslib/msui/linearview.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ def __init__(self, parent=None, mainwindow=None, model=None, _id=None, config_se

self.setupUi(self)
self.setWindowIcon(QtGui.QIcon(icons('64x64')))
self.mpl.canvas.plotter.fig.suptitle(f"{model.name}")

# Dock windows [WMS]:
self.cbTools.clear()
Expand Down
1 change: 0 additions & 1 deletion mslib/msui/sideview.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ def __init__(self, parent=None, mainwindow=None, model=None, _id=None, config_se
super().__init__(parent, model, _id)
self.tutorial_mode = tutorial_mode
self.setupUi(self)
self.mpl.canvas.plotter.fig.suptitle(f"{model.name}")
self.setWindowIcon(QtGui.QIcon(icons('64x64')))
self.settings_tag = "sideview"
# Dock windows [WMS]:
Expand Down
4 changes: 4 additions & 0 deletions mslib/msui/viewwindows.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,10 @@ def setFlightTrackModel(self, model):
self.mpl.canvas.map.update_info_text(name=model.name)
self.mpl.canvas.map.ax.figure.canvas.draw()

if hasattr(self.mpl.canvas,'plotter'):
self.mpl.canvas.plotter.fig.suptitle(f"{model.name}", x=0.95, ha='right')
self.mpl.canvas.plotter.fig.canvas.draw()

def getView(self):
"""
Return the MplCanvas instance of the window.
Expand Down

0 comments on commit 805d930

Please sign in to comment.