From fc54fa71175217758e67891b4cc593879f78436a Mon Sep 17 00:00:00 2001 From: Matthew Wilber Date: Sat, 19 Jul 2003 00:44:45 +0000 Subject: [PATCH] reset selected document to 1 when new image is selected so that if the number of documents between the old image and the new image varies, it will not say that the new image can't be loaded git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4012 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/tools/translation/inspector/ImageView.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tools/translation/inspector/ImageView.cpp b/src/tools/translation/inspector/ImageView.cpp index c55b77699b..2cd7be2a75 100644 --- a/src/tools/translation/inspector/ImageView.cpp +++ b/src/tools/translation/inspector/ImageView.cpp @@ -425,6 +425,9 @@ ImageView::SetImage(BMessage *pmsg) // determine what type the image is translator_info tinfo; BMessage ioExtension; + if (ref != fcurrentRef) + // if new image, reset to first document + fdocumentIndex = 1; chk = ioExtension.AddInt32("/documentIndex", fdocumentIndex); chk = proster->Identify(&file, &ioExtension, &tinfo, 0, NULL, B_TRANSLATOR_BITMAP);