Makes Next/Prev buttons work same as F3/F4 #5183
This commit is contained in:
@@ -1853,7 +1853,7 @@ void FileBrowser::openPrevImage()
|
||||
}
|
||||
}
|
||||
|
||||
void FileBrowser::selectImage(const Glib::ustring& fname)
|
||||
void FileBrowser::selectImage(const Glib::ustring& fname, bool doScroll)
|
||||
{
|
||||
MYWRITERLOCK(l, entryRW);
|
||||
|
||||
@@ -1891,7 +1891,10 @@ void FileBrowser::selectImage(const Glib::ustring& fname)
|
||||
|
||||
MYWRITERLOCK_RELEASE(l);
|
||||
|
||||
setScrollPosition(x - (ww - tw) / 2, y);
|
||||
if (doScroll) {
|
||||
// Center thumb
|
||||
setScrollPosition(x - (ww - tw) / 2, y);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -1903,7 +1906,7 @@ void FileBrowser::openNextPreviousEditorImage (const Glib::ustring& fname, eRTNa
|
||||
{
|
||||
|
||||
// let FileBrowser acquire Editor's perspective
|
||||
selectImage (fname);
|
||||
selectImage (fname, false);
|
||||
|
||||
// now switch to the requested image
|
||||
if (nextPrevious == NAV_NEXT) {
|
||||
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
|
||||
void openNextImage();
|
||||
void openPrevImage();
|
||||
void selectImage(const Glib::ustring& fname);
|
||||
void selectImage(const Glib::ustring& fname, bool doScroll);
|
||||
|
||||
void copyProfile ();
|
||||
void pasteProfile ();
|
||||
|
||||
@@ -829,7 +829,7 @@ void FileCatalog::previewsFinishedUI ()
|
||||
filepanel->loadingThumbs(M("PROGRESSBAR_READY"), 0);
|
||||
|
||||
if (!imageToSelect_fname.empty()) {
|
||||
fileBrowser->selectImage(imageToSelect_fname);
|
||||
fileBrowser->selectImage(imageToSelect_fname, true);
|
||||
imageToSelect_fname = "";
|
||||
}
|
||||
|
||||
@@ -2144,7 +2144,7 @@ void FileCatalog::selectImage (Glib::ustring fname, bool clearFilters)
|
||||
imageToSelect_fname = fname;
|
||||
} else {
|
||||
// FileCatalog::filterChanged ();//this will be replaced by queue_draw() in fileBrowser->selectImage
|
||||
fileBrowser->selectImage(fname);
|
||||
fileBrowser->selectImage(fname, true);
|
||||
imageToSelect_fname = "";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user