Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: MemoryCardListPanel.cpp
- ===================================================================
- --- MemoryCardListPanel.cpp (revision 4349)
- +++ MemoryCardListPanel.cpp (working copy)
- @@ -346,7 +346,7 @@
- return result;
- }
- - virtual wxDragResult OnDropMcd( const McdListItem& src, const McdListItem& dest, wxDragResult def )
- + virtual wxDragResult OnDropMcd( McdListItem& src, McdListItem& dest, wxDragResult def )
- {
- if( src.Slot == dest.Slot ) return wxDragNone;
- if( !pxAssert( (src.Slot >= 0) && (dest.Slot >= 0) ) ) return wxDragNone;
- @@ -400,7 +400,7 @@
- {
- wxFileName tempname;
- tempname.AssignTempFileName( basepath.ToString() );
- - //Console.Warning( "srcExists && destExists" );
- + Console.Warning( "srcExists && destExists" );
- // Neat trick to handle errors.
- result = result && wxRenameFile( srcfile.GetFullPath(), tempname.GetFullPath(), true );
- result = result && wxRenameFile( destfile.GetFullPath(), srcfile.GetFullPath(), false );
- @@ -408,14 +408,21 @@
- }
- else if( destExists )
- {
- - //Console.Warning( "destExists" );
- + Console.Warning( "destExists" );
- result = wxRenameFile( destfile.GetFullPath(), srcfile.GetFullPath() );
- }
- else if( srcExists )
- {
- - //Console.Warning( "srcExists" );
- + Console.Warning( "srcExists" );
- result = wxRenameFile( srcfile.GetFullPath(), destfile.GetFullPath() );
- }
- +
- + if (result)
- + {
- + bool temp = dest.IsEnabled;
- + dest.IsEnabled = src.IsEnabled;
- + src.IsEnabled = temp;
- + }
- if( !result )
- {
- @@ -595,7 +602,7 @@
- if( result )
- {
- - //Console.Warning( "Overwriting whatever was here" );
- + Console.Warning( "Overwriting whatever was here" );
- wxFileName fullpath( m_FolderPicker->GetPath() + g_Conf->Mcd[slot].Filename.GetFullName() );
- wxRemoveFile( fullpath.GetFullPath() );
- }
- @@ -693,11 +700,6 @@
- return baselen;
- }
- -const McdListItem& Panels::MemoryCardListPanel_Simple::GetCard( int idx ) const
- -{
- - return m_Cards[idx];
- -}
- -
- McdListItem& Panels::MemoryCardListPanel_Simple::GetCard( int idx )
- {
- return m_Cards[idx];
- Index: MemoryCardListView.cpp
- ===================================================================
- --- MemoryCardListView.cpp (revision 4349)
- +++ MemoryCardListView.cpp (working copy)
- @@ -34,7 +34,7 @@
- SetCardCount( m_CardProvider ? m_CardProvider->GetLength() : 0 );
- }
- -const IMcdList& BaseMcdListView::GetMcdProvider() const
- +IMcdList& BaseMcdListView::GetMcdProvider()
- {
- pxAssume( m_CardProvider );
- return *m_CardProvider;
- Index: MemoryCardPanels.h
- ===================================================================
- --- MemoryCardPanels.h (revision 4349)
- +++ MemoryCardPanels.h (working copy)
- @@ -68,9 +68,7 @@
- public:
- virtual void RefreshMcds() const=0;
- virtual int GetLength() const=0;
- - virtual const McdListItem& GetCard( int idx ) const=0;
- virtual McdListItem& GetCard( int idx )=0;
- -
- virtual wxDirName GetMcdPath() const=0;
- };
- @@ -82,7 +80,7 @@
- typedef wxListView _parent;
- protected:
- - const IMcdList* m_CardProvider;
- + IMcdList* m_CardProvider;
- // specifies the target of a drag&drop operation
- int m_TargetedItem;
- @@ -101,7 +99,7 @@
- virtual void LoadSaveColumns( IniInterface& ini );
- virtual const ListViewColumnInfo& GetDefaultColumnInfo( uint idx ) const=0;
- - virtual const IMcdList& GetMcdProvider() const;
- + virtual IMcdList& GetMcdProvider();
- virtual void SetTargetedItem( int sel );
- };
- @@ -201,7 +199,6 @@
- // Interface Implementation for IMcdList
- virtual int GetLength() const;
- - virtual const McdListItem& GetCard( int idx ) const;
- virtual McdListItem& GetCard( int idx );
- protected:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement