mirror of
https://github.com/TagStudioDev/TagStudio.git
synced 2026-02-01 07:39:10 +00:00
Fix text and RAW image handling
- Fix RAW images not being loaded correctly in the preview panel - Fix trying to read size data from null images - Refactor `os.stat` to `<Path object>.stat()` - Remove unnecessary upper/lower conversions - Improve encoding compatibility beyond UTF-8 when reading text files - Code cleanup
This commit is contained in:
@@ -207,4 +207,4 @@ TAG_COLORS = [
|
||||
]
|
||||
|
||||
TAG_FAVORITE = 1
|
||||
TAG_ARCHIVED = 0
|
||||
TAG_ARCHIVED = 0
|
||||
@@ -569,6 +569,7 @@ class PreviewPanel(QWidget):
|
||||
font = ImageFont.truetype(filepath)
|
||||
self.dimensions_label.setText(
|
||||
f"{filepath.suffix.upper()[1:]} • {format_size(filepath.stat().st_size)}\n{font.getname()[0]} ({font.getname()[1]}) "
|
||||
|
||||
)
|
||||
else:
|
||||
self.dimensions_label.setText(
|
||||
@@ -784,7 +785,7 @@ class PreviewPanel(QWidget):
|
||||
"""
|
||||
if self.is_connected:
|
||||
self.tags_updated.disconnect()
|
||||
|
||||
|
||||
logging.info("[UPDATE CONTAINER] Setting tags updated slot")
|
||||
self.tags_updated.connect(slot)
|
||||
self.is_connected = True
|
||||
|
||||
Reference in New Issue
Block a user