diff --git a/modules/gui/src/python_shell/python_shell_widget.cc b/modules/gui/src/python_shell/python_shell_widget.cc index f86d0fc538c94591fea9d9dccad96e6aeb78eb3e..a1ee30cb5e33eeaafe6b89d94beccdf75925d490 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()); } }