Ensure text is visible in the SQL Filter dialogue. Fixes #3478

This commit is contained in:
Aditya Toshniwal 2018-07-09 14:08:41 +01:00 committed by Dave Page
parent 41a8333145
commit d1784137a5
2 changed files with 9 additions and 2 deletions

View File

@ -2075,7 +2075,14 @@ define([
var self = this;
/* self.sqlCtrl is null when Definition tab is not active */
if(self.sqlCtrl) {
let sqlEditPreferences = pgAdmin.Browser.get_preferences_for_module('sqleditor');
/* This control is used by filter dialog in query editor, so taking preferences from window
* SQL Editor can be in different tab
*/
let browser = window.opener ?
window.opener.pgAdmin.Browser : window.top.pgAdmin.Browser;
let sqlEditPreferences = browser.get_preferences_for_module('sqleditor');
$(self.sqlCtrl.getWrapperElement()).css(
'font-size',SqlEditorUtils.calcFontSize(sqlEditPreferences.sql_font_size)

View File

@ -617,7 +617,7 @@ class Preferences(object):
try:
pref.set(value)
except Exception as e:
current_app.logger.exeception(e)
current_app.logger.exception(e)
return False, str(e)
return True, None