Skip to content
This repository has been archived by the owner on Oct 1, 2023. It is now read-only.

Simplify OpenURL() usage #528

Merged
merged 1 commit into from
Sep 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions sysid-application/src/main/native/cpp/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,11 @@ void Application(std::string_view saveDir) {
ImGui::EndMenu();
}

bool docs = false;
if (ImGui::BeginMenu("Docs")) {
if (ImGui::MenuItem("Online documentation")) {
docs = true;
wpi::gui::OpenURL(
"https://docs.wpilib.org/en/stable/docs/software/pathplanning/"
"system-identification/");
}

ImGui::EndMenu();
Expand All @@ -182,13 +183,6 @@ void Application(std::string_view saveDir) {
toCSV = false;
}

if (docs) {
wpi::gui::OpenURL(
"https://docs.wpilib.org/en/stable/docs/software/pathplanning/"
"system-identification/");
docs = false;
}

if (ImGui::BeginPopupModal("SysId JSON to CSV Converter")) {
gJSONConverter->DisplayCSVConvert();
if (ImGui::Button("Close")) {
Expand Down