From: Alex B. <al...@us...> - 2015-01-20 03:09:17
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "omegat". The branch, master has been updated via 665df26f7531d952ccd19c53896fd889c5e6fb8e (commit) from 584063704757882cbd26d675eea56d21a562f9b3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://omegat.git.sourceforge.net/git/gitweb.cgi?p=omegat/omegat;a=commitdiff;h=665df26f7531d952ccd19c53896fd889c5e6fb8e commit 665df26f7531d952ccd19c53896fd889c5e6fb8e Author: Aaron Madlon-Kay <aa...@ma...> Date: Tue Jan 20 02:40:53 2015 +0000 Simplify logic for breaking EditorController.goNext() loop git-svn-id: svn+ssh://svn.code.sf.net/p/omegat/svn/trunk@6873 b0d8beef-cb45-0410-a8e4-c0d495c3b779 diff --git a/src/org/omegat/gui/editor/EditorController.java b/src/org/omegat/gui/editor/EditorController.java index 3aae0f7..fdbfa35 100644 --- a/src/org/omegat/gui/editor/EditorController.java +++ b/src/org/omegat/gui/editor/EditorController.java @@ -1042,21 +1042,14 @@ public class EditorController implements IEditor { // We found an entry break; } - if (looped) { - if (displayedFileIndex == startFileIndex && displayedEntryIndex >= startEntryIndex) { + if (looped && displayedFileIndex == startFileIndex) { + if (displayedEntryIndex >= startEntryIndex) { // We have looped back to our starting point break; } - if (displayedFileIndex > startFileIndex) { - // We have looped past our starting point but - // missed the last check because none of the files had entries - // (so displayedEntryIndex was always 0) - break; - } - if (files.size() == 1) { - // We have looped past our starting point but - // missed the last checks because there is only one file - // and it had no entries (displayedFileIndex was also always 0) + if (m_docSegList.length == 0) { + // We have looped back to our starting point + // and there were no hits in any files break; } } ----------------------------------------------------------------------- Summary of changes: src/org/omegat/gui/editor/EditorController.java | 17 +++++------------ 1 files changed, 5 insertions(+), 12 deletions(-) hooks/post-receive -- omegat |