Fixed Sankore-7 issue

preferencesAboutTextFull
Claudio Valerio 14 years ago
parent a9f8c0ab12
commit b7397db519
  1. 5
      src/board/UBLibraryController.cpp
  2. 1
      src/board/UBLibraryController.h
  3. 2
      src/gui/UBLibActionBar.cpp

@ -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() void UBLibraryController::createInternalWidgetItems()
{ {
QStringList toolUris = UBToolsManager::manager()->allToolIDs(); QStringList toolUris = UBToolsManager::manager()->allToolIDs();

@ -109,6 +109,7 @@ class UBLibraryController : public QObject
QString favoritePath(); QString favoritePath();
void createNewFolder(QString name, UBLibElement* parentElem); void createNewFolder(QString name, UBLibElement* parentElem);
bool canItemsOnElementBeDeleted(UBLibElement *pElement);
signals: signals:
void dialogClosed(int state); void dialogClosed(int state);

@ -337,7 +337,7 @@ void UBLibActionBar::onSelectionChanged(QList<UBLibElement *> itemList, bool isI
mpFavoriteAction->setEnabled(bEnable); mpFavoriteAction->setEnabled(bEnable);
mpSocialAction->setEnabled(bEnable); mpSocialAction->setEnabled(bEnable);
mpDeleteAction->setEnabled(bEnable); mpDeleteAction->setEnabled(bEnable && libraryController()->canItemsOnElementBeDeleted(itemList.at(0)));
} }
/** /**

Loading…
Cancel
Save