Merge branch 'dev' into new_ref_panel
This commit is contained in:
+3
-23
@@ -392,8 +392,7 @@ class Config:
|
||||
return self._appPath / "assets"
|
||||
|
||||
def lastPath(self) -> Path:
|
||||
"""Return the last path used by the user, but ensure it exists.
|
||||
"""
|
||||
"""Return the last path used by the user, if it exists."""
|
||||
if isinstance(self._lastPath, Path):
|
||||
if self._lastPath.is_dir():
|
||||
return self._lastPath
|
||||
@@ -401,9 +400,8 @@ class Config:
|
||||
|
||||
def backupPath(self) -> Path:
|
||||
"""Return the backup path."""
|
||||
if isinstance(self._backupPath, Path):
|
||||
if self._backupPath.is_dir():
|
||||
return self._backupPath
|
||||
if isinstance(self._backupPath, Path) and self._backupPath.is_dir():
|
||||
return self._backupPath
|
||||
return self._backPath
|
||||
|
||||
def errorText(self) -> str:
|
||||
@@ -614,24 +612,6 @@ class Config:
|
||||
self.searchNextFile = conf.rdBool(sec, "searchnextfile", self.searchNextFile)
|
||||
self.searchMatchCap = conf.rdBool(sec, "searchmatchcap", self.searchMatchCap)
|
||||
|
||||
# Deprecated Settings or Locations as of 2.0
|
||||
# ToDo: These will be loaded for a few minor releases until the users have converted them
|
||||
self.guiFont = conf.rdStr("Main", "guifont", self.guiFont)
|
||||
self.guiFontSize = conf.rdInt("Main", "guifontsize", self.guiFontSize)
|
||||
self.guiLocale = conf.rdStr("Main", "guilang", self.guiLocale)
|
||||
self._backupPath = conf.rdPath("Backup", "backuppath", self._backupPath)
|
||||
self.backupOnClose = conf.rdBool("Backup", "backuponclose", self.backupOnClose)
|
||||
self.askBeforeBackup = conf.rdBool("Backup", "askbeforebackup", self.askBeforeBackup)
|
||||
fmtSingleQuotes = conf.rdStrList(sec, "fmtsinglequote", [])
|
||||
fmtDoubleQuotes = conf.rdStrList(sec, "fmtdoublequote", [])
|
||||
|
||||
if isinstance(fmtSingleQuotes, list) and len(fmtSingleQuotes) == 2:
|
||||
self.fmtSQuoteOpen = fmtSingleQuotes[0]
|
||||
self.fmtSQuoteClose = fmtSingleQuotes[1]
|
||||
if isinstance(fmtDoubleQuotes, list) and len(fmtDoubleQuotes) == 2:
|
||||
self.fmtDQuoteOpen = fmtDoubleQuotes[0]
|
||||
self.fmtDQuoteClose = fmtDoubleQuotes[1]
|
||||
|
||||
# Check Values
|
||||
# ============
|
||||
|
||||
|
||||
@@ -1420,7 +1420,7 @@ class GuiProjectTree(QTreeWidget):
|
||||
return
|
||||
|
||||
def dragMoveEvent(self, event: QDragMoveEvent) -> None:
|
||||
"""Capture the drag move event to enable edge autoscroll."""
|
||||
"""Capture the drag move event to enable edge auto scroll."""
|
||||
y = event.pos().y()
|
||||
if y < self._scrollMargin:
|
||||
if not self._scrollTimer.isActive():
|
||||
@@ -1434,8 +1434,8 @@ class GuiProjectTree(QTreeWidget):
|
||||
return
|
||||
|
||||
def dropEvent(self, event: QDropEvent) -> None:
|
||||
"""Overload the drop item event to ensure relevant data has been
|
||||
updated.
|
||||
"""Overload the drop item event to ensure the drag and drop
|
||||
action is allowed, and update relevant data.
|
||||
"""
|
||||
sHandle = self.getSelectedHandle()
|
||||
sItem = self._getTreeItem(sHandle) if sHandle else None
|
||||
|
||||
Reference in New Issue
Block a user