[fwbuilder-commits] r3126 - in branches/v4_1: . doc src/gui
Brought to you by:
mikehorn
From: <va...@in...> - 2010-07-21 23:40:44
|
Author: vadim Date: 2010-07-21 16:40:35 -0700 (Wed, 21 Jul 2010) New Revision: 3126 Modified: branches/v4_1/build_num branches/v4_1/doc/ChangeLog branches/v4_1/src/gui/FWWindow.cpp Log: * FWWindow.cpp (loadFile): fixed #1612 "File/Open should create new project panel". If user has some unsaved changes in the default project panel (the one with no associated file) and then uses File/Open menu to open another data file, the file should open in a new project panel. Modified: branches/v4_1/build_num =================================================================== --- branches/v4_1/build_num 2010-07-21 16:10:10 UTC (rev 3125) +++ branches/v4_1/build_num 2010-07-21 23:40:35 UTC (rev 3126) @@ -1 +1 @@ -#define BUILD_NUM 3124 +#define BUILD_NUM 3125 Modified: branches/v4_1/doc/ChangeLog =================================================================== --- branches/v4_1/doc/ChangeLog 2010-07-21 16:10:10 UTC (rev 3125) +++ branches/v4_1/doc/ChangeLog 2010-07-21 23:40:35 UTC (rev 3126) @@ -1,3 +1,11 @@ +2010-07-21 Vadim Kurland <va...@vk...> + + * FWWindow.cpp (loadFile): fixed #1612 "File/Open should create + new project panel". If user has some unsaved changes in the + default project panel (the one with no associated file) and then + uses File/Open menu to open another data file, the file should + open in a new project panel. + 2010-07-20 Vadim Kurland <va...@vk...> * FWWindow.cpp (FWWindow::showEvent): default main window geometry Modified: branches/v4_1/src/gui/FWWindow.cpp =================================================================== --- branches/v4_1/src/gui/FWWindow.cpp 2010-07-21 16:10:10 UTC (rev 3125) +++ branches/v4_1/src/gui/FWWindow.cpp 2010-07-21 23:40:35 UTC (rev 3126) @@ -683,9 +683,13 @@ // if the only project panel window that we have shows // default object tree (i.e. its filename is empty), then load file // into. Otherwise create new project window. - if (activeProject() && activeProject()->getFileName().isEmpty()) + // + // However if the only project panel has default tree with unsaved + // changes then we open new project window. + + proj = activeProject(); + if (proj && proj->getFileName().isEmpty() && !proj->db()->isDirty()) { - proj = activeProject(); if (!proj->loadFile(file_name, load_rcs_head)) return false; } else { |