mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
CURA-5035 Code organization
This commit is contained in:
parent
d4cc4659d8
commit
3c7760b514
2 changed files with 127 additions and 149 deletions
|
@ -47,12 +47,22 @@ Rectangle
|
|||
width: childrenRect.width
|
||||
Button {
|
||||
id: installButton
|
||||
text: catalog.i18nc("@action:button", "Install")
|
||||
text: {
|
||||
if ( manager.isDownloading )
|
||||
{
|
||||
return catalog.i18nc("@action:button", "Cancel")
|
||||
}
|
||||
else
|
||||
{
|
||||
return catalog.i18nc("@action:button", "Install")
|
||||
}
|
||||
}
|
||||
enabled:
|
||||
{
|
||||
if ( manager.isDownloading )
|
||||
{
|
||||
return manager.activePackage == model ? true : false
|
||||
return true
|
||||
// return manager.activePackage == model ? true : false
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -78,7 +88,8 @@ Rectangle
|
|||
onClicked:
|
||||
{
|
||||
console.log( "MODEL", model.download_url )
|
||||
if ( manager.isDownloading && manager.activePackage == model )
|
||||
// if ( manager.isDownloading && manager.activePackage == model )
|
||||
if ( manager.isDownloading )
|
||||
{
|
||||
manager.cancelDownload();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue