+ } else {\r
+ // quick patchES to fix problem in turn from landscape to portrait, when a file is selected in the right pane\r
+ // TODO serious refactorization in activities and fragments providing file browsing and handling \r
+ if (mCurrentFile != null) {\r
+ onFileClick(mCurrentFile);\r
+ mCurrentFile = null;\r
+ }\r
+ Fragment rightPanel = getSupportFragmentManager().findFragmentByTag(FileDetailFragment.FTAG);\r
+ if (rightPanel != null) {\r
+ FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\r
+ transaction.remove(rightPanel);\r
+ transaction.commit();\r
+ }\r