Selection of Objects when Style Dialog Row is Selected

Whenever any row in Style Dialog is selected, the corresponding objects in the drawing must be selected. This was implemented quickly. First the selection prior to selecting any row is cleared. Next it is made sure that the objects are selected only when the tree column corresponding to selector label is clicked. First column with ‘+’ is avoided because it is used to add objects to selector.

Next _colObj, i.e. the column referring to corresponding objects of the selected row is used to get the objects to be added to selection.

_desktop->selection->add(obj);

obj is the object in the objVec returned by _colObj. Thus objects are added to selection. Besides it is also checked, if the row selected in the Style Dialog is a parent row or a child row. For the former case, its child rows are also iterated and those objects are also added to selection.

Case 1: When parent row is selected and it has children
Screenshot from 2016-07-27 12:58:52

Case 2: When child row is selected
Screenshot from 2016-07-27 12:59:09

There will be another case in selection when matching selector rows should be seleted when objects in the drawing are selected, which will be discussed in next post.

Leave a Reply

Follow

Get notified with the latest posts

Plugin Supporter WordPress Post Navigation
%d bloggers like this: