#45892: Ruledit: Counters tab Open Date: 2022-10-17 20:20 Last Update: 2023-02-04 20:51 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/45892 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45892 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2023-02-04 20:51 Updated by: lachu Comment: Reply To cazfi - slots for checkpoint and default value do not check if there's a counter selected. Program crashes if one just goes to Counters tab and touches those widgets without selecting a counter - Coding Style of add_widget() and add_widget_next() macros is really bad (I don't particularly like them in general, but they are acceptable) - Still no iteration over behaviors, but assuming there's those specific two ones that exist at the moment - Selecting the behavior should be possible in regular ruledit build, not requiring experimental one -- +void tab_counter::counter_behaviour_selected(int item) +{ + (void) item; - We don't have warnings about unused parameters enabled on any environment, so that "(void) item;" should not be needed. The problem with it is that if we are going to make some special "unused parameters" arrangement in the future, it hides this one -- - Empty line missing after "QVariant item_data;" - Indentation in refresh() off - delete_now() compares 'selected' against 0, not nullptr -- + || pcount->ruledit_disabled) { - Extra space between "||" and "pcount->...", indentation of the line off -- + //QMenu *prepare_counter_button(QToolButton *button, enum tech_req rn); - There's no need to keep this commented-out line at all 0001-OSDN-TICKET-45892-S-awomir-Lach-slawek-lach.art.pl.patch(18KB) Only one problem not repaired I do not see unnecessary space in refresh() . Maybe do you see older patch? --------------------------------------------------------------------- Ticket Status: Reporter: cazfi Owner: (None) Type: Patches Status: Open Priority: 5 - Medium MileStone: 3.2.0 Component: Ruledit and ruleup Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: Ruledit should have tab for counters editing. Initial version can have as little functionality as needed to make it to provide any value at all (likely it's easy to get functionality common to most ruleset objects by simply copying, e.g., extras tab and modify that) Any counters removal functionality (and basically adding too, as that would be unreversable action without ability to remove the counter) depends on #45041 -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/45892 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45892