Commit b1d0370f authored by lm's avatar lm

Minor compile fixes and cleanups

parent fe3a27c7
......@@ -38,6 +38,8 @@ namespace mapcontrol
void TrailItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
Q_UNUSED(option);
Q_UNUSED(widget);
// painter->drawRect(QRectF(-3,-3,6,6));
painter->setBrush(m_brush);
painter->drawEllipse(-2,-2,4,4);
......
......@@ -75,7 +75,6 @@ inline bool isinf(T value)
*/
HUD::HUD(int width, int height, QWidget* parent)
: QGLWidget(QGLFormat(QGL::SampleBuffers), parent),
u(NULL),
uas(NULL),
yawInt(0.0f),
mode(tr("UNKNOWN MODE")),
......@@ -309,7 +308,6 @@ void HUD::setActiveUAS(UASInterface* uas)
// Set new UAS
this->uas = uas;
this->u = dynamic_cast<UAS*>(this->uas);
}
}
......@@ -1631,5 +1629,9 @@ void HUD::setPixels(int imgid, const unsigned char* imageData, int length, int s
void HUD::copyImage()
{
qDebug() << "HUD::copyImage()";
this->glImage = QGLWidget::convertToGLFormat(this->u->getImage());
UAS* u = dynamic_cast<UAS*>(this->uas);
if (u)
{
this->glImage = QGLWidget::convertToGLFormat(u->getImage());
}
}
......@@ -219,7 +219,6 @@ protected:
QAction* selectVideoChannelAction;
void paintEvent(QPaintEvent *event);
bool imageRequested;
UAS* u;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment