Skip to content

Commit

Permalink
[pyqgis-console] remove unnecessary code and fix tabs tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
slarosa committed Apr 20, 2013
1 parent 0ca725c commit f12eebe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
9 changes: 3 additions & 6 deletions python/console/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def __init__(self, parent=None):
openFileBt = QCoreApplication.translate("PythonConsole", "Open file")
self.openFileButton = QAction(parent)
self.openFileButton.setCheckable(False)
self.openFileButton.setEnabled(False)
self.openFileButton.setEnabled(True)
self.openFileButton.setIcon(QgsApplication.getThemeIcon("console/iconOpenConsole.png"))
self.openFileButton.setMenuRole(QAction.PreferencesRole)
self.openFileButton.setIconVisibleInMenu(True)
Expand All @@ -139,7 +139,7 @@ def __init__(self, parent=None):
saveFileBt = QCoreApplication.translate("PythonConsole", "Save")
self.saveFileButton = QAction(parent)
self.saveFileButton.setCheckable(False)
self.saveFileButton.setEnabled(False)
self.saveFileButton.setEnabled(True)
self.saveFileButton.setIcon(QgsApplication.getThemeIcon("console/iconSaveConsole.png"))
self.saveFileButton.setMenuRole(QAction.PreferencesRole)
self.saveFileButton.setIconVisibleInMenu(True)
Expand All @@ -149,7 +149,7 @@ def __init__(self, parent=None):
saveAsFileBt = QCoreApplication.translate("PythonConsole", "Save As..")
self.saveAsFileButton = QAction(parent)
self.saveAsFileButton.setCheckable(False)
self.saveAsFileButton.setEnabled(False)
self.saveAsFileButton.setEnabled(True)
self.saveAsFileButton.setIcon(QgsApplication.getThemeIcon("console/iconSaveAsConsole.png"))
self.saveAsFileButton.setMenuRole(QAction.PreferencesRole)
self.saveAsFileButton.setIconVisibleInMenu(True)
Expand Down Expand Up @@ -445,9 +445,6 @@ def qtGui(self):

def toggleEditor(self, checked):
self.widgetEditor.show() if checked else self.widgetEditor.hide()
self.openFileButton.setEnabled(checked)
self.saveFileButton.setEnabled(checked)
self.saveAsFileButton.setEnabled(checked)

def pasteEditor(self):
self.tabEditorWidget.currentWidget().newEditor.paste()
Expand Down
1 change: 1 addition & 0 deletions python/console/console_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ def save(self):
os.remove(temp_path)
fN = self.path.split('/')[-1]
self.mw.setTabTitle(self, fN)
self.mw.setTabToolTip(self.mw.currentIndex(), self.path)
self.newEditor.setModified(False)
self.pc.updateTabListScript(self.path, action='append')

Expand Down

0 comments on commit f12eebe

Please sign in to comment.