You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: python/plugins/db_manager/db_manager.py
+2-2
Original file line number
Diff line number
Diff line change
@@ -148,7 +148,7 @@ def refreshActionSlot(self):
148
148
defimportActionSlot(self):
149
149
db=self.tree.currentDatabase()
150
150
ifdbisNone:
151
-
self.infoBar.pushMessage(self.tr("Sorry"), self.tr("No database selected or you are not connected to it."), QgsMessageBar.INFO, self.iface.messageTimeout())
151
+
self.infoBar.pushMessage(self.tr("No database selected or you are not connected to it."), QgsMessageBar.INFO, self.iface.messageTimeout())
152
152
return
153
153
154
154
outUri=db.uri()
@@ -163,7 +163,7 @@ def importActionSlot(self):
163
163
defexportActionSlot(self):
164
164
table=self.tree.currentTable()
165
165
iftableisNone:
166
-
self.infoBar.pushMessage(self.tr("Sorry"), self.tr("Select the table you want export to file."), QgsMessageBar.INFO, self.iface.messageTimeout())
166
+
self.infoBar.pushMessage(self.tr("Select the table you want export to file."), QgsMessageBar.INFO, self.iface.messageTimeout())
QMessageBox.critical(mainwindow, "Invalid topology", u'Select a topology schema to continue.')
72
-
returnFalse
72
+
mainwindow.infoBar.pushMessage("Invalid topology", u'Select a topology schema to continue.', QgsMessageBar.INFO, mainwindow.iface.messageTimeout())
73
+
returnFalse
73
74
74
75
ifitem.schema() !=None:
75
-
sql=u"SELECT srid FROM topology.topology WHERE name = %s"%quoteStr(item.schema().name)
76
-
c=db.connector._get_cursor()
77
-
db.connector._execute( c, sql )
78
-
res=db.connector._fetchone( c )
79
-
isTopoSchema=res!=None
76
+
sql=u"SELECT srid FROM topology.topology WHERE name = %s"%quoteStr(item.schema().name)
77
+
c=db.connector._get_cursor()
78
+
db.connector._execute( c, sql )
79
+
res=db.connector._fetchone( c )
80
+
isTopoSchema=res!=None
80
81
81
82
ifnotisTopoSchema:
82
-
QMessageBox.critical(mainwindow, "Invalid topology", u'Schema "%s" is not registered in topology.topology.'%item.schema().name)
83
-
returnFalse
83
+
mainwindow.infoBar.pushMessage("Invalid topology", u'Schema "{0}" is not registered in topology.topology.'.format(item.schema().name), QgsMessageBar.WARNING, mainwindow.iface.messageTimeout())
0 commit comments