mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 07:35:48 +08:00
Fix handling of base index properties in CAirport/ICoordinateWithRelativePosition
This commit is contained in:
committed by
Mathew Sutcliffe
parent
82324d3246
commit
dbdea2d846
@@ -281,6 +281,7 @@ namespace BlackMisc
|
||||
|
||||
void ICoordinateWithRelativePosition::setPropertyByIndex(const CPropertyIndex &index, const CVariant &variant)
|
||||
{
|
||||
if (ICoordinateGeodetic::canHandleIndex(index)) { return; }
|
||||
if (!index.isMyself())
|
||||
{
|
||||
ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
@@ -326,6 +327,7 @@ namespace BlackMisc
|
||||
|
||||
bool ICoordinateWithRelativePosition::canHandleIndex(const CPropertyIndex &index)
|
||||
{
|
||||
if (ICoordinateGeodetic::canHandleIndex(index)) { return true; }
|
||||
int i = index.frontCasted<int>();
|
||||
return (i >= static_cast<int>(IndexRelativeDistance)) && (i <= static_cast<int>(IndexRelativeBearing));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user