Revision: 6752
          http://playerstage.svn.sourceforge.net/playerstage/?rev=6752&view=rev
Author:   jeremy_asher
Date:     2008-07-03 15:21:34 -0700 (Thu, 03 Jul 2008)

Log Message:
-----------
Fixed options dialog redraw error

Modified Paths:
--------------
    code/stage/trunk/libstage/options_dlg.cc
    code/stage/trunk/libstage/options_dlg.hh
    code/stage/trunk/libstage/worldgui.cc

Modified: code/stage/trunk/libstage/options_dlg.cc
===================================================================
--- code/stage/trunk/libstage/options_dlg.cc    2008-07-03 21:28:20 UTC (rev 
6751)
+++ code/stage/trunk/libstage/options_dlg.cc    2008-07-03 22:21:34 UTC (rev 
6752)
@@ -80,11 +80,11 @@
                        check->callback( checkChanged, this );
                }
                scroll->end();
+               this->redraw();
        }
 
        void OptionsDlg::setOptions( const std::vector<Option*>& opts ) {
-               options.clear();
-               options.insert( options.begin(), opts.begin(), opts.end() );
+               options.assign( opts.begin(), opts.end() );
                updateChecks();
        }
        

Modified: code/stage/trunk/libstage/options_dlg.hh
===================================================================
--- code/stage/trunk/libstage/options_dlg.hh    2008-07-03 21:28:20 UTC (rev 
6751)
+++ code/stage/trunk/libstage/options_dlg.hh    2008-07-03 22:21:34 UTC (rev 
6752)
@@ -16,7 +16,7 @@
 
   //class Option;
 
-       class OptionsDlg : protected Fl_Window {
+       class OptionsDlg : public Fl_Window {
        public:
                enum event_t { NO_EVENT, CHANGE, CHANGE_ALL, CLOSE };
                
@@ -43,9 +43,6 @@
        public:
                OptionsDlg( int x, int y, int w, int h );
                virtual ~OptionsDlg();
-               void callback( Fl_Callback* cb, void* p ) { 
Fl_Window::callback( cb, p ); }
-               void show() { Fl_Window::show(); }
-               void hide() { Fl_Window::hide(); }
                
                void setOptions( const std::vector<Option*>& opts );
                void setOptions( const std::set<Option*, Option::optComp>& opts 
);

Modified: code/stage/trunk/libstage/worldgui.cc
===================================================================
--- code/stage/trunk/libstage/worldgui.cc       2008-07-03 21:28:20 UTC (rev 
6751)
+++ code/stage/trunk/libstage/worldgui.cc       2008-07-03 22:21:34 UTC (rev 
6752)
@@ -462,7 +462,7 @@
     //   instance before the dialog is destroyed
     worldGui->oDlg = NULL; 
     oDlg->hide();
-    //Fl::delete_widget( oDlg );
+    Fl::delete_widget( oDlg );
     return;    
   case OptionsDlg::NO_EVENT:
   case OptionsDlg::CHANGE_ALL:
@@ -609,7 +609,6 @@
   }
        
   drawOptions.assign( options.begin(), options.end() );
-       
   if ( oDlg ) {
     oDlg->setOptions( drawOptions );
   }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Playerstage-commit mailing list
Playerstage-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to