15 Commits

Author SHA1 Message Date
Jaime van Kessel
6b9cc3f1c7 Use the correct function parameters when removing objects in menu
It turns out that the order of these functions matters. So when we created a
function with only one param, it would actually give it the index. Removing
with the index didn't work, so the object would still be there. The Qt objects
would already be deleted which caused segfaults

CURA-9222
2022-04-28 17:03:41 +02:00
Jaime van Kessel
af712785c8 No longer inject parameters into function handling in qml 2022-03-31 14:16:57 +02:00
Jaime van Kessel
3e4c171603 Simplify the OpenFilesMenu
CURA-8683
2022-01-17 11:09:42 +01:00
Jaime van Kessel
babf3043f8 Use Cura.Menu instead of UM.Menu
Same as the previous commit. Use the specialised variant provided by Cura instead
of the generic one of UM

CURA-8683
2022-01-14 13:50:44 +01:00
Jaime van Kessel
3130ea0f74 Use Cura.MenuItem instead of UM.MenuItem
I didn't realise that Cura already had a menu item. To prevent
Confusion, i've changed Cura.MenuItem to use UM.MenuItem and let all
other menus use Cura.MenuItem
2022-01-14 13:46:05 +01:00
Jaime van Kessel
052898ce21 Switch out the file, view and edit menu for controls 2
CURA-8683
2022-01-10 16:55:28 +01:00
luz paz
d68f375e38 Fix various typos
Found via `codespell -q 3 -S *.po,*.pot -L childs,initialy,lod,ned,te,slicable,sur,tutoriels,wont`
2021-09-07 11:33:54 -04:00
Konstantinos Karmas
504f6dbe70
Revert "Cura 7813 qml modules version bump" 2021-03-30 09:48:28 +02:00
jelle Spijker
2986d50745
Update QtQuick and QtQuick.Controls
CURA-7813
2021-03-29 17:55:19 +02:00
Kostas Karmas
fd3c985440 Fix ambiguous Ctrl+O shortcut not opening the local file dialog
Ctrl+O was assigned as a shortcut in two places:
  1. To the "File->Open File(s)" menu item, which is visible when only the local file
	 provider is enabled (i.e. the DF file provider is disabled)
  2. To the "File->Open File(s)->From Disk" menu item, which is visible when there are
     more than one file providers enabled.

This was creating an ambiguous shortcut, thus never opening the local file dialog.

This is now fixed by disabling the shortcuts when the respective items are not visible.

CURA-7868
2021-01-11 17:50:26 +01:00
Kostas Karmas
96c4d66029 Revert making the open file dialog a separate LocalFileProvider plugin
This reverts commits 00de7497a4c2986cf8fd13be8f598a0f615f3d63 to 5f6b3b52c1848416c98f7d276fe02f08d067f675

CURA-7868
2021-01-07 16:35:40 +01:00
Ghostkeeper
b266904d76
Replace other references to the open action with the file provider model
This adds a function 'triggerFirst' to the file provider that triggers the first file provider in the model. That should then be the local file provider, but if the plug-in is disabled for some reason it would use another plug-in.

Contributes to issue CURA-7868.
2021-01-04 18:12:15 +01:00
Kostas Karmas
e5038ab46d Update year in the copyright comment.
CURA-7868
2021-01-04 15:12:53 +01:00
Kostas Karmas
71994eaaf9 Change the Open File(s) option according to the file providers count
When there is only one file provider (i.e. the local file provider), the Open File(s) will be a
simple item in the File menu.
When there are more than one file providers, the Open File(s) will become a submenu in the File
menu, which will contain all the file providers as submenu items.

CURA-7868
2020-12-23 17:13:14 +01:00
Kostas Karmas
430550452f Add a new file menu option when there are multiple file providers
CURA-7868
2020-12-15 18:31:15 +01:00