修复storychain逻辑bug
This commit is contained in:
parent
4846662044
commit
4e7354d075
|
@ -166,13 +166,14 @@ void StorychainsPresent::jump_to(const QModelIndex &curr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QList<QString> path;
|
QList<QString> path;
|
||||||
|
auto node = curr;
|
||||||
while (true) {
|
while (true) {
|
||||||
auto node = curr.data().toString();
|
auto node_name = node.data().toString();
|
||||||
|
|
||||||
if(node.isEmpty())
|
if (node_name.isEmpty())
|
||||||
break;
|
break;
|
||||||
else
|
path.insert(0, node_name);
|
||||||
path << node;
|
node = node.parent();
|
||||||
}
|
}
|
||||||
|
|
||||||
disp_core->postCommand(StorychainJumpTo(path));
|
disp_core->postCommand(StorychainJumpTo(path));
|
||||||
|
@ -184,13 +185,14 @@ void StorychainsPresent::detail_show(const QModelIndex &curr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QList<QString> path;
|
QList<QString> path;
|
||||||
|
auto node = curr;
|
||||||
while (true) {
|
while (true) {
|
||||||
auto node = curr.data().toString();
|
auto node_name = node.data().toString();
|
||||||
|
|
||||||
if(node.isEmpty())
|
if (node_name.isEmpty())
|
||||||
break;
|
break;
|
||||||
else
|
path.insert(0, node_name);
|
||||||
path << node;
|
node = node.parent();
|
||||||
}
|
}
|
||||||
|
|
||||||
disp_core->postCommand(StorychainDetailShow(path));
|
disp_core->postCommand(StorychainDetailShow(path));
|
||||||
|
|
Loading…
Reference in New Issue