Skip to content

Commit

Permalink
Merge pull request #16605 from ccordoba12/issue-16598
Browse files Browse the repository at this point in the history
PR: Fix error when opening files that the Variable Explorer can handle (Main window)
  • Loading branch information
ccordoba12 authored Oct 18, 2021
2 parents c8a1ef2 + 310d20c commit 3cdcfc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spyder/app/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
from qtpy.compat import from_qvariant
from qtpy.QtCore import (QCoreApplication, Qt, QTimer, Signal, Slot,
qInstallMessageHandler)
from qtpy.QtGui import QColor, QKeySequence, QIcon
from qtpy.QtGui import QColor, QKeySequence
from qtpy.QtWidgets import (QApplication, QMainWindow, QMenu, QMessageBox,
QShortcut, QStyleFactory)

Expand Down Expand Up @@ -1593,7 +1593,7 @@ def open_file(self, fname, external=False):
if encoding.is_text_file(fname):
self.editor.load(fname)
elif self.variableexplorer is not None and ext in IMPORT_EXT:
self.variableexplorer.import_data(fname)
self.variableexplorer.get_widget().import_data(fname)
elif not external:
fname = file_uri(fname)
start_file(fname)
Expand Down

0 comments on commit 3cdcfc1

Please sign in to comment.