Compare commits

...

3 Commits

Author SHA1 Message Date
emoose
22d66d0aeb Revert "skip profile-scan if CSN-only"
Launch time improvement was only very minor, and caused modified profiles not to be loaded.
2026-01-19 01:29:30 +00:00
emoose
ceddf3d4ef Only search by exe name if entered profile name doesn't exist
This was meant to be happening automatically, but seems WinForms also decides
to send a KeyUp event with e.KeyCode == Keys.Enter when the user clicks an existing item (?)
2026-01-19 01:25:31 +00:00
emoose
f6d879f737 Show settings before profile-scan is complete
The old combobox code let the settings get displayed early but the combobox change had stopped that
2026-01-17 22:07:52 +00:00

View File

@@ -643,6 +643,7 @@ namespace nspector
LoadSettings();
RefreshProfilesCombo();
RefreshCurrentProfile();
cbProfiles.Text = GetBaseProfileName();
tsbBitValueEditor.Enabled = false;
@@ -765,18 +766,20 @@ namespace nspector
if (e.KeyCode == Keys.Enter)
{
// KeyUp event is only fired when combobox item doesn't exist with the entered text
// Try searching for text as an exe/application name
try
// Search by exe name if the text isn't already a valid profile name
if (!_profileNames.Contains(cbProfiles.Text))
{
var profile = _drs.GetProfileNameByExeName(cbProfiles.Text);
if (!string.IsNullOrEmpty(profile))
try
{
cbProfiles.Text = profile;
ChangeCurrentProfile(profile);
var profile = _drs.GetProfileNameByExeName(cbProfiles.Text);
if (!string.IsNullOrEmpty(profile))
{
cbProfiles.Text = profile;
ChangeCurrentProfile(profile);
}
}
catch { }
}
catch { }
}
}
@@ -841,11 +844,12 @@ namespace nspector
private async Task ScanProfilesSilentAsync(bool scanPredefined, bool showProfileDialog)
{
if (_skipScan || _settings.ShowCustomizedSettingNamesOnly)
if (_skipScan)
{
if (scanPredefined)
if (scanPredefined && !_alreadyScannedForPredefinedSettings)
{
_alreadyScannedForPredefinedSettings = true;
_meta.ResetMetaCache();
tsbModifiedProfiles.Enabled = true;
exportUserdefinedProfilesToolStripMenuItem.Enabled = false;
@@ -896,13 +900,8 @@ namespace nspector
tsbRefreshProfile.Enabled = true;
}
private async void cbCustomSettingsOnly_CheckedChanged(object sender, EventArgs e)
private void cbCustomSettingsOnly_CheckedChanged(object sender, EventArgs e)
{
_settings.ShowCustomizedSettingNamesOnly = tscbShowCustomSettingNamesOnly.Checked;
if (!tscbShowCustomSettingNamesOnly.Checked && !_alreadyScannedForPredefinedSettings)
{
await ScanProfilesSilentAsync(true, false);
}
RefreshCurrentProfile();
}