Your ROOT_URL in app.ini is http://git.osmesh.ru/ but you are visiting http://91.221.70.94:3000/MOS/OpenBoard/commit/a3ad10b459b285ca51a743954f0899909f1104e8?style=split&whitespace=ignore-change You should set ROOT_URL correctly, otherwise the web may not work correctly.

fixed two issues regarding ubx import where import could fail if some folders and files had the same name

preferencesAboutTextFull
Clément Fauconnier 4 years ago
parent fe24d53565
commit a3ad10b459
  1. 15
      src/document/UBDocumentController.cpp

@ -1028,8 +1028,14 @@ QStringList UBDocumentTreeModel::nodeNameList(const QModelIndex &pIndex) const
return QStringList(); return QStringList();
} }
foreach (UBDocumentTreeNode *curNode, catalog->children()) { foreach (UBDocumentTreeNode *curNode, catalog->children())
{
/* this function is only used (at this time) to compare filenames eachother, so it has to distinguish a folder named "A" from a file named "A"
// notice that it is a really poor way to search for file indexes, and that the code where it is called should be entirely reworked, when the time permits it. */
if (curNode->nodeType() != UBDocumentTreeNode::Catalog)
result << curNode->nodeName(); result << curNode->nodeName();
else
result << "folder - " + curNode->nodeName();
} }
return result; return result;
@ -1070,9 +1076,12 @@ QModelIndex UBDocumentTreeModel::goTo(const QString &dir)
QString curLevelName = pathList.takeFirst(); QString curLevelName = pathList.takeFirst();
if (searchingNode) { if (searchingNode) {
searchingNode = false; searchingNode = false;
for (int i = 0; i < rowCount(parentIndex); ++i) { int irowCount = rowCount(parentIndex);
for (int i = 0; i < irowCount; ++i) {
QModelIndex curChildIndex = index(i, 0, parentIndex); QModelIndex curChildIndex = index(i, 0, parentIndex);
if (nodeFromIndex(curChildIndex)->nodeName() == curLevelName) { UBDocumentTreeNode* currentNode = nodeFromIndex(curChildIndex);
if (currentNode->nodeName() == curLevelName && currentNode->nodeType() == UBDocumentTreeNode::Catalog)
{
searchingNode = true; searchingNode = true;
parentIndex = curChildIndex; parentIndex = curChildIndex;
break; break;

Loading…
Cancel
Save