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