Emerald Editor Discussion
September 24, 2017, 03:06:50 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
   Home   Help Search Login Register  
Pages: [1]
Author Topic: slow to open  (Read 3604 times)
0 Members and 1 Guest are viewing this topic.
Posts: 16

« on: May 27, 2010, 08:48:26 am »

I have the program set to reopen the last files I had open when I closed the program.

when I start up the program, or open a file, it is very slow to open it.

starting up the program I see a lot of blinking and window flashing and I wonder if a lot of that redrawing is really all that necessary to get started.  all my windows are maximized.
if one of the windows is maximized, they are all maximized.

1. first it takes 1 seconds to open up a tab window in sdi mode, NOT maximized.
2. then it maximizes the window.
3. then it moves on to the next file, if any.

so before redrawing the windows twice, enumerate the list of file attributes/settings and do this:
/* detect if any windows are maximized
    and if so, maximize them all */
#include <iterator>
#include <vector>
vector<class ConfigWindow> vConfigWindows;
vector<class TabWindow> vTabWindows;
vector<class ConfigWindow>::iterator iConfigWindow;
vector<class TabWindow>::iterator iTabWindow;
bool areWindowsMaximized = false;
for (iConfigWindow =  vConfigWindows.begin();
      iConfigWindow != vConfigWindows.end();
      iConfigWindow++) {
    if (iConfigWindow->isConfigMaximized()) {
        areWindowsMaximized = true;
for (iTabWindow = vTabWindows.begin();
      iTabWindow != vTabWindows.end();
      iTabWindow++) {
    if (areWindowsMaximized) {
    } else {

//the following replacement code for the above loops
//may be even better, but I am not sure of the effect on the tabs
//when restoring other tabs than the one in question.
//this uses an all-encompassing class that handles both
//configuration and window management.  there may be
//a better way to do this, but this is quick and dirty algorithm.
vector<class TabConfigWindow> vTabConfigWindows;
vector<class TabConfigWindow>::iterator iTabConfigWindow;
for (iTabConfigWindow =  vTabConfigWindows.begin();
      iTabConfigWindow != vTabConfigWindows.end();
      iTabConfigWindow++) {
    if (iTabConfigWindow->isConfigMaximized()) {
« Last Edit: May 27, 2010, 09:02:05 am by jmichae3 » Logged
Master Jeweller
Posts: 422

« Reply #1 on: June 02, 2010, 11:58:54 am »

Feel free to submit a patch. Cheesy
Posts: 16

« Reply #2 on: June 07, 2010, 10:04:35 am »

well, that was just example code, sorry I didn't say so. (ack!)
Pages: [1]
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.084 seconds with 18 queries.