Skip to content

Added "Tileset > Edit Tileset Image Parameters..." action #4034

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

Merged
merged 1 commit into from
Apr 9, 2025

Conversation

bjorn
Copy link
Member

@bjorn bjorn commented Aug 15, 2024

This makes the functionality easier to discover. Previously editing the tileset image parameters was only possible by clicking the value of the Image property in the Properties view, and then the appearing "Edit" button.

@bjorn bjorn added the usability Generally about making something more intuitive or efficient. label Aug 15, 2024
@bjorn
Copy link
Member Author

bjorn commented Aug 15, 2024

@CodiumAI-Agent /review

(just curious what feedback it might have)

@CodiumAI-Agent
Copy link

CodiumAI-Agent commented Aug 15, 2024

PR Reviewer Guide 🔍

(Review updated until commit c8a7cda)

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Update Consistency

The new action for editing tileset parameters is integrated using updateActions instead of the former updateAddRemoveActions. Please verify that all UI state changes (such as enabling/disabling actions) are consistently applied in all contexts where the state update is needed.

    updateActions();
}
Default Initialization

The TilesetParameters struct now includes a default constructor and default initializers for tileSpacing and margin. Confirm that these default values are appropriate across all usages and do not unintentionally affect behavior when comparing parameter changes.

    TilesetParameters() = default;

    explicit TilesetParameters(const Tileset &tileset);

    bool operator != (const TilesetParameters &other) const;

    QUrl imageSource;
    QColor transparentColor;
    QSize tileSize;
    int tileSpacing = 0;
    int margin = 0;
};

@bjorn
Copy link
Member Author

bjorn commented Aug 15, 2024

Oh well, the agent failed to understand a line was added to a function rather than a "duplicate" being added. For a moment I thought it might have caught the duplication between TilesetEditor::editTilesetParameters and TilesetParametersEdit::buttonClicked, but no, I think the latter was likely not in the context.

@bjorn bjorn force-pushed the edit-tileset-parameters branch 2 times, most recently from 6cbab90 to ff8289c Compare August 15, 2024 11:53
@bjorn bjorn force-pushed the edit-tileset-parameters branch from ff8289c to 8f0e937 Compare September 12, 2024 09:58
This makes the functionality easier to discover. Previously editing the
tileset image parameters was only possible by clicking the value of the
Image property in the Properties view, and then the appearing "Edit"
button.
@bjorn bjorn force-pushed the edit-tileset-parameters branch from 8f0e937 to c8a7cda Compare January 12, 2025 14:54
@bjorn bjorn requested a review from Copilot April 9, 2025 14:09
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

src/tiled/tileseteditor.h:95

  • [nitpick] Consider renaming 'editTilesetParametersAction' (and related functions) to 'editTilesetImageParametersAction' for consistency with the UI label 'Edit Tileset Image Parameters...'.
QAction *editTilesetParametersAction() const;

@bjorn bjorn merged commit add877d into mapeditor:master Apr 9, 2025
16 checks passed
@bjorn bjorn deleted the edit-tileset-parameters branch April 9, 2025 14:12
@CodiumAI-Agent
Copy link

Persistent review updated to latest commit c8a7cda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usability Generally about making something more intuitive or efficient.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants