diff --git a/Translator/MainWindow.xaml b/Translator/MainWindow.xaml index 840e4a8..a5e5249 100644 --- a/Translator/MainWindow.xaml +++ b/Translator/MainWindow.xaml @@ -53,6 +53,7 @@ + diff --git a/Translator/MainWindow.xaml.cs b/Translator/MainWindow.xaml.cs index 6a02d38..f2aab97 100644 --- a/Translator/MainWindow.xaml.cs +++ b/Translator/MainWindow.xaml.cs @@ -818,12 +818,15 @@ private void WordsListView_PreviewKeyDown(object sender, KeyEventArgs e) if (cell.Column.Header.ToString() == "Play" || cell.Column.Header.ToString() == "Phrase to Speak") { - //} - nextRowCell = cell.PredictFocus(FocusNavigationDirection.Left); + //} + nextRowCell = cell.PredictFocus(FocusNavigationDirection.Left); - //if (nextRowCell == null || (!(nextRowCell is Button)&&(nextRowCell as DataGridCell).Column.Header.ToString() == "Play")) - //{ - // nextRowCell = cell.PredictFocus(FocusNavigationDirection.Left); + while (!(nextRowCell is DataGridCell)) + { + nextRowCell = VisualTreeHelper.GetParent(nextRowCell); + + } + // nextRowCell = cell.PredictFocus(FocusNavigationDirection.Left); while ((nextRowCell as DataGridCell).PredictFocus(FocusNavigationDirection.Left) != null) { @@ -838,6 +841,11 @@ private void WordsListView_PreviewKeyDown(object sender, KeyEventArgs e) nextRow = VisualTreeHelper.GetParent(nextRowCell); nextRowCell = (nextRowCell as DataGridCell).PredictFocus(FocusNavigationDirection.Left); nextRowCell = (nextRowCell as DataGridCell).PredictFocus(FocusNavigationDirection.Left); + if (cell.Column.Header.ToString() == "Play") + { + nextRowCell = (nextRowCell as DataGridCell).PredictFocus(FocusNavigationDirection.Left); + + } while ((nextRow != null) && !(nextRow is DataGridRow) && !(nextRow is System.Windows.Controls.Primitives.DataGridColumnHeader)) { nextRow = VisualTreeHelper.GetParent(nextRow); @@ -846,10 +854,10 @@ private void WordsListView_PreviewKeyDown(object sender, KeyEventArgs e) SelectedRowCount = WordsListView.SelectedItems.Count; if (Properties.Settings.Default.CopyFolderWhenSelectingEmptyRow && String.IsNullOrEmpty(((nextRow as DataGridRow).Item as PhraseItem).Folder)) { - if (cell.Column.Header.ToString() != "Play") - { + //if (cell.Column.Header.ToString() != "Play") + //{ nextRowCell = (nextRowCell as DataGridCell).PredictFocus(FocusNavigationDirection.Right); - } + //} int rowselected = PhraseItems.IndexOf(((nextRow as DataGridRow).Item as PhraseItem) as PhraseItem); while (String.IsNullOrEmpty(PhraseItems[rowselected].Folder) && rowselected >= 0) { rowselected--; } // traverse upwards if (rowselected >= 0) diff --git a/Translator/Properties/AssemblyInfo.cs b/Translator/Properties/AssemblyInfo.cs index 8e3fb62..8c72f25 100644 --- a/Translator/Properties/AssemblyInfo.cs +++ b/Translator/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.2.0.2")] -[assembly: AssemblyFileVersion("2.2.0.2")] +[assembly: AssemblyVersion("2.2.0.3")] +[assembly: AssemblyFileVersion("2.2.0.3")]