Skip to content
Snippets Groups Projects

silx does not build on python 3.6

Merged Wout De Nolf requested to merge py3.6 into main
2 files
+ 28
13
Compare changes
  • Side-by-side
  • Inline
Files
2
import os
import time
import logging
from AnyQt.QtCore import Qt
@@ -15,6 +16,11 @@ if ORANGE_VERSION == ORANGE_VERSION.oasys_fork:
def show_scheme_properties_for(self, scheme, window_title=None):
return QDialog.Accepted
try:
from oasys.canvas.mainwindow import MainWindowRegistry
except ImportError:
MainWindowRegistry = None
else:
from orangecanvas.registry import set_global_registry
from orangecanvas.registry.qt import QtWidgetRegistry
@@ -79,6 +85,15 @@ class OrangeCanvasHandler:
canvas = MainWindow()
canvas.setAttribute(Qt.WA_DeleteOnClose)
canvas.set_widget_registry(widget_registry) # makes a copy of the registry
if (
ORANGE_VERSION == ORANGE_VERSION.oasys_fork
and MainWindowRegistry is not None
):
MainWindowRegistry.Instance().register_instance(
instance=canvas, application_name=str(os.getpid())
) # need it for finding the canvas from the widgets
self.canvas = canvas
self.process_events()
Loading