Skip to content

Commit

Permalink
Fix compatibility with Cura 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
fieldOfView committed Dec 22, 2023
1 parent a70ec1c commit 75936eb
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions SidebarIncompatibleVersion.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@
import os.path
import json

from PyQt6.QtCore import QUrl
from PyQt6.QtGui import QDesktopServices
try:
from cura.ApplicationMetadata import CuraSDKVersion
except ImportError: # Cura <= 3.6
CuraSDKVersion = "6.0.0"
if CuraSDKVersion >= "8.0.0":
from PyQt6.QtCore import QUrl
from PyQt6.QtGui import QDesktopServices
else:
from PyQt5.QtCore import QUrl
from PyQt5.QtGui import QDesktopServices

from cura.CuraApplication import CuraApplication
from UM.Extension import Extension
Expand All @@ -14,7 +22,7 @@

from UM.i18n import i18nCatalog

i18n_catalog = i18nCatalog("octoprint")
i18n_catalog = i18nCatalog("cura")


class SidebarIncompatibleVersion(Extension):
Expand Down

0 comments on commit 75936eb

Please sign in to comment.