Use the new item checker functions instead of equal operator

This commit is contained in:
Veronica Berglyd Olsen
2022-09-11 17:22:46 +02:00
parent 5cba10151a
commit 73b8e3e0fb
8 changed files with 23 additions and 24 deletions
+2 -3
View File
@@ -30,7 +30,6 @@ from PyQt5.QtCore import Qt, pyqtSlot
from PyQt5.QtGui import QFont, QPixmap
from PyQt5.QtWidgets import QWidget, QGridLayout, QLabel
from novelwriter.enum import nwItemType
from novelwriter.constants import trConst, nwLabels
logger = logging.getLogger(__name__)
@@ -247,7 +246,7 @@ class GuiItemDetails(QWidget):
if len(theLabel) > 100:
theLabel = theLabel[:96].rstrip()+" ..."
if nwItem.itemType == nwItemType.FILE:
if nwItem.isFileType():
if nwItem.isExported:
self.labelIcon.setPixmap(self._expCheck)
else:
@@ -284,7 +283,7 @@ class GuiItemDetails(QWidget):
# Counts
# ======
if nwItem.itemType == nwItemType.FILE:
if nwItem.isFileType():
self.cCountData.setText(f"{nwItem.charCount:n}")
self.wCountData.setText(f"{nwItem.wordCount:n}")
self.pCountData.setText(f"{nwItem.paraCount:n}")