{
qDebug() << __PRETTY_FUNCTION__;
+ m_ui->setOwnLocationCrosshairVisibility(!enabled);
+
if (m_gps->isInitialized()) {
m_ui->setGPSButtonEnabled(enabled);
m_mapEngine->setGPSEnabled(enabled);
{
qDebug() << __PRETTY_FUNCTION__;
- if (visibility) {
+ if (visibility && m_loggedIn) {
m_ownLocationCrosshair->show();
m_drawOwnLocationCrosshair = true;
drawOwnLocationCrosshair(QSize(m_viewPortWidth, m_viewPortHeight));
void MainWindow::updateItemVisibility(bool show)
{
qDebug() << __PRETTY_FUNCTION__;
+
+ setOwnLocationCrosshairVisibility(show);
if(show) {
m_friendsListPanel->show();
m_userPanel->show();
m_userPanelSidebar->show();
- if(m_drawOwnLocationCrosshair) {
- m_ownLocationCrosshair->show();
- setGPSButtonEnabled(false);
- emit gpsTriggered(false);
- }
} else {
m_friendsListPanel->closePanel();
m_friendsListPanel->hide();
m_userPanel->closePanel();
m_userPanel->hide();
m_userPanelSidebar->hide();
- m_ownLocationCrosshair->hide();
}
}
void openSettingsDialog();
/**
+ * @brief Set own location crosshair visibility
+ *
+ * @param visible
+ */
+ void setOwnLocationCrosshairVisibility(bool visible);
+
+ /**
* @brief Sets username to member variable for login dialog
*
* @param username Username to be set
*/
void queueDialog(QDialog *dialog);
- /**
- * @brief Set own location crosshair visibility
- *
- * @param visible
- */
- void setOwnLocationCrosshairVisibility(bool visible);
+// /**
+// * @brief Set own location crosshair visibility
+// *
+// * @param visible
+// */
+// void setOwnLocationCrosshairVisibility(bool visible);
/**
* @brief Shows queued error information box