Skip to content

Commit 37f54d9

Browse files
committed
gui: update actions in inspector and change button for route guides based on visibility
Signed-off-by: Peter Gadfort <peter.gadfort@gmail.com>
1 parent 8881d16 commit 37f54d9

2 files changed

Lines changed: 14 additions & 8 deletions

File tree

src/gui/src/dbDescriptors.cpp

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,14 +1590,19 @@ Descriptor::Actions DbNetDescriptor::getActions(std::any object) const
15901590
}});
15911591
}
15921592
if (!net->getGuides().empty()) {
1593-
actions.push_back(Descriptor::Action{"Route Guides", [this, gui, net]() {
1594-
if (guide_nets_.count(net) == 0) {
1595-
gui->addRouteGuides(net);
1596-
} else {
1597-
gui->removeRouteGuides(net);
1598-
}
1599-
return makeSelected(net);
1600-
}});
1593+
if (guide_nets_.count(net) == 0) {
1594+
actions.push_back(
1595+
Descriptor::Action{"Show Route Guides", [this, gui, net]() {
1596+
gui->addRouteGuides(net);
1597+
return makeSelected(net);
1598+
}});
1599+
} else {
1600+
actions.push_back(
1601+
Descriptor::Action{"Hide Route Guides", [this, gui, net]() {
1602+
gui->removeRouteGuides(net);
1603+
return makeSelected(net);
1604+
}});
1605+
}
16011606
}
16021607
if (!net->getTracks().empty()) {
16031608
actions.push_back(Descriptor::Action{"Tracks", [this, gui, net]() {

src/gui/src/inspector.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,6 +1057,7 @@ void Inspector::handleAction(QWidget* action)
10571057
}
10581058

10591059
if (new_selection && new_selection == selection_) {
1060+
reload();
10601061
return;
10611062
}
10621063

0 commit comments

Comments
 (0)