Skip to content
Permalink
Browse files

[pyqgis-console] restore previously loaded scripts only when editor i…

…s instanced
  • Loading branch information
slarosa committed Oct 8, 2014
1 parent 149ad59 commit 5a01b98e3c4ddcb4fac60faeb783d1a7dcf4d7b1
Showing with 4 additions and 5 deletions.
  1. +4 −5 python/console/console.py
@@ -539,8 +539,6 @@ def __init__(self, parent=None):
self.findPrevButton.clicked.connect(self._findPrev)
self.lineEditFind.textChanged.connect(self._textFindChanged)

self.tabEditorWidget.restoreTabsOrAddNew()

def _findText(self):
self.tabEditorWidget.currentWidget().newEditor.findText(True)

@@ -586,7 +584,9 @@ def qtGui(self):

def toggleEditor(self, checked):
self.splitterObj.show() if checked else self.splitterObj.hide()
self.tabEditorWidget.enableToolBarEditor(checked)
if not self.tabEditorWidget:
self.tabEditorWidget.enableToolBarEditor(checked)
self.tabEditorWidget.restoreTabsOrAddNew()

def toggleObjectListWidget(self, checked):
self.listClassMethod.show() if checked else self.listClassMethod.hide()
@@ -679,8 +679,7 @@ def openHelp(self):
QgsContextHelp.run( "PythonConsole" )

def openSettings(self):
options = optionsDialog(self)
if options.exec_():
if optionsDialog(self).exec_():
self.shell.refreshSettingsShell()
self.shellOut.refreshSettingsOutput()
self.tabEditorWidget.refreshSettingsEditor()

0 comments on commit 5a01b98

Please sign in to comment.
You can’t perform that action at this time.