#4231: [Screen] Apply button is always active (easy) ----------------------------------+---------------------------- Reporter: diver | Owner: axeld Type: bug | Status: new Priority: normal | Milestone: R1 Component: Preferences/Screen | Version: R1/Development Resolution: | Keywords: GCI2011 Blocked By: | Blocking: Has a Patch: 1 | Platform: All ----------------------------------+---------------------------- Comment (by pulkomandy): Yes, sounds like the right way to go. Just a small change: {{{count_workspaces()}}} is not a cheap call (it asks the app_server for the workspace layout), so it should be called only once. Either make the loop go backwards, or (probably simpler) store the count in a variable and use that as the loop bound. {{{ const int32 workspaceCount = count_workspaces(); for (int32 i = 0; i < workspaceCount; i++) { ... }}} -- Ticket URL: <https://dev.haiku-os.org/ticket/4231#comment:15> Haiku <https://dev.haiku-os.org> Haiku - the operating system.