Skip to content

Commit

Permalink
Update main_widgets.py (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
th3w1zard1 authored Mar 13, 2024
1 parent 7a4d130 commit c164c63
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Tools/HolocronToolset/src/toolset/gui/widgets/main_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from typing import TYPE_CHECKING

from PyQt5 import QtCore
from PyQt5.QtCore import QPoint, QSortFilterProxyModel, QThread, QTimer
from PyQt5.QtCore import QPoint, QSortFilterProxyModel, QThread, QTimer, Qt
from PyQt5.QtGui import QIcon, QImage, QPixmap, QStandardItem, QStandardItemModel, QTransform
from PyQt5.QtWidgets import QHeaderView, QMenu, QWidget

Expand Down Expand Up @@ -311,6 +311,7 @@ def __init__(self, parent: QWidget):

self.texturesModel = QStandardItemModel()
self.texturesProxyModel = QSortFilterProxyModel()
self.texturesProxyModel.setFilterCaseSensitivity(Qt.CaseInsensitive)
self.texturesProxyModel.setSourceModel(self.texturesModel)
self.ui.resourceList.setModel(self.texturesProxyModel)

Expand Down Expand Up @@ -427,7 +428,7 @@ def scan(self):
sleep(0.1)

def onFilterStringUpdated(self):
self.texturesProxyModel.setFilterFixedString(self.ui.searchEdit.text().casefold())
self.texturesProxyModel.setFilterFixedString(self.ui.searchEdit.text())

def onSectionChanged(self):
self.sectionChanged.emit(self.ui.sectionCombo.currentData(QtCore.Qt.UserRole))
Expand Down

0 comments on commit c164c63

Please sign in to comment.