View Issue Details

IDProjectCategoryView StatusLast Update
0000477FreeCADFeaturepublic2021-02-06 06:49
Reporterwmayer Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status acknowledgedResolutionopen 
Target Version0.20 
Summary0000477: Proper interface for edit modes of view provider
Descriptionhttp://forum.freecadweb.org/viewtopic.php?f=10&t=1875&p=12429#p12429
TagsNo tags attached.
FreeCAD Information

Relationships

related to 0001954 assignedwmayer Set colors doesn't work on objects that have edit mode reimplemented 

Activities

Jriegel

2011-11-21 09:13

administrator   ~0001337

Really needed!

wmayer

2015-03-31 08:38

administrator   ~0005958

There is a new class ActionFunction which allows you to connect a QAction with a standard C++ member function of a class that is not inherited from QObject.

So, this makes it quite easy to use with the view providers. There is an example for MeshGui::ViewProvider.

In the setupContextMenu method you get a pointer to a QMenu instance where you can add further items with addAction. The returned QAction instance then can be connected with a member function of the view provider using the ActionFunction class.

Since you can use arbitrary member functions (but the argument and return type must be void) this solution can be considered as an alternative to the setEdit function.

wmayer

2017-03-20 13:52

administrator   ~0008659

See also: https://forum.freecadweb.org/viewtopic.php?f=22&t=21330

Kunda1

2017-06-30 12:14

administrator   ~0009622

Also see wmayer's comment 0001954:0007874

Kunda1

2018-06-13 13:25

administrator   ~0011421

Unassigning Jriegel

yorik

2022-03-03 13:55

administrator   ~0016381

This ticket has been migrated to GitHub as issue 5546.

Related Changesets

FreeCAD: master 9ce46db8

2015-03-31 01:02:16

wmayer

Details Diff
+ extend ActionFunction and use in mesh view provider Affected Issues
0000477
mod - src/Gui/ActionFunction.cpp Diff File
mod - src/Gui/ActionFunction.h Diff File
mod - src/Mod/Mesh/Gui/ViewProvider.cpp Diff File
mod - src/Mod/Mesh/Gui/ViewProvider.h Diff File

FreeCAD: master 048da480

2020-10-05 01:03:31

vocx-fc


Committer: wmayer Details Diff
Part: activate Part_ColorPerFace in the menu and toolbar

According to the source this command was deactivated until issue 0000477
and hence 0001954 could be solved. However, since those issues
haven't been addressed the command has remained hidden for a long time.
This command does not work with objects that reimplement
their edit modes, meaning that it may work with Part and PartDesign
created objects but not with Draft and Arch objects.

The command is added to the standard `View` menu,
and to one `Part tools` toolbar so that it is no longer hidden.
The limitations of the command can be described in the documentation,
and then somebody else can help solve the problem
with the edit modes.

A new icon for the command is also provided.
Affected Issues
0000477
mod - src/Mod/Part/Gui/Command.cpp Diff File
mod - src/Mod/Part/Gui/Resources/Part.qrc Diff File
add - src/Mod/Part/Gui/Resources/icons/tools/Part_ColorFace.svg Diff File
mod - src/Mod/Part/Gui/Workbench.cpp Diff File

Issue History

Date Modified Username Field Change
2011-11-10 15:28 wmayer New Issue
2011-11-10 18:01 wmayer Target Version => 0.13
2011-11-21 09:13 Jriegel Note Added: 0001337
2011-11-21 09:13 Jriegel Assigned To => Jriegel
2011-11-21 09:13 Jriegel Status new => acknowledged
2012-11-13 20:24 Jriegel Target Version 0.13 => 0.14
2014-06-25 12:09 wmayer Target Version 0.14 => 0.15
2014-12-31 19:37 normandc Description Updated
2015-01-25 16:14 yorik Target Version 0.15 =>
2015-03-31 08:20 wmayer Changeset attached => FreeCAD Master master 9ce46db8
2015-03-31 08:38 wmayer Note Added: 0005958
2017-01-19 12:20 wmayer Relationship added related to 0001954
2017-03-20 13:52 wmayer Note Added: 0008659
2017-06-30 12:14 Kunda1 Note Added: 0009622
2018-06-13 13:25 Kunda1 Assigned To Jriegel =>
2018-06-13 13:25 Kunda1 Note Added: 0011421
2020-10-13 12:30 wmayer Changeset attached => FreeCAD master 048da480
2021-02-06 06:49 abdullah Target Version => 0.20