Skip to content

Commit

Permalink
ExpressionCompleter: Remove '=' before tokenizing string, to improve …
Browse files Browse the repository at this point in the history
…completer when used in the spreadsheet.
  • Loading branch information
eivindkv committed Jan 8, 2016
1 parent a760487 commit 48b6990
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Gui/ExpressionCompleter.cpp
Expand Up @@ -236,7 +236,8 @@ QStringList ExpressionCompleter::splitPath ( const QString & path ) const
void ExpressionCompleter::slotUpdate(const QString & prefix)
{
using namespace boost::tuples;
std::vector<boost::tuple<int, int, std::string> > tokens = ExpressionParser::tokenize(Base::Tools::toStdString(prefix));
int j = (prefix.size() > 0 && prefix.at(0) == QChar::fromAscii('=')) ? 1 : 0;
std::vector<boost::tuple<int, int, std::string> > tokens = ExpressionParser::tokenize(Base::Tools::toStdString(prefix.mid(j)));
std::string completionPrefix;

if (tokens.size() == 0 || (prefix.size() > 0 && prefix[prefix.size() - 1] == QChar(32))) {
Expand Down

0 comments on commit 48b6990

Please sign in to comment.