small change to deselectall, just made it so that pressing Akey didnt do anything if there wasnt anything to sel/desel.

notice that if you pressed Akey when no objects in the view it still pushed an undo event, redrew and counted all and change the memory usage in the status.
mainly added not to waist undo slots.
This commit is contained in:
Campbell Barton 2006-04-18 08:19:28 +00:00
parent f54a113cde
commit faaa67d6f6

@ -867,17 +867,24 @@ void mouse_cursor(void)
void deselectall(void) /* is toggle */
{
Base *base;
int a=0;
int a=0, ok=0;
base= FIRSTBASE;
while(base) {
/* is there a visible selected object */
if TESTBASE(base) {
a= 1;
ok= a= 1;
break;
}
/* are there any objects in the view*/
if(base->lay & G.vd->lay)
ok=1;
base= base->next;
}
if (!ok) return;
base= FIRSTBASE;
while(base) {
if(base->lay & G.vd->lay) {