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

Not possible to clear pin assignment for SpiceLibComp #808

Closed
ra3xdh opened this issue Jul 5, 2024 · 14 comments · Fixed by #824
Closed

Not possible to clear pin assignment for SpiceLibComp #808

ra3xdh opened this issue Jul 5, 2024 · 14 comments · Fixed by #824
Assignees
Labels
Milestone

Comments

@ra3xdh
Copy link
Owner

ra3xdh commented Jul 5, 2024

This issue is related to MacOS only. Linux and Windows are not affected. It is not possible to clear pin assignment for new SpiceLibComp Spice library device after redesign #679. See #792 for context. Here are two screencasts illustrating the table behavior on MacOS and Linux. It seems that QTableWidget::setCellWidget works differently on different platforms. I am unable to fix this issue myself, need to wait for someone using Mac.

*Linux (correct)

Screencast_20240704_200738.webm
  • MacOS wrong
Pin.config.NC.reset.mov
@dsm
Copy link
Collaborator

dsm commented Jul 5, 2024

I will tried to fixed this issue. I download the same schematic lm335 symbol pin selection is behaving like a text box. selecting all NC give 4 pin but sometimes I double clicked text become 1NC and 1 is became invisible for the other selectin box. I will upload a video later.

@dsm
Copy link
Collaborator

dsm commented Jul 7, 2024

windows build also affected. Tested on win11.

Windows_test.webm

@dsm
Copy link
Collaborator

dsm commented Jul 7, 2024

I tested on Ubuntu 24.04 wsl2 also same issue.

linux_wsl2.webm

@ra3xdh
Copy link
Owner Author

ra3xdh commented Jul 7, 2024

Yes, I understood how to reproduce this.

  • Click on cell, drop-down list appears.
  • Don't select anything and double click on the next cell
  • The drop down list remains to hang in the previous cell

If you select NC from the drop-down list, it disappears and releases pin.

@ra3xdh ra3xdh added this to the 24.3.0 milestone Jul 8, 2024
@ra3xdh ra3xdh changed the title Not possible to clear pin assignment for SpiceLibComp on MacOS Not possible to clear pin assignment for SpiceLibComp Jul 8, 2024
@ra3xdh ra3xdh self-assigned this Jul 8, 2024
@ra3xdh ra3xdh linked a pull request Jul 8, 2024 that will close this issue
@ra3xdh
Copy link
Owner Author

ra3xdh commented Jul 8, 2024

Please check #824 for the fix

@dsm
Copy link
Collaborator

dsm commented Jul 8, 2024

I tested windows and works as expected. I'll test on macOS as soon as possible.

@dsm
Copy link
Collaborator

dsm commented Jul 8, 2024

this is macOS test pin selection OK but some rendering artifact ex 1NC or NC but intertwined.

test.mov

@dsm
Copy link
Collaborator

dsm commented Jul 8, 2024

image

@ra3xdh
Copy link
Owner Author

ra3xdh commented Jul 8, 2024

I don't know why MacOS inserts random unicode symbols after "N". I didn't add anything in the item string. Maybe Qt has registered some auto-conversion for "NC" string. What is your locale setting?

@dsm
Copy link
Collaborator

dsm commented Jul 8, 2024

English(US) I think it writes NC twice but starting on C N(CN)C

@ra3xdh
Copy link
Owner Author

ra3xdh commented Jul 8, 2024

Please try the following patch. It clears item text before setCellWidget call.

diff --git a/qucs/extsimkernels/spicelibcompdialog.cpp b/qucs/extsimkernels/spicelibcompdialog.cpp
index d028918f..cc1dd96a 100644
--- a/qucs/extsimkernels/spicelibcompdialog.cpp
+++ b/qucs/extsimkernels/spicelibcompdialog.cpp
@@ -388,6 +388,7 @@ void SpiceLibCompDialog::slotTableCellDoubleClick()
       cbxSelectPin->addItem(QString::number(i));
     }
   }
+  tbwPinsTable->item(r,c)->setText("");
   tbwPinsTable->setCellWidget(r,c,cbxSelectPin);
   connect(cbxSelectPin,SIGNAL(activated(int)),this,SLOT(slotSelectPin()));

@dsm
Copy link
Collaborator

dsm commented Jul 8, 2024

I am not accessing my mac right now but I'll try. (about 5 hours)

@dsm
Copy link
Collaborator

dsm commented Jul 8, 2024

@ra3xdh Hi, I tested above patch and it's working as expected.

@ra3xdh
Copy link
Owner Author

ra3xdh commented Jul 8, 2024

Fixed by #824. Closing as completed.

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

Successfully merging a pull request may close this issue.

2 participants