Tue, 30 Jul 2013 07:16:48 +0300
Use repaint() instead of update() when redrawing the scene after a pick so that the new scene is repainted immediately.
src/file.cpp | file | annotate | diff | comparison | revisions | |
src/file.h | file | annotate | diff | comparison | revisions | |
src/gldraw.cpp | file | annotate | diff | comparison | revisions |
--- a/src/file.cpp Tue Jul 30 02:27:12 2013 +0300 +++ b/src/file.cpp Tue Jul 30 07:16:48 2013 +0300 @@ -454,8 +454,7 @@ g_loadedFiles << f; LDOpenFile::setCurrent (f); - if (g_loadedFiles.size() == 2) - LDOpenFile::closeInitialFile (0); + LDOpenFile::closeInitialFile(); g_win->R()->setFile (f); g_win->fullRefresh(); @@ -520,8 +519,7 @@ // If we have an anonymous, unchanged file open as the only open file // (aside of the one we just opened), close it now. - if (g_loadedFiles.size() == 2) - LDOpenFile::closeInitialFile (0); + LDOpenFile::closeInitialFile(); // Rebuild the object tree view now. g_win->fullRefresh(); @@ -954,7 +952,14 @@ g_win->updateFileListItem (f); } -void LDOpenFile::closeInitialFile (ulong idx) { - if (g_loadedFiles.size() > idx && g_loadedFiles[idx]->name() == "" && !g_loadedFiles[idx]->hasUnsavedChanges()) - delete g_loadedFiles[idx]; +// ============================================================================= +// This little beauty closes the initial file that was open at first when opening +// a new file over it. +void LDOpenFile::closeInitialFile() { + if (g_loadedFiles.size() == 2 && + g_loadedFiles[0]->name() == "" && + !g_loadedFiles[0]->hasUnsavedChanges()) + { + delete g_loadedFiles[0]; + } } \ No newline at end of file
--- a/src/file.h Tue Jul 30 02:27:12 2013 +0300 +++ b/src/file.h Tue Jul 30 07:16:48 2013 +0300 @@ -127,7 +127,7 @@ static void closeUnused(); static LDOpenFile* current(); static void setCurrent (LDOpenFile* f); - static void closeInitialFile (ulong idx); + static void closeInitialFile(); private: static LDOpenFile* m_curfile;