[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45099] trunk/blender/source/blender/ editors/space_file/file_draw.c: file selector text field and file renaming were doing undo pushes.

Campbell Barton ideasman42 at gmail.com
Fri Mar 23 04:22:06 CET 2012


Revision: 45099
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45099
Author:   campbellbarton
Date:     2012-03-23 03:21:59 +0000 (Fri, 23 Mar 2012)
Log Message:
-----------
file selector text field and file renaming were doing undo pushes.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_file/file_draw.c

Modified: trunk/blender/source/blender/editors/space_file/file_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_file/file_draw.c	2012-03-23 03:10:44 UTC (rev 45098)
+++ trunk/blender/source/blender/editors/space_file/file_draw.c	2012-03-23 03:21:59 UTC (rev 45099)
@@ -190,6 +190,7 @@
 			               TIP_(overwrite_alert ?N_("File name, overwrite existing") : N_("File name")));
 			uiButSetCompleteFunc(but, autocomplete_file, NULL);
 			uiButSetFlag(but, UI_BUT_NO_UTF8);
+			uiButClearFlag(but, UI_BUT_UNDO); /* operator button above does this automatic */
 
 			/* check if this overrides a file and if the operator option is used */
 			if(overwrite_alert) {
@@ -526,6 +527,7 @@
 				textwidth, textheight, sfile->params->renameedit, 1.0f, (float)sizeof(sfile->params->renameedit),0,0,"");
 			uiButSetRenameFunc(but, renamebutton_cb, file);
 			uiButSetFlag(but, UI_BUT_NO_UTF8); /* allow non utf8 names */
+			uiButClearFlag(but, UI_BUT_UNDO);
 			if ( 0 == uiButActiveOnly(C, block, but)) {
 				file->selflag &= ~EDITING_FILE;
 			}




More information about the Bf-blender-cvs mailing list