mirror of https://github.com/vitalif/openscad
bugfix: drag&drop of stl/off/dxf didn't work into an empty editor
parent
41f352a788
commit
7f74d8d5d3
|
@ -493,12 +493,12 @@ void
|
|||
MainWindow::openFile(const QString &new_filename)
|
||||
{
|
||||
QString actual_filename = new_filename;
|
||||
QFileInfo fi(new_filename);
|
||||
if (fi.suffix().toLower().contains(QRegExp("^(stl|off|dxf)$"))) {
|
||||
actual_filename = QString();
|
||||
}
|
||||
#ifdef ENABLE_MDI
|
||||
if (!editor->toPlainText().isEmpty()) {
|
||||
QFileInfo fi(new_filename);
|
||||
if (fi.suffix().toLower().contains(QRegExp("^(stl|off|dxf)$"))) {
|
||||
actual_filename = QString();
|
||||
}
|
||||
new MainWindow(actual_filename);
|
||||
clearCurrentOutput();
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue