new workaround for disconnected thumbnail views... to change ASAP

preferencesAboutTextFull
Clément Fauconnier 7 years ago
parent ce2f4259c5
commit 5343f6b9ba
  1. 8
      src/board/UBBoardController.cpp
  2. 8
      src/gui/UBBoardThumbnailsView.cpp

@ -1567,10 +1567,18 @@ void UBBoardController::setActiveDocumentScene(UBDocumentProxy* pDocumentProxy,
updateBackgroundActionsState(mActiveScene->isDarkBackground(), mActiveScene->pageBackground());
if(documentChange)
{
UBGraphicsTextItem::lastUsedTextColor = QColor();
}
if (sceneChange)
{
//should not be necessary, but no more time to investigate on it for the moment :
//for some reason, certain thumbnail views are not updating except if we load the document twice....
//the only workaroud I found for the moment..
emit initThumbnailsRequired(this);
emit activeSceneChanged();
}
}

@ -127,7 +127,13 @@ void UBBoardThumbnailsView::addThumbnail(UBDocumentContainer* source, int i)
void UBBoardThumbnailsView::clearThumbnails()
{
qDeleteAll(mThumbnails);
for(int i = 0; i < mThumbnails.size(); i++)
{
scene()->removeItem(mThumbnails.at(i)->pageNumber());
scene()->removeItem(mThumbnails.at(i));
mThumbnails.at(i)->deleteLater();
}
mThumbnails.clear();
}

Loading…
Cancel
Save