Changeset 9807 in ntrip for trunk/BNC/src/map


Ignore:
Timestamp:
Aug 23, 2022, 2:08:11 PM (20 months ago)
Author:
stuerze
Message:

minor changes

Location:
trunk/BNC/src/map
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/map/bncmapwin.cpp

    r9802 r9807  
    4747bncMapWin::bncMapWin(QWidget* parent) : QDialog(parent) {
    4848
     49  _initMap = false;
     50
    4951  const int ww = QFontMetrics(font()).width('w');
    5052
     
    8486
    8587  show();
     88
    8689}
    8790
     
    114117    return;
    115118  }
     119  _initMap = true;
     120
    116121  bncSettings settings;
    117122  int mapWinDotSize = settings.value("PPP/mapWinDotSize").toInt();
     
    127132////////////////////////////////////////////////////////////////////////////
    128133void bncMapWin::gotoLocation(double lat, double lon) {
     134  if (!lat && !lon) {
     135    return;
     136  }
    129137  _currLat = lat;
    130138  _currLon = lon;
    131 
    132   if (!_webView->page()) {
    133     return;
    134   }
    135139
    136140  int    latDeg, latMin;
     
    157161    return;
    158162  }
    159 
     163  if (!_initMap) {
     164    return;
     165  }
    160166  double ell[3];
    161   xyz2ell(xx.data(), ell);
     167  if (xyz2ell(xx.data(), ell) == failure) {
     168    return;
     169  }
    162170  gotoLocation(ell[0]*180.0/M_PI, ell[1]*180.0/M_PI);
    163171}
  • trunk/BNC/src/map/bncmapwin.h

    r8909 r9807  
    6262  double           _currLon;
    6363  QByteArray       _staID;
     64  bool             _initMap;
    6465};
    6566
Note: See TracChangeset for help on using the changeset viewer.