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