mirror of
https://github.com/leozide/leocad
synced 2024-12-25 21:58:23 +01:00
Disable stud logo options from preferences when unofficial parts are missing.
This commit is contained in:
parent
847cbfeb87
commit
ea99066465
3 changed files with 14 additions and 1 deletions
|
@ -1537,6 +1537,11 @@ void lcPiecesLibrary::UploadTextures(lcContext* Context)
|
|||
mTextureUploads.clear();
|
||||
}
|
||||
|
||||
bool lcPiecesLibrary::SupportsStudLogo() const
|
||||
{
|
||||
return mZipFiles[LC_ZIPFILE_UNOFFICIAL] || mHasUnofficial;
|
||||
}
|
||||
|
||||
void lcPiecesLibrary::SetStudLogo(int StudLogo, bool Reload)
|
||||
{
|
||||
mStudLogo = StudLogo;
|
||||
|
|
|
@ -127,6 +127,7 @@ public:
|
|||
|
||||
bool LoadPrimitive(lcLibraryPrimitive* Primitive);
|
||||
|
||||
bool SupportsStudLogo() const;
|
||||
void SetStudLogo(int StudLogo, bool Reload);
|
||||
|
||||
int GetStudLogo() const
|
||||
|
|
|
@ -182,6 +182,12 @@ lcQPreferencesDialog::lcQPreferencesDialog(QWidget* Parent, lcPreferencesDialogO
|
|||
else
|
||||
ui->PreviewViewSphereSizeCombo->setCurrentIndex(0);
|
||||
|
||||
if (!lcGetPiecesLibrary()->SupportsStudLogo())
|
||||
{
|
||||
ui->studLogo->setEnabled(false);
|
||||
ui->studLogoCombo->setEnabled(false);
|
||||
}
|
||||
|
||||
ui->studLogo->setChecked(mOptions->StudLogo);
|
||||
if (ui->studLogo->isChecked())
|
||||
ui->studLogoCombo->setCurrentIndex(mOptions->StudLogo - 1);
|
||||
|
@ -556,7 +562,8 @@ void lcQPreferencesDialog::ColorButtonClicked()
|
|||
|
||||
void lcQPreferencesDialog::on_studLogo_toggled()
|
||||
{
|
||||
ui->studLogoCombo->setEnabled(ui->studLogo->isChecked());
|
||||
if (lcGetPiecesLibrary()->SupportsStudLogo())
|
||||
ui->studLogoCombo->setEnabled(ui->studLogo->isChecked());
|
||||
}
|
||||
|
||||
void lcQPreferencesDialog::on_antiAliasing_toggled()
|
||||
|
|
Loading…
Reference in a new issue