-Changed most project settings in the engine, so they have major and minor categories.

-Changed SectionedPropertyEditor to support this
-Renamed Globals singleton to GlobalConfig, makes more sense.
-Changed the logic behind persisten global settings, instead of the persist checkbox, a revert button is now available
This commit is contained in:
Juan Linietsky
2017-01-05 09:16:00 -03:00
parent 9e477babb3
commit 0f7af4ea51
109 changed files with 847 additions and 789 deletions

View File

@ -27,7 +27,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "undo_redo.h"
#include "os/os.h"
void UndoRedo::_discard_redo() {
@ -54,12 +54,14 @@ void UndoRedo::_discard_redo() {
void UndoRedo::create_action(const String& p_name,MergeMode p_mode) {
uint32_t ticks = OS::get_singleton()->get_ticks_msec();
if (action_level==0) {
_discard_redo();
// Check if the merge operation is valid
if (p_mode!=MERGE_DISABLE && actions.size() && actions[actions.size()-1].name==p_name) {
if (p_mode!=MERGE_DISABLE && actions.size() && actions[actions.size()-1].name==p_name && actions[actions.size()-1].last_tick+800 > ticks) {
current_action=actions.size()-2;
@ -83,12 +85,15 @@ void UndoRedo::create_action(const String& p_name,MergeMode p_mode) {
}
}
actions[actions.size()-1].last_tick=ticks;
merge_mode=p_mode;
} else {
Action new_action;
new_action.name=p_name;
new_action.last_tick=ticks;
actions.push_back(new_action);
merge_mode=MERGE_DISABLE;