Use handler to suggest name

master
Salvo 'LtWorf' Tomaselli 2015-06-17 16:35:14 +07:00
parent 59d712e53f
commit 5218f41e7b
1 changed files with 2 additions and 14 deletions

@ -16,10 +16,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# author Salvo "LtWorf" Tomaselli <tiposchi@tiscali.it>
import sys
import os
import os.path
from PyQt5 import QtCore, QtWidgets, QtWidgets
from relational import relation, parser, optimizer, rtypes
@ -297,17 +293,9 @@ class relForm(QtWidgets.QMainWindow):
for f in filenames:
# Default relation's name
name = os.path.basename(f).lower()
if len(name) == 0:
return
if (name.endswith(".csv")): # removes the extension
name = name[:-4]
if not rtypes.is_valid_relation_name(name):
name = self.user_interface.suggest_name(f)
if name is None:
name = self.promptRelationName()
if name is None:
continue