Files
pilotclient/src/blackgui/components/dbownmodelsetdialog.cpp
Klaus Basan d320f590b4 Ref T311, avoid crash of model set dialog
- check for nullptr mapping component
- disable new set button in dialog
2018-08-27 18:58:19 +02:00

51 lines
1.5 KiB
C++

/* Copyright (C) 2018
* swift project Community / Contributors
*
* This file is part of swift Project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
#include "dbownmodelsetdialog.h"
#include "ui_dbownmodelsetdialog.h"
using namespace BlackMisc::Simulation;
namespace BlackGui
{
namespace Components
{
CDbOwnModelSetDialog::CDbOwnModelSetDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::CDbOwnModelSetDialog)
{
ui->setupUi(this);
this->setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
}
CDbOwnModelSetDialog::~CDbOwnModelSetDialog()
{ }
void CDbOwnModelSetDialog::setSimulator(const CSimulatorInfo &simulator)
{
ui->comp_OwnModelSet->setSimulator(simulator);
}
const CDbOwnModelSetComponent *CDbOwnModelSetDialog::modelSetComponent() const
{
return ui->comp_OwnModelSet;
}
CDbOwnModelSetComponent *CDbOwnModelSetDialog::modelSetComponent()
{
return ui->comp_OwnModelSet;
}
void CDbOwnModelSetDialog::enableButtons(bool firstSet, bool newSet)
{
ui->comp_OwnModelSet->enableButtons(firstSet, newSet);
}
} // ns
} // ns