1. totte
  2. qvim

Commits

equalsraf  committed b37f566

Fix file browse for "Save as" command

- Our current implementation of the browse dialog did not respect the
'saving' argument and used an open FileDialog instead of a
save FileDialog causing all 'save as' commands via the browse dialog
to fail, because a new file could not exist.
- This issue is not visible in KDE where the open file dialog seems to
work either way.
* Issue #67

  • Participants
  • Parent commits 36d444e
  • Branches master

Comments (0)

Files changed (1)

File src/gui_qt.cpp

View file
 	}
 
 	window->setEnabled(false);
-	QString file = QFileDialog::getOpenFileName(window, VimWrapper::convertFrom(title), dir);
+	QString file;
+	if ( saving ) {
+		file = QFileDialog::getSaveFileName(window, VimWrapper::convertFrom(title), dir);
+	} else {
+		file = QFileDialog::getOpenFileName(window, VimWrapper::convertFrom(title), dir);
+	}
 	window->setEnabled(true);
 	vimshell->setFocus();