Code Monkey home page Code Monkey logo

Comments (7)

mampir avatar mampir commented on June 22, 2024

I managed to make the export button work with this ugly thing:

diff --git a/kicadStepUptools.py b/kicadStepUptools.py
index 7ae55fe..2d86899 100644
--- a/kicadStepUptools.py
+++ b/kicadStepUptools.py
@@ -21732,6 +21732,12 @@ if singleInstance():
         cv = t.findChild(QtGui.QDockWidget, "Model")
         if cv is None:
             cv = t.findChild(QtGui.QDockWidget, "Tree view")
+            if cv is None:
+                cv = [o for o in t.children () if o.objectName () == "Combo View"]
+                if cv:
+                    cv = cv[0]
+                else:
+                    cv = None
     #say( "Combo View" + str(cv))
     ## print( "KSUWidget" + str(wf))        
     cv.setFeatures( QtGui.QDockWidget.DockWidgetMovable | QtGui.QDockWidget.DockWidgetFloatable|QtGui.QDockWidget.DockWidgetClosable )

Should I make a pull request for this?

from kicadstepupmod.

easyw avatar easyw commented on June 22, 2024

Should I make a pull request for this?

yes please

@ https://github.com/easyw/kicadStepUpMod/blob/56df083ae33473b5eb7698307ed181cb5c771032/kicadStepUptools.py#L1371
I also did this:

    cv = t.findChild(QtGui.QDockWidget, "Combo View")
    if cv is None:
        cv = t.findChild(QtGui.QDockWidget, "ComboView")
        if cv is None:
            cv = t.findChild(QtGui.QDockWidget, "Model")
            if cv is None:
                cv = t.findChild(QtGui.QDockWidget, "Tree view")

does it work for you?

from kicadstepupmod.

mampir avatar mampir commented on June 22, 2024

does it work for you?

It does not and it can be fixed the same way, but then the next lines start to fail, starting @ https://github.com/easyw/kicadStepUpMod/blob/56df083ae33473b5eb7698307ed181cb5c771032/kicadStepUptools.py#L1384

    if KSUWidget and cv:
        dw=t.findChildren(QtGui.QDockWidget)
        try:
            t.tabifyDockWidget(cv,KSUWidget)                
        except:
            pass
        k_tab = t.findChild(QtGui.QDockWidget, "kicadStepUp") #"kicad StepUp 3D tools")  # L1384 -> returns None  
        k_tab.activateWindow()  # Error

I tried to fix this in a similar way, by checking the children names in a loop, but none of the children have the name "kicadStepUp". I even checked recursively for "kicadStepUp". Without fixing the code you mentioned, the window can't be docked, but at least appears.

from kicadstepupmod.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.