Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent checkbox behavior when pressing spacebar #2534

Closed
ghost opened this issue Oct 9, 2018 · 4 comments
Closed

Inconsistent checkbox behavior when pressing spacebar #2534

ghost opened this issue Oct 9, 2018 · 4 comments
Labels
GUI Issues affecting the interactive GUI

Comments

@ghost
Copy link

ghost commented Oct 9, 2018

Background

CKAN Version: v1.25.3

Operating System: Windows (8.1, but looks like others as well)

Problem

When selecting a mod from list, 'Installed' checkbox can be toggled by pressing spacebar. But if 'Installed' checkbox was clicked by mouse, then pressing spacebar toggles it 2 times (first when pressing down, second when releasing).
If there is also 'Update' checkbox available, then:
-If mod was selected by clicking outside 'Update' checkbox, pressing spacebar works as described above
-If mod was selected by clicking 'Update' checkbox, pressing spacebar toggles 'Installed' checkbox and releasing it toggles 'Update' checkbox

clicks
(on the gif I held spacebar for a fraction of second so there is a pause between pressing and releasing)

Probably caused by conflict between whatever toggles 'Installed' checkbox of selected mod when pressing spacebar and OS's toggling of selected checkbox using tab controls (note the dotted border).

@Gryffen1971
Copy link

Gryffen1971 commented Oct 9, 2018

The only time i can get this to happen is when i first start up CKAN and have not clicked on another Mod when i tap the spacebar once.
Once i click on another mod and press the tap the spacebar the check mark does not reappear once it is gone. This was done on Win10-Pro using CKAN v1.25.3

@HebaruSan HebaruSan added the GUI Issues affecting the interactive GUI label Oct 9, 2018
@HebaruSan
Copy link
Member

Here's where we handle this keypress:

CKAN/GUI/MainModList.cs

Lines 327 to 339 in fc0fa20

// Check the key. If it is space and the current row is selected, mark the current mod as selected.
if (key == " ")
{
if (current_row != null && current_row.Selected)
{
var gui_mod = (GUIMod)current_row.Tag;
if (gui_mod.IsInstallable())
MarkModForInstall(gui_mod.Identifier, gui_mod.IsInstallChecked);
}
e.Handled = true;
return;
}

@ghost
Copy link
Author

ghost commented Oct 9, 2018

@Gryffen1971 well, when I launch CKAN and press spacebar without clicking anywhere it doesn't do anything at all (even though one of the mods is selected by default). But there's also no dotted border anywhere (pressing tab and then shift+tab suggests it should be around 'Manage mods' tab above 'Launch KSP' button), so... maybe something to do with newer Windows?

@Gryffen1971
Copy link

Gryffen1971 commented Oct 9, 2018

@HebaruSan @antipin00 Now that is quite possible indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI Issues affecting the interactive GUI
Projects
None yet
Development

No branches or pull requests

2 participants