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

mysterious cross-calling between wells and others collections #77

Open
andrea-bistacchi opened this issue Jun 16, 2024 · 2 comments
Open
Assignees

Comments

@andrea-bistacchi
Copy link
Collaborator

In the process of simplifying signals activated when the legend is modified, I found this mysterious code (and other similar in collections):

def geology_legend_color_modified_update_views(self, updated_list=None):
        """This is called when the color in the geological legend is modified.
        Disconnect signals to geology and topology tree, if they are set, to avoid a nasty loop
        that disrupts the trees, then they are reconnected when the trees are rebuilt"""
        self.GeologyTreeWidget.itemChanged.disconnect()
        self.TopologyTreeWidget.itemChanged.disconnect()
        for uid in updated_list:
            """Case for color changed"""
            wells_list = self.parent.well_coll.get_uids()
            if self.parent.geol_coll.get_uid_x_section(uid) in wells_list:
                self.change_actor_color(
                    uid=self.parent.geol_coll.get_uid_x_section(uid),
                    collection="well_coll",
                )
            self.change_actor_color(uid=uid, collection="geol_coll")

        """Re-connect signals."""
        self.GeologyTreeWidget.itemChanged.connect(
            self.toggle_geology_topology_visibility
        )
        self.TopologyTreeWidget.itemChanged.connect(
            self.toggle_geology_topology_visibility
        )

Why do we check if a well uid is in a column dedicated to cross sections? It should not be included there.

Similar code is also included in:

def fluid_legend_color_modified_update_views

def background_legend_color_modified_update_views

In any case, since I'm simplifying the functions used when the legend is modified, all this will disappear, unless there is some reason to keep it.

@andrea-bistacchi
Copy link
Collaborator Author

Is this for markers and annotations that belong to geology, fluid and background, but are associated to a particular well?

I think we must add a well column, similar to x_section, for clarity and because otherwise it would be impossible to have wells projected on cross sections.

@gbene
Copy link
Collaborator

gbene commented Jun 16, 2024

Hi. Yes when discussing and developing wells we agreed to temporarily use the xsection column (with plans to add the proper well column) to assign well related objects to a given well.

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