Browse Source

Clean up code inside the project manager tree

merge-requests/1/head
Ian McInerney 6 years ago
parent
commit
c31ac6c154
  1. 11
      kicad/tree_project_frame.cpp
  2. 2
      kicad/tree_project_frame.h
  3. 2
      kicad/treeproject_item.h

11
kicad/tree_project_frame.cpp

@ -257,11 +257,8 @@ void TREE_PROJECT_FRAME::OnCreateNewDirectory( wxCommandEvent& event )
wxString full_dirname = prj_dir + wxFileName::GetPathSeparator() + subdir;
if( wxMkdir( full_dirname ) )
{
// the new item will be added by the file watcher
// AddItemToTreeProject( subdir, root );
}
// Make the new item and let the file watcher add it to the tree
wxMkdir( full_dirname );
}
@ -450,7 +447,7 @@ wxTreeItemId TREE_PROJECT_FRAME::AddItemToTreeProject( const wxString& aName,
if( dir.IsOpened() ) // protected dirs will not open properly.
{
wxString dir_filename;
wxString dir_filename;
data->SetPopulated( true );
@ -821,7 +818,7 @@ wxTreeItemId TREE_PROJECT_FRAME::findSubdirTreeItem( const wxString& aSubDir )
subdirs_id.pop();
kid = m_TreeProject->GetFirstChild( root_id, cookie );
if( ! kid.IsOk() )
if( !kid.IsOk() )
continue;
}
}

2
kicad/tree_project_frame.h

@ -55,7 +55,7 @@ private:
bool m_isRenaming; // Are we in the process of renaming a file
wxTreeItemId m_root;
std::vector<wxString> m_filters;
wxFileSystemWatcher* m_watcher; // file system watcher (since wxWidgets 2.9.2)
wxFileSystemWatcher* m_watcher; // file system watcher
public:
TREE_PROJECT_FRAME( KICAD_MANAGER_FRAME* parent );

2
kicad/treeproject_item.h

@ -37,8 +37,6 @@
*/
class TREEPROJECT_ITEM : public wxTreeItemData
{
//friend class KICAD_MANAGER_FRAME;
public:
TREEPROJECT_ITEM( TreeFileType type, const wxString& data,

Loading…
Cancel
Save