Skip to content

Commit

Permalink
Merge pull request #659 from hhslepicka/destroy_debug
Browse files Browse the repository at this point in the history
FIX: Temporary patch for pyepics data plugin
  • Loading branch information
hhslepicka authored Jun 22, 2020
2 parents aeaa6bb + f5b9010 commit 5c85676
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
3 changes: 3 additions & 0 deletions pydm/data_plugins/epics_plugins/pyepics_plugin_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ def add_listener(self, channel):

def close(self):
try:
self.pv.clear_callbacks()
self.pv.access_callbacks = []
self.pv.connection_callbacks = []
self.pv.disconnect()
except KeyError:
# The PV was no longer availbale.
Expand Down
23 changes: 15 additions & 8 deletions pydm/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,27 @@ def __init__(self, parent=None, hide_nav_bar=False, hide_menu_bar=False, hide_st
self.app = QApplication.instance()
self.font_factor = 1
self.iconFont = IconFont()
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
self._display_widget = None
self._showing_file_path_in_title_bar = False

self._saved_menu_geometry = None
self._saved_menu_height = None
self._new_widget_size = None

self.default_font_size = QApplication.instance().font().pointSizeF()

self.home_file = None
self.home_widget = None

self.designer_path = None

self.ui = Ui_MainWindow()
self.ui.setupUi(self)

self.ui.navbar.setIconSize(QSize(24, 24))
self.ui.navbar.setToolButtonStyle(Qt.ToolButtonTextUnderIcon)
self.ui.actionHome.triggered.connect(self.home_triggered)
self.ui.actionHome.setIcon(self.iconFont.icon("home"))
self.home_file = None
self.home_widget = None
self.ui.actionBack.triggered.connect(self.back_triggered)
self.ui.actionBack.setIcon(self.iconFont.icon("angle-left"))
self.ui.actionForward.triggered.connect(self.forward_triggered)
Expand All @@ -58,9 +68,6 @@ def __init__(self, parent=None, hide_nav_bar=False, hide_menu_bar=False, hide_st
self.ui.actionLoadTool.setIcon(self.iconFont.icon("rocket"))
self.ui.actionQuit.triggered.connect(self.quit_main_window)

self._saved_menu_geometry = None
self._saved_menu_height = None
self._new_widget_size = None
if hide_nav_bar:
self.toggle_nav_bar(False)
if hide_menu_bar:
Expand All @@ -71,7 +78,7 @@ def __init__(self, parent=None, hide_nav_bar=False, hide_menu_bar=False, hide_st
self.toggle_status_bar(False)
#Try to find the designer binary.
self.ui.actionEdit_in_Designer.setEnabled(False)
self.designer_path = None

possible_designer_bin_paths = (QLibraryInfo.location(QLibraryInfo.BinariesPath), QLibraryInfo.location(QLibraryInfo.LibraryExecutablesPath))
for bin_path in possible_designer_bin_paths:
if platform.system() == 'Darwin':
Expand Down

0 comments on commit 5c85676

Please sign in to comment.