Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selection box missing when redoing after delete all #13

Open
leemi opened this issue Dec 22, 2011 · 9 comments
Open

Selection box missing when redoing after delete all #13

leemi opened this issue Dec 22, 2011 · 9 comments

Comments

@leemi
Copy link
Collaborator

leemi commented Dec 22, 2011

  1. Create multiple strands.
  2. Select all strands
  3. Delete.
  4. Undo until it's a blank document
  5. Press and hold Ctrl+Shift+Z to redo

// Error: underlying C/C++ object has been deleted
Traceback (most recent call last):
File "c:/git/cadnano2/controllers/mayacontrollers/mayaSelectionContex.py", line 93, in selectionCallback
m.strandsSelected(helixList)
File "c:\git\cadnano2\controllers\mayacontrollers\mayaObjectManager.py", line 156, in strandsSelected
doc.win.pathroot.clearStrandSelections()
File "c:\git\cadnano2\views\pathview\pathrootitem.py", line 193, in clearStrandSelections
self._strandItemSelectionGroup.clearSelection(False)
File "c:\git\cadnano2\views\pathview\pathselection.py", line 237, in clearSelection
self.selectionbox.hide()
RuntimeError: underlying C/C++ object has been deleted //

@grinner
Copy link
Collaborator

grinner commented Dec 22, 2011

Calling the pathview directly from the mayaview is a no no

File "c:\git\cadnano2\controllers\mayacontrollers\mayaObjectManager.py", line 156, in strandsSelected
doc.win.pathroot.clearStrandSelections()

@grinner
Copy link
Collaborator

grinner commented Dec 22, 2011

Fixed the hack

@grinner grinner closed this as completed Dec 22, 2011
@leemi leemi reopened this Dec 22, 2011
@ghost
Copy link

ghost commented Dec 22, 2011

Nick, there was a reason why I had this hack:
XXX [SB] THIS IS A HACK, should not need to do this!!!
doc.win.pathroot.clearStrandSelections()
the Maya to Cadnano selection does not work right without it...removing that line does not solve the underlying issue...

@grinner
Copy link
Collaborator

grinner commented Dec 22, 2011

Okay, so there's other issues. Tryingn to track down. I suspect the views just need a reset

@grinner
Copy link
Collaborator

grinner commented Dec 22, 2011

Please test

@grinner
Copy link
Collaborator

grinner commented Dec 22, 2011

I think I solved it. Basically the press callbacks need be minimized.
Until that happens, we may have issues. I think I can push a fix as
the work I did the other day can revert the complexity of my
mousepress callback business

On Thu, Dec 22, 2011 at 10:38 AM, Simon Breslav
[email protected]
wrote:

Nick, there was a reason why I had this hack:

XXX [SB] THIS IS A HACK, should not need to do this!!!

doc.win.pathroot.clearStrandSelections()
the Maya to Cadnano selection does not work right without it...removing that line does not solve the undelying issue...


Reply to this email directly or view it on GitHub:
#13 (comment)

@leemi
Copy link
Collaborator Author

leemi commented Dec 22, 2011

Doesn't seem to be working for me, when I deselect in 3D view, the items are still selected in 2D view.

@grinner
Copy link
Collaborator

grinner commented Dec 22, 2011

So we need an way to set self.oldSelectionStrandList. That is it seems like we need to catch the deselected items and map them to strands in the model

@grinner
Copy link
Collaborator

grinner commented Dec 22, 2011

or, I can just add a method to the model to deselect everything globally. You guys' call, but I'd like a way to do the former, as that is how I do it in the pathview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants