|
|
@ -2,7 +2,7 @@ from functools import partial |
|
|
|
|
|
|
|
|
|
|
|
from PyQt5.QtCore import Qt |
|
|
|
from PyQt5.QtCore import Qt |
|
|
|
from PyQt5.QtGui import QCursor |
|
|
|
from PyQt5.QtGui import QCursor |
|
|
|
from PyQt5.QtWidgets import QFileDialog, QInputDialog, QMainWindow |
|
|
|
from PyQt5.QtWidgets import QErrorMessage, QFileDialog, QInputDialog, QMainWindow |
|
|
|
|
|
|
|
|
|
|
|
from clusterview2.exceptions import handle_exceptions |
|
|
|
from clusterview2.exceptions import handle_exceptions |
|
|
|
from clusterview2.colors import Color |
|
|
|
from clusterview2.colors import Color |
|
|
@ -167,6 +167,12 @@ class MainWindow(QMainWindow, Ui_MainWindow): |
|
|
|
self.opengl_widget.update() |
|
|
|
self.opengl_widget.update() |
|
|
|
|
|
|
|
|
|
|
|
def _clustering(self): |
|
|
|
def _clustering(self): |
|
|
|
|
|
|
|
if len(list(PointManager.point_set.points)) == 0: |
|
|
|
|
|
|
|
error_dialog = QErrorMessage() |
|
|
|
|
|
|
|
error_dialog.showMessage('Place points before clustering.') |
|
|
|
|
|
|
|
error_dialog.exec_() |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
|
|
clear_selection() |
|
|
|
clear_selection() |
|
|
|
self._mode = Mode.CLUSTERING |
|
|
|
self._mode = Mode.CLUSTERING |
|
|
|
self.opengl_widget.setCursor(QCursor(Qt.CursorShape.ArrowCursor)) |
|
|
|
self.opengl_widget.setCursor(QCursor(Qt.CursorShape.ArrowCursor)) |
|
|
|