mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 15:37:27 -06:00
Fix button to open in-Cura Marketplace materials
The button was opening the online Marketplace, which was wrong. This fix changes the behavior to open the in-Cura Marketplace at the materials tab. In order to achieve that, the button calls an action called materialsMarketplace, which in turn is connected through a Connection in the ApplicationMenu. When the action is triggered, it first launched the Toolbox and then it sets its category to the materials tab. Since the callExtensionMethod does not allow us to provide input arguments to the called method, a new method had to be created in the toolbox that changes the view to the materials tab, instead of immediately calling the setViewCategory("material"). CURA-7027
This commit is contained in:
parent
4cb074c5cd
commit
18e5d76990
3 changed files with 14 additions and 1 deletions
|
@ -779,6 +779,9 @@ class Toolbox(QObject, Extension):
|
|||
self._view_category = category
|
||||
self.viewChanged.emit()
|
||||
|
||||
def setViewCategoryToMaterials(self) -> None:
|
||||
self.setViewCategory("material")
|
||||
|
||||
@pyqtProperty(str, fset = setViewCategory, notify = viewChanged)
|
||||
def viewCategory(self) -> str:
|
||||
return self._view_category
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue