Fixed issue #317 (filmstrip does not scroll to opened image when entering editor)

This commit is contained in:
Oliver Duis
2010-11-14 16:08:55 +01:00
parent 5ccda1796c
commit 5eda4edecc
2 changed files with 7 additions and 0 deletions

View File

@@ -529,6 +529,12 @@ void ThumbBrowserBase::enableTabMode(bool enable) {
refreshThumbImages();
else
redraw();
// Scroll to selected position if going into ribbon mode
if (inTabMode && !selected.empty()) {
int h=selected[0]->getStartX();
hscroll.set_value (MIN(h, hscroll.get_adjustment()->get_upper()));
}
}
void ThumbBrowserBase::initEntry (ThumbBrowserEntryBase* entry) {

View File

@@ -103,6 +103,7 @@ protected:
int getMinimalWidth () { return width; }
int getEffectiveHeight () { return fnlabh+dtlabh+exlabh+textGap+exp_height; }
int getStartX () { return startx; }
bool inside (int x, int y);
bool insideWindow (int x, int y, int w, int h);