Skip to content

Conversation

@macevhicz
Copy link
Contributor

Checklist

  • I have read the CONTRIBUTING.md document
  • I formatted my changes with black
  • I linted my changes with flake8
  • I have added documentation regarding my changes where necessary
  • Any pre-existing tests continue to pass
  • Additional tests were made covering my changes

Types of Changes

  • Bugfix (change that fixes an issue)
  • New Feature (change that adds functionality)
  • Documentation Update (if none of the other choices apply)

Proposed Changes

Overhaul workbox tabs

  • Supporting linking files
  • Support backing up workbox files, with ability to scroll forward and
    backward thru previous versions. Only workboxes / prefs with changes
    are saved
  • Colorize tabs indicating state (with toolTips)
  • Support auto-sync between multiple instances of PrEditor in same core
  • Support updating prefs args / values based on json file
  • Enforce unique tab names

Fonts

  • Support resizing gui font
  • Support dialogs opening with same font as PrEditor

@macevhicz macevhicz marked this pull request as draft October 22, 2025 01:56
@macevhicz macevhicz force-pushed the markm/general_updates5 branch 4 times, most recently from be49d6f to 5d8c2f2 Compare October 23, 2025 00:28
@MHendricks
Copy link
Member

Note: This pull request will migrate prefs to a new format that is not backwards compatible with old prefs. Moving forward to new prefs just works but if you wanted to revert to an older version of PrEditor you can loose new code changes. Do we want to do anything special with when this code is released? Major version upgrade or skip a few minor versions, something else?

@macevhicz @tbttfox

Copy link
Member

@MHendricks MHendricks left a comment

Choose a reason for hiding this comment

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

Updated: I've finished this pass of review.

I haven't finished looking at all of this. I have these files remaining to look at.

  • preditor/gui/workbox_mixin.py
  • preditor/gui/workboxwidget.py
  • preditor/prefs.py

@macevhicz macevhicz force-pushed the markm/general_updates5 branch from 5d8c2f2 to 8781a28 Compare October 27, 2025 19:09
Comment on lines 19 to 25
def __init__(
self, parent=None, console=None, delayable_engine='default', core_name=None
self,
parent=None,
console=None,
workbox_id=None,
filename=None,
backup_file=None,
tempfile=None,
delayable_engine='default',
core_name=None,
Copy link
Member

Choose a reason for hiding this comment

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

Please make sure your changes are compatible with the WorkboxTextEdit widget when using the editor class TextEdit. Currently switching to that can soft lock PrEditor and has caused me to loose my workbox tabs(Luckily,I had a paranoid manual backup for just this event so I didn't loose things.)

I'm getting errors like this and attempting to fix that caused others.

Traceback (most recent call last):
  File "C:\blur\dev\preditor\preditor\gui\drag_tab_bar.py", line 202, in paintEvent
    color, toolTip = self.get_color_and_tooltip(index)
  File "C:\blur\dev\preditor\preditor\gui\drag_tab_bar.py", line 171, in get_color_and_tooltip
    workbox_id = widget.__workbox_id__()
  File "C:\blur\dev\preditor\preditor\gui\workbox_mixin.py", line 538, in __workbox_id__
    return self._workbox_id
AttributeError: 'WorkboxTextEdit' object has no attribute '_workbox_id'
QBackingStore::endPaint() called with active painter; did you forget to destroy it or call QPainter::end() on it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I did a pretty significant refactor of the workbox inheritence, and corrected some earlier deficiencies. WorkboxTextEdit should be fully supported for the new workbox_id-based operation, including linking files, updating externally linked files, etc.

@macevhicz macevhicz force-pushed the markm/general_updates5 branch 5 times, most recently from fed598b to f394369 Compare October 29, 2025 18:14
@macevhicz macevhicz force-pushed the markm/general_updates5 branch 4 times, most recently from 1a5d933 to 94a4157 Compare November 4, 2025 03:36
- Supporting linking files
- Support backing up workbox files, with ability to scroll forward and
  backward thru previous versions. Only workboxes / prefs with changes
  are saved
- Colorize tabs indicating state (with toolTips)
- Support auto-sync between multiple instances of PrEditor in same core
- Support updating prefs args / values based on json file
- Enforce unique tab names
- Uniform font / gui font keyboard modifiers
- Remove QRegExp (deprecated, QRegularExpression not supported byQt.py)
- Identifier classes now subclass py3 enums
- update attr check name
- Add copy filename context menu item
- Better linked file comparisons by with `pathlib.Path` instances (ie
  remove `as_posix()`
- Cleanup doc strings
@macevhicz macevhicz force-pushed the markm/general_updates5 branch from 94a4157 to 34d9a08 Compare November 4, 2025 16:54
- Don't set a workboxes tab_widget, always get it dynamically
- Handle Reload messageboxes better
@macevhicz macevhicz force-pushed the markm/general_updates5 branch from 55ce0b8 to 4ac7f8e Compare November 5, 2025 01:02
@MHendricks MHendricks changed the base branch from main to main2.0 November 7, 2025 20:02
@MHendricks
Copy link
Member

Note: This pull request will migrate prefs to a new format that is not backwards compatible with old prefs. Moving forward to new prefs just works but if you wanted to revert to an older version of PrEditor you can loose new code changes. Do we want to do anything special with when this code is released? Major version upgrade or skip a few minor versions, something else?

@macevhicz @tbttfox

I've changed the base from main to main2.0 as this is the first PR of the 2.0 release. We have at least two more PR's after this that will go into the 2.0 release. This PR is a significant change to the prefs system so we want to have a distinction between them.

@macevhicz macevhicz force-pushed the markm/general_updates5 branch 3 times, most recently from d1dd731 to 93eab54 Compare November 8, 2025 00:19
@macevhicz macevhicz force-pushed the markm/general_updates5 branch from 93eab54 to ecc5527 Compare November 8, 2025 00:42
Running in Houdini, the tab bar draws poorly, so remove overriding
paintEvent, and instead use setTabTextColor and setTabTextToolTip. This
means updating colors must be triggered, it doesn't come for free as in
paintEvent.
- Simplify Options and Preferences layouts
- Add Prompt on Linked File Change option (you will get visual clues
    even if this is turned off)
- Better handling of deleted / renamed linked files
- Handful of other small fixes
@macevhicz macevhicz force-pushed the markm/general_updates5 branch from ecc5527 to 1451c1c Compare November 8, 2025 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants