Fixed the issue SANKORE-19: a crash occured while opening a page containing an application

preferencesAboutTextFull
shibakaneki 14 years ago
parent fdd202001b
commit 763a4fcf1d
  1. 6
      src/board/UBBoardController.cpp
  2. 3
      src/domain/UBGraphicsTextItemDelegate.cpp
  3. 6
      src/gui/UBDocumentNavigator.cpp
  4. 23
      src/transition/UniboardSankoreTransition.cpp

@ -1132,11 +1132,11 @@ void UBBoardController::setActiveDocumentScene(UBDocumentProxy* pDocumentProxy,
UBGraphicsTextItem::lastUsedTextColor = QColor(); UBGraphicsTextItem::lastUsedTextColor = QColor();
} }
if (sceneChange)
emit activeSceneChanged();
// Notify the navigator palette that the document has changed // Notify the navigator palette that the document has changed
mPaletteManager->navigatorPalette()->setDocument(pDocumentProxy); mPaletteManager->navigatorPalette()->setDocument(pDocumentProxy);
if (sceneChange)
emit activeSceneChanged();
} }

@ -58,7 +58,8 @@ void UBGraphicsTextItemDelegate::contentsChanged()
delegated()->contentsChanged(); delegated()->contentsChanged();
} }
// This method is used to filter the available fonts. Only the web-compliant fonts
// will remain in the font list.
void UBGraphicsTextItemDelegate::customize(QFontDialog &fontDialog) void UBGraphicsTextItemDelegate::customize(QFontDialog &fontDialog)
{ {
fontDialog.setOption(QFontDialog::DontUseNativeDialog); fontDialog.setOption(QFontDialog::DontUseNativeDialog);

@ -91,7 +91,7 @@ void UBDocumentNavigator::generateThumbnails()
QGraphicsPixmapItem* pixmapItem = new UBSceneThumbnailPixmap(pix, mCrntDoc, i); QGraphicsPixmapItem* pixmapItem = new UBSceneThumbnailPixmap(pix, mCrntDoc, i);
// Get the selected item // Get the selected item
if(UBApplication::boardController->activeSceneIndex() == i) if(UBApplication::boardController->activeSceneIndex() == i)
{ {
selection = pixmapItem; selection = pixmapItem;
mCrntItem = dynamic_cast<UBSceneThumbnailPixmap*>(pixmapItem); mCrntItem = dynamic_cast<UBSceneThumbnailPixmap*>(pixmapItem);
@ -152,10 +152,10 @@ void UBDocumentNavigator::addNewPage()
{ {
if(!bNavig) if(!bNavig)
{ {
generateThumbnails(); generateThumbnails();
if(NULL != mCrntItem) if(NULL != mCrntItem)
{ {
mCrntItem->setSelected(true); mCrntItem->setSelected(true);
} }
} }
} }

@ -7,20 +7,25 @@
UniboardSankoreTransition::UniboardSankoreTransition(QObject *parent) : UniboardSankoreTransition::UniboardSankoreTransition(QObject *parent) :
QObject(parent) QObject(parent)
, mTransitionDlg(NULL)
{ {
mOldSankoreDirectory = UBFileSystemUtils::normalizeFilePath(UBDesktopServices::storageLocation(QDesktopServices::DataLocation)); // mOldSankoreDirectory = UBFileSystemUtils::normalizeFilePath(UBDesktopServices::storageLocation(QDesktopServices::DataLocation));
mUniboardSourceDirectory = UBFileSystemUtils::normalizeFilePath(UBDesktopServices::storageLocation(QDesktopServices::DataLocation)); // mUniboardSourceDirectory = UBFileSystemUtils::normalizeFilePath(UBDesktopServices::storageLocation(QDesktopServices::DataLocation));
#if defined(Q_WS_MACX) //#if defined(Q_WS_MACX)
mUniboardSourceDirectory.replace("Sankore/Sankore 3.1", "Uniboard"); // mUniboardSourceDirectory.replace("Sankore/Sankore 3.1", "Uniboard");
#else //#else
mUniboardSourceDirectory.replace("Sankore/Sankore 3.1", "Mnemis/Uniboard"); // mUniboardSourceDirectory.replace("Sankore/Sankore 3.1", "Mnemis/Uniboard");
#endif //#endif
connect(this, SIGNAL(docAdded(UBDocumentProxy*)), UBPersistenceManager::persistenceManager(), SIGNAL(documentCreated(UBDocumentProxy*))); // connect(this, SIGNAL(docAdded(UBDocumentProxy*)), UBPersistenceManager::persistenceManager(), SIGNAL(documentCreated(UBDocumentProxy*)));
} }
UniboardSankoreTransition::~UniboardSankoreTransition() UniboardSankoreTransition::~UniboardSankoreTransition()
{ {
delete mTransitionDlg; if(NULL != mTransitionDlg)
{
delete mTransitionDlg;
mTransitionDlg = NULL;
}
} }
void UniboardSankoreTransition::rollbackDocumentsTransition(QFileInfoList& fileInfoList) void UniboardSankoreTransition::rollbackDocumentsTransition(QFileInfoList& fileInfoList)

Loading…
Cancel
Save