838 def __syncRecent(self): |
838 def __syncRecent(self): |
839 """ |
839 """ |
840 Private method to synchronize the list of recently opened multi projects |
840 Private method to synchronize the list of recently opened multi projects |
841 with the central store. |
841 with the central store. |
842 """ |
842 """ |
843 if self.pfile in self.recent: |
843 for recent in self.recent[:]: |
844 self.recent.remove(self.pfile) |
844 if Utilities.samepath(self.pfile, recent): |
|
845 self.recent.remove(recent) |
845 self.recent.insert(0, self.pfile) |
846 self.recent.insert(0, self.pfile) |
846 maxRecent = Preferences.getProject("RecentNumber") |
847 maxRecent = Preferences.getProject("RecentNumber") |
847 if len(self.recent) > maxRecent: |
848 if len(self.recent) > maxRecent: |
848 self.recent = self.recent[:maxRecent] |
849 self.recent = self.recent[:maxRecent] |
849 self.__saveRecent() |
850 self.__saveRecent() |