Thursday, January 2, 2014

Main Window – Status Bar Ready Flag

In the main window class there was a flag indicating when the status bar was ready to accept the signal from the edit box for when the cursor was moved.  The line and columns numbers in the status bar along with the message are updated when this signal is received.

The status bar ready flag was needed in the program load routine to prevent the "Program loaded" message was being displayed during the initial loading of a program at startup because the status bar was not created yet.  The status bar was created after the edit box instance and the program was loaded.  The edit box instance needed to be created first since that is where the program was loaded to, and the status bar create routine made the connection from the edit box cursor changed signal to the state bar create slot.

The main window constructor was modified to create the status bar first.  The connection of the signal was moved from the status bar create routine to after where the other edit box to main window signal/slot connections are made.  This eliminated the need for the status bar ready flag and it was removed.

[commit ac678921b3]

No comments:

Post a Comment

All comments and feedback welcomed, whether positive or negative.
(Anonymous comments are allowed, but comments with URL links or unrelated comments will be removed.)