View Issue Details

IDProjectCategoryView StatusLast Update
0002485FreeCADBugpublic2019-01-13 11:13
Reportermandeep7 Assigned Tomandeep7  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSArch Linux 4.4.5-1OS Versionx86_64
Summary0002485: Checkboxes "Line numbers" and "Folding" in editor preferences, not working
Description
While creating a new macro or editing an existing one, an editor to write code for the macro opens. It already has the line numbers and the current line highlighted.

Then I go to Edit -> Preferences -> Editor -> Options -> "Untick", Enable line numbers -> Apply -> OK. But it won't disable the line numbers from the editor.
Steps To Reproduce1. Open FreeCAD.
2. Press the "Macro" button from the menu.
3. Then in the submenu, click on "Macros ..." button.
4. Click on "Create", Enter any name and press OK. (or one may also edit the existing macro).
5. This will open the macro editor.
6. Now click on the Edit -> Preferences -> Editor from the menu.
7. Untick the Enable line numbers.

It was supposed to disable the line numbers by doing the above steps. Similar is the case for the "Folding" checkbox.
Additional InformationArch Linux
Qt 5.5.1
Tagsmacros
FreeCAD Information

Relationships

related to 0000573 new Macro editing FCMacro file - 4 improvements 

Activities

yorik

2016-03-30 21:07

administrator   ~0006937

Indeed these two features don't seem to be enabled. Do you want to work on this Mandeep?

mandeep7

2016-03-31 16:14

developer   ~0006939

Yes, I am working on it. You may assign me this.
I already added a note, yesterday. Don't know why it wasn't appeared here.

mandeep7

2016-04-19 19:38

developer   ~0006991

Done. https://github.com/FreeCAD/FreeCAD/pull/142

yorik

2016-04-26 22:48

administrator   ~0007008

I updated your status on this tracker to "developer" Mandeep (this will be useful for the GSOC ;) ) so you can now attribute issues to yourself and close them. I don't know if you wish to work further on this so I let you close it.

mandeep7

2016-04-27 15:37

developer   ~0007012

Thanks. The line number one has been fixed (as of now). As I already discussed with stefan and werner, about the folding one. It's not yet implemented yet and is a redundant option (from old code). And needs much work to do. As it will be a complete rework, it was suggested to look for compatible editors that can be used or just to comment out the code for this option (as for now).

wmayer

2016-04-28 10:46

administrator   ~0007013

The Python IDE Spyder has a nice editor which is under the MIT license.

So, what we could try is that when Spyder is found on the system then its editor will be used (not sure how difficult this is to do). If it's not there we can fall back to our editor.

Alternatively, we can also extract the relevant code from Spyder and copy it to FreeCAD. But we should only do this if it's not more than a few files. If we needed to copy dozens of files from Spyder then we shouldn't follow this approach.

On the other hand we could still try to improve our editor. What it least needs is:
* folding
* search function

yorik

2016-04-28 13:17

administrator   ~0007014

We could also simply add a preferences setting, where the user can specify (the path to) his own favorite editor. This could be really simple...

mandeep7

2016-04-28 23:33

developer   ~0007025

Yorik, you mean having both Spyder and the one we already have?

yorik

2016-04-29 00:55

administrator   ~0007026

Yes. I mean have a checkbox in the preferences that says "edit macros in external editor" and an input field where you can set the path to your favorite editor. This would allow one to use a full editor with all the whistles and bells.

But I also think like Werner, we also need to add a couple of things in our own editor.

mandeep7

2016-04-29 00:59

developer   ~0007027

Okay, will discuss with you later today (IRC). Now need a little nap.

Kunda1

2017-01-10 15:08

administrator   ~0007600

bump @mandeep7
going through the bugtracker and ascertaining the status of tickets. please advise the status, thanks!

Issue History

Date Modified Username Field Change
2016-03-30 17:20 mandeep7 New Issue
2016-03-30 17:27 mandeep7 Tag Attached: macros
2016-03-30 17:27 mandeep7 Tag Attached: editor preferences
2016-03-30 17:27 mandeep7 Tag Attached: folding
2016-03-30 17:27 mandeep7 Tag Attached: line numbers
2016-03-30 21:07 yorik Note Added: 0006937
2016-03-31 16:14 mandeep7 Note Added: 0006939
2016-04-19 19:38 mandeep7 Note Added: 0006991
2016-04-26 22:48 yorik Note Added: 0007008
2016-04-26 22:48 yorik Assigned To => mandeep7
2016-04-26 22:48 yorik Status new => assigned
2016-04-27 15:37 mandeep7 Note Added: 0007012
2016-04-28 10:46 wmayer Note Added: 0007013
2016-04-28 13:17 yorik Note Added: 0007014
2016-04-28 23:33 mandeep7 Note Added: 0007025
2016-04-29 00:55 yorik Note Added: 0007026
2016-04-29 00:59 mandeep7 Note Added: 0007027
2017-01-10 15:08 Kunda1 Note Added: 0007600
2017-01-10 15:18 mandeep7 Status assigned => closed
2017-01-10 15:18 mandeep7 Resolution open => fixed
2017-02-02 14:12 Kunda1 Relationship added related to 0000573
2018-12-24 12:48 Kunda1 Tag Detached: line numbers
2018-12-24 12:49 Kunda1 Tag Detached: folding
2019-01-13 11:13 Kunda1 Tag Detached: editor preferences