|
|
@ -115,11 +115,12 @@ MapPanel::MapPanel(QWidget* parent) : QWidget(parent) { |
|
|
|
|
|
|
|
|
|
|
|
stack->addWidget(main_widget); |
|
|
|
stack->addWidget(main_widget); |
|
|
|
stack->addWidget(no_prime_widget); |
|
|
|
stack->addWidget(no_prime_widget); |
|
|
|
stack->setCurrentIndex(1); |
|
|
|
stack->setCurrentIndex(uiState()->prime_type ? 0 : 1); |
|
|
|
|
|
|
|
|
|
|
|
QVBoxLayout *wrapper = new QVBoxLayout(this); |
|
|
|
QVBoxLayout *wrapper = new QVBoxLayout(this); |
|
|
|
wrapper->addWidget(stack); |
|
|
|
wrapper->addWidget(stack); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clear(); |
|
|
|
clear(); |
|
|
|
|
|
|
|
|
|
|
|
if (auto dongle_id = getDongleId()) { |
|
|
|
if (auto dongle_id = getDongleId()) { |
|
|
@ -183,8 +184,9 @@ void MapPanel::updateCurrentRoute() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void MapPanel::parseResponse(const QString &response, bool success) { |
|
|
|
void MapPanel::parseResponse(const QString &response, bool success) { |
|
|
|
|
|
|
|
stack->setCurrentIndex((uiState()->prime_type || success) ? 0 : 1); |
|
|
|
|
|
|
|
|
|
|
|
if (!success) { |
|
|
|
if (!success) { |
|
|
|
stack->setCurrentIndex(1); |
|
|
|
|
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -283,7 +285,6 @@ void MapPanel::parseResponse(const QString &response, bool success) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
recent_layout->addStretch(); |
|
|
|
recent_layout->addStretch(); |
|
|
|
stack->setCurrentIndex(0); |
|
|
|
|
|
|
|
repaint(); |
|
|
|
repaint(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|