mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 21:56:43 +08:00
Some 1st model set wizard improvements
* only use DB models * icon for create button * confirm message before overriding the model set * info if there are no models
This commit is contained in:
committed by
Mat Sutcliffe
parent
cc6adc6c40
commit
a340167493
@@ -272,6 +272,27 @@ namespace BlackGui
|
||||
modelsForSet = modelsForSet.findByDistributors(distributors);
|
||||
}
|
||||
|
||||
if (ui->cb_DbDataOnly->isChecked()) { modelsForSet.removeObjectsWithoutDbKey(); }
|
||||
if (modelsForSet.isEmpty())
|
||||
{
|
||||
this->showOverlayHTMLMessage("Selection yielded no result!");
|
||||
return;
|
||||
}
|
||||
|
||||
// just in case, paranoia
|
||||
if (!m_modelSetDialog || !m_modelSetDialog->modelSetComponent())
|
||||
{
|
||||
this->showOverlayHTMLMessage("No model set dialog, cannot continue");
|
||||
return;
|
||||
}
|
||||
|
||||
const int modelsSetCount = m_modelSetDialog->modelSetComponent()->getModelSetCount();
|
||||
if (modelsSetCount > 0)
|
||||
{
|
||||
QMessageBox::StandardButton override = QMessageBox::question(this, "Override", "Override existing model set?", QMessageBox::Yes | QMessageBox::No);
|
||||
if (override != QMessageBox::Yes) { return; }
|
||||
}
|
||||
|
||||
m_modelSetDialog->modelSetComponent()->setModelSet(modelsForSet, simulator);
|
||||
ui->pb_ModelSet->click();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user