fixed another tabbing issue where it was possible to reach non existing tab indices,

published version 1.0.0.14
master
Jonas Arnold 3 years ago
parent 005b453130
commit fe200b1a99
  1. 4
      MultiTerm.Wpf/Properties/PublishProfiles/ClickOnceProfile.pubxml
  2. 7
      MultiTerm.Wpf/View/ShellView.xaml.cs

@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
--> -->
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<ApplicationRevision>14</ApplicationRevision> <ApplicationRevision>15</ApplicationRevision>
<ApplicationVersion>1.0.0.*</ApplicationVersion> <ApplicationVersion>1.0.0.*</ApplicationVersion>
<BootstrapperEnabled>True</BootstrapperEnabled> <BootstrapperEnabled>True</BootstrapperEnabled>
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
@ -36,7 +36,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<WebPageFileName>index.html</WebPageFileName> <WebPageFileName>index.html</WebPageFileName>
<ManifestCertificateThumbprint>BC1274DD90DC13A3CE1634A82AC005CDB6852B06</ManifestCertificateThumbprint> <ManifestCertificateThumbprint>BC1274DD90DC13A3CE1634A82AC005CDB6852B06</ManifestCertificateThumbprint>
<ManifestKeyFile>MultiTerm.Wpf_TemporaryKey.pfx</ManifestKeyFile> <ManifestKeyFile>MultiTerm.Wpf_TemporaryKey.pfx</ManifestKeyFile>
<History>True|2023-07-02T09:49:58.8132399Z;True|2023-06-06T21:40:32.7933627+02:00;True|2023-05-31T13:53:55.3496532+02:00;True|2023-05-31T12:15:48.2252015+02:00;</History> <History>True|2023-07-02T13:23:10.2794474Z;True|2023-07-02T11:49:58.8132399+02:00;True|2023-06-06T21:40:32.7933627+02:00;True|2023-05-31T13:53:55.3496532+02:00;True|2023-05-31T12:15:48.2252015+02:00;</History>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<BootstrapperPackage Include="Microsoft.NetCore.DesktopRuntime.6.0.x64"> <BootstrapperPackage Include="Microsoft.NetCore.DesktopRuntime.6.0.x64">

@ -28,6 +28,7 @@ public partial class ShellView : UserControl
if ( e.Key == System.Windows.Input.Key.Tab && if ( e.Key == System.Windows.Input.Key.Tab &&
e.KeyboardDevice.Modifiers == System.Windows.Input.ModifierKeys.Control ) e.KeyboardDevice.Modifiers == System.Windows.Input.ModifierKeys.Control )
{ {
// increment to larger index than existing is handled by tab control
this.terminalTabControl.SelectedIndex++; this.terminalTabControl.SelectedIndex++;
e.Handled = true; e.Handled = true;
} }
@ -35,7 +36,11 @@ public partial class ShellView : UserControl
else if ( e.Key == System.Windows.Input.Key.Tab && else if ( e.Key == System.Windows.Input.Key.Tab &&
e.KeyboardDevice.Modifiers == (System.Windows.Input.ModifierKeys.Control | System.Windows.Input.ModifierKeys.Shift) ) e.KeyboardDevice.Modifiers == (System.Windows.Input.ModifierKeys.Control | System.Windows.Input.ModifierKeys.Shift) )
{ {
this.terminalTabControl.SelectedIndex--; // only move backwards if the resulting index is >= 0
if(this.terminalTabControl.SelectedIndex > 0)
{
this.terminalTabControl.SelectedIndex--;
}
e.Handled = true; e.Handled = true;
} }
} }

Loading…
Cancel
Save