From bf60cc95d2e6c064c59435b03e3a471b87af40d7 Mon Sep 17 00:00:00 2001 From: Ilkka Ollakka Date: Fri, 24 Aug 2007 21:19:39 +0000 Subject: [PATCH] if editing some other than currently playing item, set so that item-change etc. doesn't mix with currently playing item. Ain't so pretty yet, so take one. Also don't show same metadata button if not needed. --- modules/gui/qt4/dialogs/mediainfo.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/gui/qt4/dialogs/mediainfo.cpp b/modules/gui/qt4/dialogs/mediainfo.cpp index 022c9d6dc5..2e3258a92d 100644 --- a/modules/gui/qt4/dialogs/mediainfo.cpp +++ b/modules/gui/qt4/dialogs/mediainfo.cpp @@ -137,6 +137,13 @@ void MediaInfoDialog::setInput( input_item_t *p_input ) { clear(); update( p_input, true, true ); + /* if info is from current input, don't set default to edit, if user opens + * some other item, se default to edit, so it won't be updated to current item metas + * + * This really doesn't seem as clean solution as it could be + */ + in_edit = ( input_GetItem( MainInputManager::getInstance( p_intf )->getInput() ) != p_input ); + MP->setEdit( in_edit ); } void MediaInfoDialog::update() @@ -199,6 +206,8 @@ void MediaInfoDialog::updateButtons( int i_tab ) { msg_Dbg( p_intf, "Coin Coin, Tab number: %i", i_tab ); - if( i_tab == 0 ) saveMetaButton->show(); - else saveMetaButton->hide(); + if( in_edit and i_tab == 0 ) + saveMetaButton->show(); + else + saveMetaButton->hide(); } -- 2.11.4.GIT