The paramount bug

eCAD has Multiple Document Interface (MDI). But its implementation did not engender the unerring working. Working in new documents stemmed up with the loss of scope in former documents. Switching to previous documents made basic functions like enabling/disabling grid inert.

Though the implementation of grid’s enabling has been done lately but the prior deployment had the primary bug. We could draw entities in a new document but this could not be accomplished in the documents created former to the one that is active at the ongoing instant.

Endeavoring through the sundry segmentation faults, we finally resolved this bug today. The implementation was finished decently by setting the pointer of the view class in the sub-window and making this view active. Subsequently, the window and view associated at an instant were appended to a list as a pair. The subWindowActivated() signal on emission was connected to a slot which returned the appropriate pointer of the view.

The actions in the menu bar and addition of script widget and command widget need an analogous connection to the current view in the active sub-window. This is the next thing to be fixed.

Corrected MDI

Today we continued with MDI implementation that we started yesterday and which was not correct. It was exhibiting some inconsistent behavior.

The graphics scene and graphics view are implemented using different classes for each. The MDI implemented seems faithful now, whilst it has no actions connected to it.

The arg() function of QString class is being used to automate the generation of file names whenever a new file is generated. Let me show this:

static int num = 1;
QString fileName = "Document %1".arg(num++);

Now every new file will have a unique name like Document 1, Document 2 and so on. Anything starting with "%" is treated as the variable to be worked upon by arg().