]> git.sesse.net Git - vlc/commitdiff
reset editingmode when mediainfo-dialog is closed, still leaves bug when dialog is...
authorIlkka Ollakka <ileoo@videolan.org>
Thu, 13 Dec 2007 13:20:52 +0000 (13:20 +0000)
committerIlkka Ollakka <ileoo@videolan.org>
Thu, 13 Dec 2007 13:20:52 +0000 (13:20 +0000)
modules/gui/qt4/dialogs/mediainfo.cpp
modules/gui/qt4/dialogs/mediainfo.hpp

index 8286fcc196e1a502b8e23382e0bfc094ead160df..d0a5d6526086919710eb6882c60c5e6ffc9b5d5f 100644 (file)
@@ -40,7 +40,6 @@ MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf,
                                   QVLCFrame( _p_intf ), mainInput(_mainInput),
                                   stats( _stats )
 {
-    i_runs = 0;
     p_item = _p_item;
     b_cleaned = true;
 
@@ -165,6 +164,12 @@ void MediaInfoDialog::close()
 {
     this->toggleVisible();
 
+    /* if dialog is closed, revert editing if not saved */
+    if( MP->isInEditMode() )
+    {
+        MP->setEditMode( false );
+        updateButtons( 0 );
+    }
     if( mainInput == false ) {
         deleteLater();
     }
index 0432bede5d13463072a34f269dfd4f980daf04da..d99c0d58283574b0ce206216bb68ffcef658da19 100644 (file)
@@ -67,7 +67,6 @@ private:
     input_item_t *p_item;
     static MediaInfoDialog *instance;
 
-    int i_runs;
     bool mainInput;
     bool stats;
     bool b_cleaned;