Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Tab Save/SaveAll fix maybe??
Pecan:
I've test the follow mods. They seem to work the way I believe
you want them to.
--- Code: ---===================================================================
--- sdk/editormanager.cpp (revision 1573)
+++ sdk/editormanager.cpp (working copy)
@@ -237,8 +237,10 @@
if (ed && ed->GetModified() )
++num_modified;
}
- pop->Enable(idNBTabSave, num_modified);
- pop->Enable(idNBTabSaveAll, num_modified > 1 );
+ //pop->Enable(idNBTabSave, num_modified);
+ pop->Enable(idNBTabSave, em->GetEditor(m_RightClickSelected)->GetModified()); //pecan 12/20/2005 12:42 PM
+ //-pop->Enable(idNBTabSaveAll, num_modified > 1 );
+ pop->Enable(idNBTabSaveAll, num_modified > 0 );//pecan 12/20/2005 12:42 PM
PopupMenu(pop, event.GetPosition().x, event.GetPosition().y);
delete pop;
--- End code ---
thanks
pecan
Pecan:
@thomas
Ok, I tried again. I cannot get it to save when two tabs are up.
The left modified, the right not.
Right click on the right (unmodified) tab. "Save" is enabled (and shouldn't be)
and "Save all" is disabled because "modified>1" is false.
What am I missing?? I can't right click on an unmodified tab and save it.
I should "save all" which is disabled.
Am I nuts??
thanks
pecan
thomas:
Cannot reproduce your problem, but I have found another small bug... you can save a document that is actually not modified if one of its siblings is modified. But that's luckily easily fixed :)
Urxae:
Wait, is "Save all" only enabled if more than one editor is modified? So if only one is modified switching to it and hitting "Save" is the only way to save it without modifying anything else first?
That doesn't seem right. "Save all" should be enabled if at least one editor is modified (i.e. if there's anything to save), so it can also be activated from other editors. I expect "Save all" to actually save all my modifications, however many (but > 0) files are modified and whichever editor is currently active...
To be absolutely clear: "Save all" should only be disabled if there are no modifications to save.
...
Wow, I might have gone a little overboard with all the italics ;).
thomas:
Allthough mathematically 1 ∈ all, it really only makes sense to enable "all" if n > 1. Else, we don't need "save".
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version