]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - c++/cursesm.cc
ncurses 5.1
[ncurses.git] / c++ / cursesm.cc
index 632ab6f9b4e12a885a09191bd50818c4bd06a670..3b4dbd58bef17425d5a83f68070898dc91156467 100644 (file)
@@ -1,6 +1,6 @@
 // * this is for making emacs happy: -*-Mode: C++;-*-
 /****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc.                        *
+ * Copyright (c) 1998,1999 Free Software Foundation, Inc.                   *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  ****************************************************************************/
 
 /****************************************************************************
- *   Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1997             *
+ *   Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1997                 *
  ****************************************************************************/
 
 #include "cursesm.h"
 #include "cursesapp.h"
 #include "internal.h"
 
-MODULE_ID("$Id: cursesm.cc,v 1.8 1998/02/11 12:13:40 tom Exp $")
+MODULE_ID("$Id: cursesm.cc,v 1.12 1999/10/30 23:59:37 tom Exp $")
   
 NCursesMenuItem::~NCursesMenuItem() {
   if (item)
@@ -304,9 +304,12 @@ NCursesMenu::operator()(void) {
       if (drvCmnd == CMD_ACTION) {
        if (options() & O_ONEVALUE) {
          NCursesMenuItem* itm = current_item();
-         assert(itm);
+         assert(itm != 0);
          if (itm->options() & O_SELECTABLE)
-           b_action = itm->action();
+           {
+             b_action = itm->action();
+             refresh();
+           }
          else
            On_Not_Selectable(c);
        }
@@ -316,6 +319,7 @@ NCursesMenu::operator()(void) {
            NCursesMenuItem* itm = my_items[i];
            if (itm->value()) {
              b_action |= itm->action();
+             refresh();
            }
          }
        }