From d1db42ebe804e08b43515c4ec11e9af0b2d36aea Mon Sep 17 00:00:00 2001 From: andreas <andreas@5a81b35b-ba03-0410-adc8-b2c5c5119f08> Date: Wed, 9 Jun 2010 15:26:48 +0000 Subject: [PATCH] fix for dir separator in python shell path completion on Windows git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/branches/new_shell@2367 5a81b35b-ba03-0410-adc8-b2c5c5119f08 --- modules/gui/src/python_shell/python_shell_widget.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/gui/src/python_shell/python_shell_widget.cc b/modules/gui/src/python_shell/python_shell_widget.cc index f86d0fc53..a1ee30cb5 100644 --- a/modules/gui/src/python_shell/python_shell_widget.cc +++ b/modules/gui/src/python_shell/python_shell_widget.cc @@ -364,7 +364,8 @@ void PythonShellWidget::InsertCompletion(const QString& completion) void PythonShellWidget::InsertPathCompletion(const QString& completion) { InsertCompletion(completion); - if(QFileInfo(completion).isDir()){ + // append dir separator for directories if none present (Windows adds it already for the inline completion) + if(QFileInfo(completion).isDir() && ! completion.endsWith(QDir::separator())){ textCursor().insertText(QDir::separator()); } } -- GitLab