resolved issue sankore 25

preferencesAboutTextFull
Claudio Valerio 14 years ago
parent 79ca82208b
commit 0dc183c6e0
  1. 13
      src/board/UBLibraryController.cpp

@ -79,8 +79,6 @@ UBLibraryController::UBLibraryController(QWidget *pParentWidget, UBBoardControll
mInteractiveUserDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->uniboardInteractiveUserDirectory()); mInteractiveUserDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->uniboardInteractiveUserDirectory());
qDebug() << ">> mInteractiveUserDirectoryPath : " << mInteractiveUserDirectoryPath;
createInternalWidgetItems(); createInternalWidgetItems();
} }
@ -333,10 +331,6 @@ QList<UBLibElement*> UBLibraryController::addVirtualElementsForItemPath(const QS
userPath(path); userPath(path);
content << listElementsInPath(path.toLocalFile()); content << listElementsInPath(path.toLocalFile());
} }
/* else if (pPath == mInteractiveUserDirectoryPath.toLocalFile()){
content << listElementsInPath(UBSettings::settings()->uniboardInteractiveLibraryDirectory());
content << listElementsInPath(UBSettings::settings()->uniboardInteractiveFavoritesDirectory());
}*/
return content; return content;
} }
@ -498,6 +492,13 @@ void UBLibraryController::addItemToPage(UBLibElement* item)
else if (mimeType.contains("application")){ else if (mimeType.contains("application")){
addInteractivesToCurrentPage(list); addInteractivesToCurrentPage(list);
} }
else if (mimeType.isEmpty() && item->type() == eUBLibElementType_InteractiveItem){
// Those conditions allow us to detect internal app like
// mask, ruler, compass and protractor
list.clear();
list << item->path().toString().replace("file:","");
addInteractivesToCurrentPage(list);
}
else{ else{
UBApplication::showMessage(tr("Adding to page failed for item %1.").arg(item->name())); UBApplication::showMessage(tr("Adding to page failed for item %1.").arg(item->name()));
} }

Loading…
Cancel
Save