Skip to content

Commit

Permalink
Apply treesettings on dummy widgets for dnd
Browse files Browse the repository at this point in the history
  • Loading branch information
zkovari committed Jul 24, 2023
1 parent 5fbbbe5 commit 4b29e94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/python/plotlyst/view/widget/doc/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def doc(self) -> Document:

def refresh(self):
self._lblTitle.setText(self._doc.title)

if self._doc.icon:
self._icon.setIcon(IconRegistry.from_name(self._doc.icon, self._doc.icon_color))
self._icon.setVisible(True)
Expand Down Expand Up @@ -177,7 +177,7 @@ def _docSelectionChanged(self, wdg: DocumentWidget, selected: bool):

def _dragStarted(self, wdg: DocumentWidget):
wdg.setHidden(True)
self._dummyWdg = DocumentWidget(self._novel, wdg.doc())
self._dummyWdg = DocumentWidget(self._novel, wdg.doc(), settings=self._settings)
self._dummyWdg.setPlusButtonEnabled(False)
self._dummyWdg.setMenuEnabled(False)
translucent(self._dummyWdg)
Expand Down
4 changes: 2 additions & 2 deletions src/main/python/plotlyst/view/widget/scene/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,9 @@ def _deleteScene(self, sceneWdg: SceneWidget):
def _dragStarted(self, wdg: QWidget):
wdg.setHidden(True)
if isinstance(wdg, SceneWidget):
self._dummyWdg = SceneWidget(wdg.scene(), wdg.novel())
self._dummyWdg = SceneWidget(wdg.scene(), wdg.novel(), settings=self._settings)
elif isinstance(wdg, ChapterWidget):
self._dummyWdg = ChapterWidget(wdg.chapter(), wdg.novel())
self._dummyWdg = ChapterWidget(wdg.chapter(), wdg.novel(), settings=self._settings)
for v in self._scenes.values():
v.setDisabled(True)
else:
Expand Down

0 comments on commit 4b29e94

Please sign in to comment.