ui: Fixed correct delimiter per language used in search field
This commit is contained in:
@@ -17,8 +17,6 @@
|
||||
#include "component/view/GraphViewStyle.h"
|
||||
#include "settings/ColorScheme.h"
|
||||
|
||||
std::string QtSmartSearchBox::s_delimiter = "::";
|
||||
|
||||
QtSearchElement::QtSearchElement(const QString& text, QWidget* parent)
|
||||
: QPushButton(text, parent)
|
||||
{
|
||||
@@ -148,7 +146,7 @@ bool QtSmartSearchBox::event(QEvent *event)
|
||||
{
|
||||
if (m_highlightedMatch.hasChildren)
|
||||
{
|
||||
setEditText((m_highlightedMatch.text + s_delimiter).c_str());
|
||||
setEditText((m_highlightedMatch.text + NameHierarchy::getDelimiter()).c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -219,7 +217,7 @@ void QtSmartSearchBox::keyPressEvent(QKeyEvent* event)
|
||||
}
|
||||
else
|
||||
{
|
||||
std::vector<std::string> names = utility::splitToVector(text().toStdString(), s_delimiter);
|
||||
std::vector<std::string> names = utility::splitToVector(text().toStdString(), NameHierarchy::getDelimiter());
|
||||
if (names.back() == "")
|
||||
{
|
||||
names.pop_back();
|
||||
@@ -232,7 +230,7 @@ void QtSmartSearchBox::keyPressEvent(QKeyEvent* event)
|
||||
else
|
||||
{
|
||||
names.back() = "";
|
||||
setEditText(utility::join(names, s_delimiter).c_str());
|
||||
setEditText(utility::join(names, NameHierarchy::getDelimiter()).c_str());
|
||||
}
|
||||
|
||||
requestAutoCompletions();
|
||||
|
||||
@@ -66,8 +66,6 @@ private slots:
|
||||
void onElementSelected(QtSearchElement* element);
|
||||
|
||||
private:
|
||||
static std::string s_delimiter;
|
||||
|
||||
void moveCursor(int offset);
|
||||
void moveCursorTo(int goal);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user