Skip to content

Conversation

@TimGroeneboom
Copy link
Contributor

@TimGroeneboom TimGroeneboom commented Jan 29, 2026

Problem observed :

  • The editor for double behave differently than float editor in Napkin, not allowing for more then 2 decimals and they show up with arrows, see video below
double_editor_bug.mp4

Proposed fix:

  • Just like with enum types & combo boxes, check for the type and create a custom editor that behaves the same as a floating point editor, see video below
double_editor_fix.mp4

@TimGroeneboom TimGroeneboom added bug Something isn't working napkin Napkin related Questions & Issues labels Jan 29, 2026
@TimGroeneboom TimGroeneboom requested a review from Copilot January 29, 2026 13:54
Copy link
Contributor

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.

Pull request overview

This PR adjusts Napkin’s property editor so that double-typed properties use a text-based editor with a double validator instead of the default spinbox behavior (limited decimals and arrow buttons).

Changes:

  • Extend PropertyValueItemDelegate::createEditor to detect double properties via RTTI and create a QLineEdit with QDoubleValidator and strong focus instead of the default editor.
  • Leave existing enum handling and default delegate behavior unchanged for other types.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working napkin Napkin related Questions & Issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants