Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added instructions on current progress and total number of items. #1470

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

windwhim
Copy link

Added instructions on current progress and total number of items.

Added instructions on current progress and total number of items.
Fixed a bug where the total number of items was 1 when opened a folder.
@maplelost
Copy link

Wonderful idea! But you don't need to add an extra self.filenames to record the inde of the file you can just use the pyqt api.
Like:

    def setClean(self):
        self.dirty = False
        self.actions.save.setEnabled(False)
        self.actions.createMode.setEnabled(True)
        self.actions.createRectangleMode.setEnabled(True)
        self.actions.createCircleMode.setEnabled(True)
        self.actions.createLineMode.setEnabled(True)
        self.actions.createPointMode.setEnabled(True)
        self.actions.createLineStripMode.setEnabled(True)
        self.actions.createAiPolygonMode.setEnabled(True)
        self.actions.createAiMaskMode.setEnabled(True)
        title = __appname__
        if self.filename is not None:
            # extra 添加文件进度
            file_index = self.fileListWidget.currentRow()
            title = f"{title} - {self.filename} ({file_index + 1}/{self.fileListWidget.count()})"
            # extra end
        self.setWindowTitle(title)

        if self.hasLabelFile():
            self.actions.deleteFile.setEnabled(True)
        else:
            self.actions.deleteFile.setEnabled(False)

@windwhim
Copy link
Author

这样代码更加优雅了

Use a better way to display progress, but when opening an image, it will display 0/0.
@windwhim windwhim changed the title Update app.py Added instructions on current progress and total number of items. Sep 28, 2024
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