Skip to content

Commit

Permalink
fix: Keeping only operation name on top right for topView
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMightyRaider committed Jan 7, 2025
1 parent 7ec1155 commit b661fef
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions mslib/msui/mpl_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ def __init__(self, identifier=None, CRS=None, BBOX_UNITS=None, OPERATION_NAME=No

# Print project name and CRS identifier into figure.
if not hasattr(self, "_info_text"):
self._info_text = self.ax.figure.suptitle("", x=0.95, ha='right')
self._info_text = self.ax.figure.text(0, 0, "")
self._infos = [None] * 4
self.update_info_text(name=self.operation_name, crs=self.crs)
self.update_info_text(crs=self.crs)

if self.appearance["draw_graticule"]:
pass
Expand Down
3 changes: 0 additions & 3 deletions mslib/msui/mpl_qtwidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,7 @@ def draw_metadata(self, title="", init_time=None, valid_time=None,
title += f"\nValid: {valid_time}"

# Set title.
# title = self.fig._suptitle.get_text()
print(self.fig._suptitle)
self.ax.set_title(title, horizontalalignment='left', x=0)
# self.fig.suptitle(f"{title}", x=0.95, ha='right')

def get_plot_size_in_px(self):
"""Determines the size of the current figure in pixels.
Expand Down
3 changes: 1 addition & 2 deletions mslib/msui/viewwindows.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,7 @@ def setFlightTrackModel(self, model):

# Update Top View flighttrack name
if hasattr(self.mpl.canvas, "map"):
self.mpl.canvas.map.operation_name = model.name
self.mpl.canvas.map.update_info_text(name=model.name)
self.mpl.canvas.map.ax.figure.suptitle(f"{model.name}", x=0.95, ha='right')
self.mpl.canvas.map.ax.figure.canvas.draw()

elif hasattr(self.mpl.canvas,'plotter'):
Expand Down

0 comments on commit b661fef

Please sign in to comment.