176 def showMenu(self): |
176 def showMenu(self): |
177 """ |
177 """ |
178 Public slot called before the vcs menu is shown. |
178 Public slot called before the vcs menu is shown. |
179 """ |
179 """ |
180 if self.vcsAddAct: |
180 if self.vcsAddAct: |
181 self.vcsAddAct.setEnabled(self.project.isOpen()) |
181 self.vcsAddAct.setEnabled(self.project and self.project.isOpen()) |
182 |
182 |
183 @pyqtSlot() |
183 @pyqtSlot() |
184 def _vcsCheckout(self, export=False): |
184 def _vcsCheckout(self, export=False): |
185 """ |
185 """ |
186 Protected slot used to create a local project from the repository. |
186 Protected slot used to create a local project from the repository. |
187 |
187 |
188 @param export flag indicating whether an export or a checkout |
188 @param export flag indicating whether an export or a checkout |
189 should be performed |
189 should be performed |
190 """ |
190 """ |
191 if not self.project.checkDirty(): |
191 if not self.project or not self.project.checkDirty(): |
192 return |
192 return |
193 |
193 |
194 vcsSystemsDict = e5App().getObject("PluginManager")\ |
194 vcsSystemsDict = e5App().getObject("PluginManager")\ |
195 .getPluginDisplayStrings("version_control") |
195 .getPluginDisplayStrings("version_control") |
196 if not vcsSystemsDict: |
196 if not vcsSystemsDict: |