mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-08-05 08:16:03 +08:00
ui: Trim panel name for Firehose panel redirect (#664)
* ui: Trim panel name for Firehose panel redirect * unused * extra
This commit is contained in:
@@ -344,7 +344,11 @@ void SettingsWindow::setCurrentPanel(int index, const QString ¶m) {
|
||||
|
||||
// Find the panel by name
|
||||
for (int i = 0; i < nav_btns->buttons().size(); i++) {
|
||||
if (nav_btns->buttons()[i]->text() == tr(panelName.toStdString().c_str())) {
|
||||
bool panel_trimmed = false;
|
||||
#ifdef SUNNYPILOT
|
||||
panel_trimmed = nav_btns->buttons()[i]->text().trimmed() == tr(panelName.toStdString().c_str());
|
||||
#endif
|
||||
if ((nav_btns->buttons()[i]->text() == tr(panelName.toStdString().c_str())) || panel_trimmed) {
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user