Commit 30061212 authored by Didier Clerc's avatar Didier Clerc

Fixed a crash in document mode

parent a2a729c8
...@@ -159,7 +159,7 @@ void UBGraphicsItemUndoCommand::undo() ...@@ -159,7 +159,7 @@ void UBGraphicsItemUndoCommand::undo()
} }
void UBGraphicsItemUndoCommand::redo() /*void UBGraphicsItemUndoCommand::redo()
{ {
// the Undo framework calls a redo while appending the undo command. // the Undo framework calls a redo while appending the undo command.
// as we have already plotted the elements, we do not want to do it twice // as we have already plotted the elements, we do not want to do it twice
...@@ -238,3 +238,4 @@ void UBGraphicsItemUndoCommand::redo() ...@@ -238,3 +238,4 @@ void UBGraphicsItemUndoCommand::redo()
mFirstRedo = false; mFirstRedo = false;
} }
} }
*/
...@@ -52,7 +52,7 @@ class UBGraphicsItemUndoCommand : public UBAbstractUndoCommand ...@@ -52,7 +52,7 @@ class UBGraphicsItemUndoCommand : public UBAbstractUndoCommand
protected: protected:
virtual void undo(); virtual void undo();
virtual void redo(); //virtual void redo();
private: private:
UBGraphicsScene* mScene; UBGraphicsScene* mScene;
......
...@@ -142,7 +142,8 @@ void UBDocumentNavigator::onScrollToSelectedPage(int index) ...@@ -142,7 +142,8 @@ void UBDocumentNavigator::onScrollToSelectedPage(int index)
} }
c++; c++;
} }
centerOn(mSelectedThumbnail); if(NULL != mSelectedThumbnail)
centerOn(mSelectedThumbnail);
} }
/** /**
......
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