Limit nodes shown as result to search to 100.

This commit is contained in:
Sergio Martínez Portela 2021-10-28 23:50:11 +02:00
parent 37ef32a964
commit d29dac14c3

22
main.py
View File

@ -7,14 +7,26 @@ import time
import webbrowser import webbrowser
from PySide2.QtCore import QObject, QThread, Signal, Slot from PySide2.QtCore import QObject, QThread, Signal, Slot
from PySide2.QtWidgets import (QApplication, QDialog, QFrame, QGroupBox, from PySide2.QtWidgets import (
QHBoxLayout, QLabel, QLineEdit, QProgressBar, QApplication,
QPushButton, QScrollArea, QScroller, QTabBar, QDialog,
QVBoxLayout) QFrame,
QGroupBox,
QHBoxLayout,
QLabel,
QLineEdit,
QProgressBar,
QPushButton,
QScrollArea,
QScroller,
QTabBar,
QVBoxLayout,
)
import doc_manager import doc_manager
DOCS_PATH = os.environ["ORG_PATH"] DOCS_PATH = os.environ["ORG_PATH"]
MAX_SEARCH_NODES = 100
class LoadDoneSignal(QObject): class LoadDoneSignal(QObject):
@ -189,7 +201,7 @@ class Dialog(QDialog):
layout = QVBoxLayout() layout = QVBoxLayout()
for note in notes: for note in notes[:MAX_SEARCH_NODES]:
layout.addWidget(self.build_note_task_widget(note)) layout.addWidget(self.build_note_task_widget(note))
frame = QFrame(self.results) frame = QFrame(self.results)