Commit b7397db5 authored by Claudio Valerio's avatar Claudio Valerio

Fixed Sankore-7 issue

parent a9f8c0ab
......@@ -83,6 +83,11 @@ UBLibraryController::UBLibraryController(QWidget *pParentWidget, UBBoardControll
}
bool UBLibraryController::canItemsOnElementBeDeleted(UBLibElement *pElement)
{
return !pElement->path().toLocalFile().startsWith(UBSettings::settings()->uniboardShapeLibraryDirectory());
}
void UBLibraryController::createInternalWidgetItems()
{
QStringList toolUris = UBToolsManager::manager()->allToolIDs();
......
......@@ -109,6 +109,7 @@ class UBLibraryController : public QObject
QString favoritePath();
void createNewFolder(QString name, UBLibElement* parentElem);
bool canItemsOnElementBeDeleted(UBLibElement *pElement);
signals:
void dialogClosed(int state);
......
......@@ -337,7 +337,7 @@ void UBLibActionBar::onSelectionChanged(QList<UBLibElement *> itemList, bool isI
mpFavoriteAction->setEnabled(bEnable);
mpSocialAction->setEnabled(bEnable);
mpDeleteAction->setEnabled(bEnable);
mpDeleteAction->setEnabled(bEnable && libraryController()->canItemsOnElementBeDeleted(itemList.at(0)));
}
/**
......
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