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
This commit is contained in:
Matthew Wilber
2003-07-19 00:44:45 +00:00
parent 14fa3c6b01
commit fc54fa7117
@@ -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);