Skip to content

Commit 3f62330

Browse files
committed
python console: workaround for PyQt 4.11 problem
1 parent 28d6249 commit 3f62330

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

python/console/console.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ def __init__(self, parent=None):
9696

9797
self.settings = QSettings()
9898

99-
self.options = optionsDialog(self)
100-
10199
self.shell = ShellScintilla(self)
102100
self.setFocusProxy(self.shell)
103101
self.shellOut = ShellOutputScintilla(self)
@@ -534,8 +532,6 @@ def __init__(self, parent=None):
534532
self.saveFileButton.triggered.connect(self.saveScriptFile)
535533
self.saveAsFileButton.triggered.connect(self.saveAsScriptFile)
536534
self.helpButton.triggered.connect(self.openHelp)
537-
self.connect(self.options.buttonBox, SIGNAL("accepted()"),
538-
self.prefChanged)
539535
self.connect(self.listClassMethod, SIGNAL('itemClicked(QTreeWidgetItem*, int)'),
540536
self.onClickGoToLine)
541537
self.lineEditFind.returnPressed.connect(self._findText)
@@ -681,12 +677,11 @@ def openHelp(self):
681677
QgsContextHelp.run( "PythonConsole" )
682678

683679
def openSettings(self):
684-
self.options.exec_()
685-
686-
def prefChanged(self):
687-
self.shell.refreshSettingsShell()
688-
self.shellOut.refreshSettingsOutput()
689-
self.tabEditorWidget.refreshSettingsEditor()
680+
options = optionsDialog(self)
681+
if options.exec_():
682+
self.shell.refreshSettingsShell()
683+
self.shellOut.refreshSettingsOutput()
684+
self.tabEditorWidget.refreshSettingsEditor()
690685

691686
def callWidgetMessageBar(self, text):
692687
self.shellOut.widgetMessageBar(iface, text)

python/console/console_settings.ui

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@
180180
<property name="gridStyle">
181181
<enum>Qt::SolidLine</enum>
182182
</property>
183+
<property name="columnCount">
184+
<number>2</number>
185+
</property>
183186
<property name="rowCount">
184187
<number>0</number>
185188
</property>

0 commit comments

Comments
 (0)