From bf0d6fe1e5e0e13ac2ca7599bb4b657ec8a9db40 Mon Sep 17 00:00:00 2001 From: Craig Watson Date: Sat, 16 Sep 2017 21:13:13 -0400 Subject: [PATCH] Removed 'Set as background' button for images, since that feature is now accessible from the image menu on the board --- src/gui/UBFeaturesWidget.cpp | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/src/gui/UBFeaturesWidget.cpp b/src/gui/UBFeaturesWidget.cpp index 5667024d..444eacff 100644 --- a/src/gui/UBFeaturesWidget.cpp +++ b/src/gui/UBFeaturesWidget.cpp @@ -867,7 +867,6 @@ UBFeatureProperties::UBFeatureProperties( QWidget *parent, const char *name ) : , mpButtonLayout(NULL) , mpAddPageButton(NULL) , mpAddToLibButton(NULL) - , mpSetAsBackgroundButton(NULL) , mpObjInfoLabel(NULL) , mpObjInfos(NULL) , mpThumbnail(NULL) @@ -899,10 +898,6 @@ UBFeatureProperties::UBFeatureProperties( QWidget *parent, const char *name ) : mpAddPageButton->setText(tr("Add to page")); mpButtonLayout->addWidget(mpAddPageButton); - mpSetAsBackgroundButton = new UBFeatureItemButton(); - mpSetAsBackgroundButton->setText(tr("Set as background")); - mpButtonLayout->addWidget(mpSetAsBackgroundButton); - mpAddToLibButton = new UBFeatureItemButton(); mpAddToLibButton->setText(tr("Add to library")); mpButtonLayout->addWidget(mpAddToLibButton); @@ -924,7 +919,6 @@ UBFeatureProperties::UBFeatureProperties( QWidget *parent, const char *name ) : mpLayout->setMargin(0); connect( mpAddPageButton, SIGNAL(clicked()), this, SLOT(onAddToPage()) ); - connect( mpSetAsBackgroundButton, SIGNAL( clicked() ), this, SLOT( onSetAsBackground() ) ); connect( mpAddToLibButton, SIGNAL( clicked() ), this, SLOT(onAddToLib() ) ); } @@ -955,11 +949,6 @@ UBFeatureProperties::~UBFeatureProperties() delete mpAddPageButton; mpAddPageButton = NULL; } - if ( mpSetAsBackgroundButton ) - { - delete mpSetAsBackgroundButton; - mpSetAsBackgroundButton = NULL; - } if ( mpAddToLibButton ) { delete mpAddToLibButton; @@ -1047,26 +1036,10 @@ void UBFeatureProperties::showElement(const UBFeature &elem) if ( UBApplication::isFromWeb( elem.getFullPath().toString() ) ) { mpAddToLibButton->show(); - if( elem.getMetadata()["Type"].toLower().contains("image") ) - { - mpSetAsBackgroundButton->show(); - } - else - { - mpSetAsBackgroundButton->hide(); - } } else { mpAddToLibButton->hide(); - if (UBFileSystemUtils::mimeTypeFromFileName( elem.getFullPath().toLocalFile() ).contains("image")) - { - mpSetAsBackgroundButton->show(); - } - else - { - mpSetAsBackgroundButton->hide(); - } } }